I like this, have to think some more about my personal prefs though.
But, you're not really getting rid of the app.js/page.js file really,
you just move it to other smaller files (that might be bundled for the
live version) like what happens with Aaron's Behavior class + extras.
I guess this works best for apps or app like sites. I tend to use data-
* attributes, but don't have something solid like Behavior. I'm still
trying to find the right approach, especially when it comes to options
for fx.. before you know it you are moving all options settings to
data-* attributes and your html is unreadable and the result is not
really so much cleaner or noob-friendly.

On Dec 30, 3:52 pm, Thomas Aylott <[email protected]> wrote:
> Ahoy,
> Dojo, Apple iAds as well as Adobe Flex and a million others
> have created simple declarative APIs that you can use in your HTML.
> This lets you basically replace your app.js or page.js code and get rid of 
> the massive domredy scripts you see people use all the time.
>
> Instead there’s a single parser that runs on domready that looks for elements 
> with special attributes and then instantiates all your classes for you based 
> on the attributes declared in your HTML.
>
> The goal is to allow your JS-n00b co-workers to ‘code’ without screwing up 
> your lovely JS and making massive rats nests that you’ll have to clean up 
> later. There are other goals too ofcourse.
>
> So… What syntax do you guys like?
> If you have other suggestions please fork and add!
>
> https://gist.github.com/759332
>
> — Thomas Aylott – SubtleGradient – MooTools – Cloudera —

Reply via email to