Kristian Mandrup
2010-Mar-17 15:49 UTC
Decoupling the view layer in Rails 3 - install UJS and template/css frameworks as gems using generator
Since the idea of UJS is loose coupling, the UJS framework of choice should be installed as a gem, just like we do for markup languages such as Redcloth etc. Same goes for the template language IMO. Rails doesn''t even require any view frontend in many cases, fx when using a javascript framework such as Sproutcore for the view. This kind of approach is the way of the future... I think there should instead be a GENERATOR to INSTALL the VIEW LAYER (as gems in Gemfile) if required. When run, the user should be given a choice of which template languages to install (ERB as default) and which UJS framework to install (perhaps jQuery as default). This generator could be run as one of the final steps in the rails app generator. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Damien MATHIEU
2010-Mar-19 08:44 UTC
Re: Decoupling the view layer in Rails 3 - install UJS and template/css frameworks as gems using generator
That''s what the prototype legacy helper plugin tends to do (even though it''s not a gem) : http://github.com/rails/prototype_legacy_helper On 17 mar, 16:49, Kristian Mandrup <kmand...@gmail.com> wrote:> Since the idea of UJS is loose coupling, the UJS framework of choice > should be installed as a gem, just like we do for markup languages > such as Redcloth etc. Same goes for the template language IMO. > > Rails doesn''t even require any view frontend in many cases, fx when > using a javascript framework such as Sproutcore for the view. This > kind of approach is the way of the future... > > I think there should instead be a GENERATOR to INSTALL the VIEW LAYER > (as gems in Gemfile) if required. > When run, the user should be given a choice of which template > languages to install (ERB as default) and which UJS framework to > install (perhaps jQuery as default). > > This generator could be run as one of the final steps in the rails app > generator.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.