Extending Rails with Framework Generators


I’m a total newbie still plowing though people’s code and figuring
out in general.

One of the things I’ve been looking at are plugins and engines.
I’m a newbie, I reached the conclusion that either approach really
much to be desired (also, since I need to learn about the underlying
instead of borrowing).

I totally agree with DHH that separation of “business logic” from the
framework is crucial and necessary to keep Rails from becoming “another
bloated framework ™”, yet at the same time web applications will
share a lot of business logic to start with.

One idea, I’d like to ask you all about involves the extension of Rails
other words, Rails would become a dependent library much like
is to Rails) itself with a separate “ruby gem” that will for this
example be
called “framework generator” or “framegen” for short.

The FG could be extended with other generators such as:
–login generator
and whatever else, but all of these components will be developed outside

What this will do is extend rails so that you can build a skeleton rails
application with all of the above components integrated by throwing it
multiple parameters.

For example at the command line, you can type:

framegen rails_app_directory login blog forum permissions

That way you wont have to worry about porting various third-party
components, cluttering the Rails framework, or get a confusing directory
structure within your application but the skeleton components will be
integrated from the start.