Rails Engines vs Rails Generators
February 24, 2006 at 8:57 pm | In Ruby on Rails, rails engines, rails generators | 1 Commentif you have not used or not got to know Rails, go to www.rubyonrails.org and find out. But here’s what rails is in 2 sentences.
Web development that doesn’t hurt
Ruby on Rails is an open-source web framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.
In a less fancy way, rails is an framework that enables agile web development thru the use of Model-View-Controller (MVC) design paradigm.
I am just amazed by how “natural” it is to use rails for rapid development and i would have to say that the great thing about rails are the generators that you can use for User management modules and other typical web modules that most web sites need. Now, rails engines is another way of getting such modules as a plugin for rails and rails engines are getting more and more adapted.
Now the reason that I am blogging about this is because Gizmoojo will be developed using ruby on rails and now i am at the crossroad of deciding between using rails generators or engines for eg. “Login & Users management”.
Rails generators are basically ruby scripts that generates a series of model, views, controller files that the specific modules that you want just like how you would generate a controller, “script/generate controller”. One thing that bothers me when i am considering using the generator approach is that the intend of rails generator is to provide the developer a set of base code to start off and more than often, the developer will be customizing or changing the code along the way. So if there is a newer revision of the generator released, you have no easy way to patch that in. But however, there are quite a number of rails generators that are already available at www.rubyonrails.org.
With rails engines, the whole objective is to allow easy upkeeping of code and software since the core of the plugin lies in the vendors/plugin directory and not coupled with your models and controllers code in your /apps, so its easy to patch the engine you have installed IF you have not made any changes on the engine code installed. So at least that is driving me towards using engines for “Login & Users management” .
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.