I get the separation of layout and markup, I like MVC frameworks that separate code from layout but what about the JavaScript in a page? What are good patterns for separation of JavaScript from the layout? I know some things will need to be run before page load and will be embedded in the markup but what are good guidelines to follow?

link|improve this question
feedback

closed as off topic by Alex, phwd Jan 2 at 16:42

Questions on Web Applications - Stack Exchange are expected to generally relate to web applications, within the scope defined in the faq.

Browse other questions tagged or ask your own question.