This post is intended to initiate a discussion about extended the default behavior of rails plugin new to support nested engines as discussed in the presentation Rails Engines Patterns by Andy Maleh<http://confreaks.com/videos/863-railsconf2012-railes-engines-patterns>. Currently the only way to implement a nested rails engine pattern within a set of gems, is to do so manually. A great example is RefineryCMS<https://github.com/refinery/refinerycms> . *Refinery’s architecture*<http://refinerycms.com/guides/getting-started#refinery-s-architecture> * "Refinery comprises of several Rails Engines. Each extension acts like a mini Rails application with its own routes and views. Refinery is architected like this so that it keeps out of the way of any custom development you will do in the /app directory."* While inheriting common domain from the RefineryCMS core. Refinery ships with a dependency engine generator, which is exactly the type of functionality that rails plugin new should have rails generate refinery:engine singular_model_name attribute:type [attribute:type ...] A use case would be create a core engine (MyEngine) which allows the nested dependency engines (MyEngine::Blog, MyEngine::Pages) to share common domain, like CRUD, Taggable, Searchable, etc, while keeping the engine code DRY and isolated from the main app (MyApp). Proposed implementation A: rails plugin new MyEngine-Blog --engine Proposed implementation B: rails engine new MyEngine-Blog --mountable rails engine new MyEngine-Blog --gem #Which would gemify the engine Thoughts? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Any word? On Sunday, April 28, 2013 4:08:48 PM UTC-4, AJ Acevedo wrote:> > This post is intended to initiate a discussion about extended the default > behavior of rails plugin new to support nested engines as discussed in > the presentation Rails Engines Patterns by Andy Maleh<http://confreaks.com/videos/863-railsconf2012-railes-engines-patterns>. > > > Currently the only way to implement a nested rails engine pattern within a > set of gems, is to do so manually. A great example is RefineryCMS<https://github.com/refinery/refinerycms> > . > > *Refinery’s architecture*<http://refinerycms.com/guides/getting-started#refinery-s-architecture> > * > "Refinery comprises of several Rails Engines. Each extension acts like a > mini Rails application with its own routes and views. Refinery is > architected like this so that it keeps out of the way of any custom > development you will do in the /app directory."* While inheriting common > domain from the RefineryCMS core. > > Refinery ships with a dependency engine generator, which is exactly the > type of functionality that rails plugin new should have > rails generate refinery:engine singular_model_name attribute:type > [attribute:type ...] > > A use case would be create a core engine (MyEngine) which allows the > nested dependency engines (MyEngine::Blog, MyEngine::Pages) to share common > domain, like CRUD, Taggable, Searchable, etc, while keeping the engine code > DRY and isolated from the main app (MyApp). > > Proposed implementation A: > rails plugin new MyEngine-Blog --engine > > Proposed implementation B: > rails engine new MyEngine-Blog --mountable > rails engine new MyEngine-Blog --gem #Which would gemify the engine > > Thoughts? > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ryan Bigg
2013-May-24 02:26 UTC
Re: Re: Extending Rails plugin new for nested engine support
I personally think that this should be the responsibility of the engines, and nothing to do with Rails. Both Refinery and Spree (as examples that spring to mind) have different opinions on how to do this engines-that-extend-a-core-engine feature. I''m sure other things do too. I really don''t think that you could come up with a common way to implement this that would belong in core. On 23 May 2013 12:26, AJ Acevedo <alljeep@gmail.com> wrote:> Any word? > > > On Sunday, April 28, 2013 4:08:48 PM UTC-4, AJ Acevedo wrote: >> >> This post is intended to initiate a discussion about extended the default >> behavior of rails plugin new to support nested engines as discussed in >> the presentation Rails Engines Patterns by Andy Maleh<http://confreaks.com/videos/863-railsconf2012-railes-engines-patterns>. >> >> >> Currently the only way to implement a nested rails engine pattern within >> a set of gems, is to do so manually. A great example is RefineryCMS<https://github.com/refinery/refinerycms> >> . >> >> *Refinery’s architecture*<http://refinerycms.com/guides/getting-started#refinery-s-architecture> >> * >> "Refinery comprises of several Rails Engines. Each extension acts like a >> mini Rails application with its own routes and views. Refinery is >> architected like this so that it keeps out of the way of any custom >> development you will do in the /app directory."* While inheriting common >> domain from the RefineryCMS core. >> >> Refinery ships with a dependency engine generator, which is exactly the >> type of functionality that rails plugin new should have >> rails generate refinery:engine singular_model_name attribute:type >> [attribute:type ...] >> >> A use case would be create a core engine (MyEngine) which allows the >> nested dependency engines (MyEngine::Blog, MyEngine::Pages) to share common >> domain, like CRUD, Taggable, Searchable, etc, while keeping the engine code >> DRY and isolated from the main app (MyApp). >> >> Proposed implementation A: >> rails plugin new MyEngine-Blog --engine >> >> Proposed implementation B: >> rails engine new MyEngine-Blog --mountable >> rails engine new MyEngine-Blog --gem #Which would gemify the engine >> >> Thoughts? >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscribe@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.