4 ms·
Unfortunately your site is down as of this writing, so I didn't read the article yet. Regardless, for all who are interested in organizing their jQuery click-d
by jhuckestein 16y ago
Unfortunately your site is down as of this writing, so I didn't read the article yet.
Regardless, for all who are interested in organizing their jQuery click-driven spaghetti-code, I'd recommend checking out JavascriptMVC (at http://v3.javascriptmvc.com/index.html http://v3.javascriptmvc.com/index.html). It's not a stable release yet but it's getting there quickly :)
It provides you with
- a minimalistic MVC framework
- a script loader/dependency/build system
- very intuitive event handling
- testing
- documentation
I'm not affiliated with the project, but I think its worth a try for anyone interested in best-practices for large javascript applications.
- cschneid 16y agoSorry about being down, it's all back up now The great thing about widgets is that they act as OO Classes on top of a DOM object. So you can say 'make this DOM object act like an XYZ'. Sometimes the XYZ is a very visible thing (checkbox, draggable, etc), but other times, we have pure code widgets that do internal routing, or traditional "controller" type activities. For instance, each <li> may be a widget that does... whatever, but then the <ul> may be a widget that listens for events, and adds/removes <li>s from underneath it as appropriate.