[Rails-spinoffs] Unobtrusive scripting?

Michael Schuerig michael at schuerig.de
Wed Jun 29 13:14:39 GMT 2005


Currently, pages generated by Rails tend to be sprinkled with 
JavaScript. This happens, because the various helper methods work only 
locally and simply append to the output.

In order to hide the JavaScript away, rendering would probably have to 
be changed. A way I can think of is that a page-specific script is 
included in the head of the document and JavaScript code is not written 
to the main document, but to the script file instead.

I'm not yet completely convinced of the value of hiding scripts away and 
I'm definitely unsure if it would be worth the effort -- regarding 
implementation and possible execution speed penalty.

Do you have any opinions and ideas concerning this topic?

Michael

-- 
Michael Schuerig                 Nothing is as brilliantly adaptive
mailto:michael at schuerig.de       as selective stupidity.
http://www.schuerig.de/michael/    --A.O. Rorty, The Deceptive Self


More information about the Rails-spinoffs mailing list