Hi,

I'd like to work on the javascript agnostic feature, but need some
clarifications regarding the implementation before digging too deep in
the code.

1) I've seen two propositions do detach the js framework specific code
from the rails core:

  * Yehuda suggested that we have a javascript file for each framework
(prototype.rails.js, jquery.rails.js, etc...) which implement the
helpers. Rails js helpers would generate js code, implemented by
prototype.rails.js or another depending on the choosen framework.

  * Clemens in this post (http://tinyurl.com/carrpv) suggest that we
abstract the js code generation by having an
AbstractJavaScriptGenerator which sits as a parent for
PrototypeGenerator, JQueryGenerator, etc...

IMO Yehuda's approach is more elegant, because as he says, the js is
completely decoupled from the rails core, and anyone can customize the
js helpers to fit their needs, but I'd like to hear your opinions.

2) I don't know for sure what would be the preferred way to distribute
it.
If we go with Clemens' approach, it does make sense to encapsulate a
js plugin as a rails plugin, as it contains ruby code,
but I'm not sure with Yehuda's approach, as it is just some js files.
It could be handled with a set of rake tasks, although I prefer to put
it in a gem to avoid downloading the js files each time I create a
project.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to