2nd 2005.7.15 joins the contrast to the J2EE in the framework.
There are hundreds of ORM Framework and MVC Framework in the Java world, which attracts most of the world, Ruby On Rails quietly appeared. Advantages 1. Simple. Because it is something that Pragmatic Programer, it is very press, the dynamic language advantage of Ruby itself plus powerful, highly automated, crazy, making Rails's code only Struts / WebWork Spring One of Hibernate, the default Crud system requires only one line of code.
2. Performance. According to the evaluation, the speed is actually 15% -30% faster than Struts Spring Hibernate.
3. Good semantics and domain drive development. I think this is the most important, Active Record uses another domain mode -Aactive Record, which is different from Hibernate's Data Mapper, and has obtained the most direct DDD mode. Action Pack also absorbed the advantages of many MVC frameworks, while remained their complexity and became highlight. There is also Ruby to define semantics like DSL. Let the programming language speaking language is also what I am concerned. VS J2EE (First Round)
Because of the above advantages, it has quietly appeared in fact, there are many people who have begun to take Rails and Java program comparison, and the results are good in small and medium-sized projects, but they can't adapt to complex business. logic. However, just like ejb says that others do not support distribution, is there so many complex models and logic, and Rails is still development, and how it is not known in the future.
Learning purpose
One can apply Rails directly to the medium and small project to get N times development speed, two more importantly, in turn affect the design idea of ORM, MVC in Java World, improve your framework. Moreover, there is a feature of Rails, spend 15 minutes, write a line of code, you can implement the first complete Crudation system, unlike other languages, you can only print a Hello World, really useful, you should work for half a day.
The architecture of the architecture ROR is as follows, the server is apache, the foundation is the MVC scheme I think is the most simple MVC program --Active Record, plus View Template and small code generators like JSP. It is Rails.
VS J2EE (Second Round)
Articles on IBM DW Ruby on Rails and J2ee: Is there Room for Both? There are detailed comparison, recommended
It can be seen that both are based on MVC and ORM mode, but the philosophy of the two is different. The MVC layer, both based on the FrontController mode, map the Request to the appropriate Controller via DispatchServlet / ActionServlet. However, Struts needs to configure each mapping and forward in detail, while Rails configures in accordance with the default principles. In addition, Struts advocates each ActionServlet to complete a move, and Rails advocates a set of related action in a Controller.
ORM layout, Data Mapper is quite large. Hibernate's Data Mapper mode, you need to act as Mapper to mapping POJO in DB. The Active Recorder mode is a line of data in the POJO package DB, while having the default operation of CRUD. For a set of POJO operations such as Find, Delete is placed in the static method of the class. Because there is no session as a mapper, the entire program is natural, very ddd. Learning materials
0. Recommended Koalant's Ruby On Rails Practice (Chinese version, clear text, reading it, don't have to look at other tutorials)
1. Quick Guide Rolling With Ruby On Rails Part1, Part 2 Create a web application with Rails 2. Ruby Information "Programing Ruby 2nd" Progmatic Bookshelf member, version 1 is free, with the Ruby installation package. And the 2nd version of the latest Ruby1.8 is charged, so you can go to the electronic version on the emule. Part of "progarming ruby 1st" Chinese translation
3. Active Record and Action Pack's Profile Active Record ACTION PACK
4.Rails authors and other Rubyer's blog David H. Heinemeier - loud thinking Rails leader Andy Dave Thomas5.Ruby site Ruby on Rails RubyForge Ruby's SourceForge RubyGarden Ruby China Ruby-CN related blog1.Hibernate3.0 vs Rails Active Record