I like the idea of “instant functionality” Engines can offer, but
practical implementation issues make adding and removing more tedious
than it should be.
The process typically requires:
- manual modifications to environment.rb ( e.g., adding engine
configuration and “Engine.start :myengine”
- manual modification to app/controllers/application_controller.rb
This should be more automatic and flexible, as with http.conf includes
Installation scripts can thus add new functionality simply by copying
their boilerplate configurations to an include directory, and no changes
would need to occur in environment.rb or application_controller.rb.
This makes it a lot easier to add/remove controllers, such as deploying
a particular engine config or upgrade w/o touching core application
files. Or, if a particular engine needs to be configured differently
for various deploy scenarios but the core application files remain
constant, then it makes sense to have differing configs for that
particular engine w/o having to duplicate the rest of the core
application config files.