Home | Concepts | Research | Migration Path
Evaluation Criteria for Base Platform
We will evaluate jQuery and Prototype against the following criteria:
| Feature | Weighting | jQuery | Protoype/Scriptaculous? |
| Download size | 8 | 94kb compressed (15 compressed) ( see) | 277kb uncompressed (100kb minified) |
| Migration path for the CMS | 6 | Lots of work, but there's scope for introducing jQuery incrementally | Better than jQuery |
| Unit testing | 4 | Scriptaculous ( link) | |
| Client-side performance | 6 | Faster | Selector slower than jQuery |
| I18N / L10N | 6 | Not built in | |
| Behaviour / Content / Style separation | 8 | Good | Doesn't prohibit unobtrusive coding style |
| Ease of customization (skinning, content, behaviour) | 6 | good layer on top of protype language construct | |
| Developer enjoyment | 6 | ? | |
| Support for architecture of larger apps | 10 | lowpro for jquery might be solution | Uses full class-architecture with inheritance, solid event-model with custom events, proven with larger applications (e.g. Metroseeq) |
| Features | |||
| Drag & drop | 8 | similar to scriptaculous link | |
| Visual effects | 8 | yes, new effects due in 1.5 ( see) | yes |
| Ajax | 8 | yes | yes |
| Form validation | 8 | no, but available as plugins | no, but extensive 3rd party support ( link, link) |
| Event handling | 6 | yes, with custom events and onDOMLoad | |
| UI widgets available | 8 | yes, v1.5 of UI is due for release next week link | yes, but very scattered and sparse ( link) |
| Accessibility | 6 | not built in, but support for keyboard events/shortcuts | |
| Mobile device support | 6 | comment: isn't this natural to unobtrusive scripting? | |
| Non-technical | |||
| Maturity | 8 | ||
| How in-sync with our needs is their roadmap? | 8 | Good; seems focused on things to build cool UIs | Seems more focused around esoteric language extensions, leaves UI up to you |
| Release frequency | 6 | 8 releases since 1 Jun 07 | 2 prototype and 1 scriptaculous releases since 1 Jun 07 |
| Developer community size/activity | 8 | Good community of UI widget developers | Well supported but there's no central place for extensions |
| Documentation | 8 | Superbly organized and extensive, single definitive source, uses MediaWiki? ( link) | Focused, dispersed across multiple sites. Good API docs ( link & link) |
| Internal learning curve | 8 | Easy to learn if familiar with Prototype and closures | People know Prototype already |
| Community adoption | 6 | Growing in popularity over the past 9 months | People know Prototype already |
| Scoring | 52 | 30 |
Option Summary
- Ajax Communication Layer
- Prototype
- ExtJS-base
- jQuery
- Application Architecture
- ExtJS - fully javascript build, desktop-app style development
- Prototype/Scriptaculous/LowPro? - unobtrusive, behaviours attached to HTML objects.
- jQuery
- Widget Library
- ExtJS
- Dojo
External overview/comparisons
- http://www.slideshare.net/jeresig/javascript-library-overview?src=embed (10/2007)
- http://kauriproject.org/wiki/g1/g3/69-kauri.html (02/2008(
- http://javascriptant.com/articles/24/javascript-libraries-by-comparison (12/2007)
- http://ajaxpatterns.org/Javascript_Multipurpose_Frameworks
- http://www.ja-sig.org/wiki/display/UP3/Javascript+Toolkit+Comparison
The Base Layer
The base layer is going to be responsible for handling:
- Ajax
- Basic visual effects
- JavaScript? architecture - a class system and assignment of behaviour.
Contenders: This is a battle between Protoype/Scriptaculous? and jQuery.
Rejected:
- ExtJS-base and Dojo lack the tools for unobtrusive javascript that are going to be mandatory when building more traditional web apps / websites. It might be useful for specific apps that we build, building them "fully in ExtJS".
- Mootools is too lightweight to use across the board. It might be useful for very simple websites.
| Prototype | jQuery | |
| Download footprint | Large, with Scriptaculous (100kb minified with effects) | Small (52kb minified) |
| Community support | #1 in RoR community, but momentum appears to be slowing (5000 members on main mailinglist) | 2-3 times that of Prototype and growing (6000 members on main mailinglist) |
External Comparisons
- http://ajaxian.com/archives/prototype-and-jquery-a-code-comparison
- http://alternateidea.com/blog/articles/2007/11/9/prototype-vs-jquery
- http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/
Advantages/Disadvantages? Prototype
- (+) Flexible class system, very close to the OOP developers are used to
- (+) Awesome block iterators (Enumerable class, Hash class)
- (+) Custom events
- (+) Improved extension of DOM-elements in 1.6 ($('myID').update('bla'))
- (-) Large Footprint
Advantages/Disadvantages? jQuery
- (+) Namespaced, easy to use with other libraries
- (+) Large widget library
- (+) Cutting edge DOM selectors
- (+) Method chaining
- (o) DOM-focused behaviour binding (Ingo: Too restricting, Mark: Advantage)
Form Validation
Candidates
Prototype/Scriptaculous?
Advantages:
- Powerful base framework
- Lots of momentum / community uptake
- We use it already (albeit an older version); migration path will be the lowest.
- Good support for unobtrusive javascript.
- Most lighter "website-widgets" (e.g. carousel, form validation) build on this combination
Disadvantages:
- Small volunteer based team, and there is not commercial support for it
- No consistent library of consistent user interface widget, though there is talk of people developing these - http://www.prototype-ui.com/.
- Doesn’t seem to have any support for thinks like Adobe Air or Google Gears.
- Will 2.0 break backwards compatibility?
Conclusions:
- Prototype/LowPro? would make a good "base layer" API for architecting JavaScript? code.
- Scriptaculous adds core effects.
- ExtJS will build on top of this with widgets.
Links:
- http://wiki.script.aculo.us/
- http://www.tetlaw.id.au/view/javascript/really-easy-field-validation
- http://www.prototype-ui.com/
- http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype
- http://livepipe.net/projects/control_suite/
- http://www.millstream.com.au/view/code/tablekit
ExtJS
Advantages:
- Absolutely fucking excellent widget library.
- It seems like running it on top of Prototype/Scriptaculous? (or another system) was a design goal.
- Seems to be very professionally run and has a solid direction to it.
- Commercial support available.
- Performance seems to be good: http://extjs.com/blog/2007/07/10/css-selectors-speed-myths/ (Comment Ingo: DOM Selector library differences aren't the big problem any longer, its the raw size of javascript that needs to be evaluated, see http://jst.pbwiki.com/summary.php)
Disadvantages:
- The widget library will push us into building widget-based applications. The CMS is a good example of a widget-based application. However, ExtJS would be completely inappropriate for something like Metroseeq.
- Doing unobtrusive javascript would be very hard, and involve a lot of custom development. (major disadvantage for website usage, not as important for cms. however, we want to decrease the split between cms & main site, not increase it!)
- There's no clear migration path from the current CMS to ExtJS.
- Download footprint: ca. 650kb minified with prototype and scripaculous
- Very basic regex-based form validation
Conclusions:
- Things like ComplexTableField could benefit from being built on top of ExtJS widgets.
- It's unlikely to be the best "base layer".
- It's unlikely to be a pivotal piece of our JavaScript? upgrade - some widgets may be of use in some projects, or incrementally rolled out to the CMS. However, the idea of "standardising on ExtJS" isn't going to work. The library doesn't have what we need out of the box because it's as unobtrusive as a Flash app or .NET website. :-P
Links:
- Interview with ExtJS creator here: http://www.infoq.com/news/2007/10/extjs20
- http://extjs.com/deploy/dev/examples/grid/totals.html
- http://ajaxian.com/archives/ext-20-final-released
- http://savvyduck.blogspot.com/2008/01/javascript-classes-design-patterns-mvc.html
- http://test.silverstripe.com/mooshoo/admin/index.html
Dojo
At first glance, this seems similar in structure to ExtJS but less well-polished.
Advantages:
- Has full time developers.
Disadvantages:
- UI widgets not as polished as Dojo ( http://dojotoolkit.org/projects/dojox, http://dojotoolkit.org/projects/dijit)
- Seems to be loosing momentum.
YUI
Complex Example with Layout Manager, Dialogs, Tab Views, Calendar: http://developer.yahoo.com/yui/examples/layout/adv_layout.html (
Advantages:
- Explicitly states Browser Support, includes IE6 ( http://developer.yahoo.com/yui/articles/gbs/)
- Regression Tests ( http://developer.yahoo.com/yui/yuitest/)
- Supports localization (although configurations not built in)
- Supports "progressive enhancement" for existing markup (e.g. useful for ComplexTableField?, see http://developer.yahoo.com/yui/examples/datatable/dt_enhanced.html)
- Advanced tree-implementation (better than extJS?)
- DataTable? component seems to ROCK
- Advanced modules: Browser History Manager, Rich Text Editor, Calendar
- Active development: Average of 100 issues closed monthly ( http://sourceforge.net/project/stats/detail.php?group_id=165715&ugn=yui&type=tracker&mode=12months&tracker_id=0)
- 9000 Member Mailinglist, ~50 daily posts
Disadvantages:
- Fulltime developers sponsored by a large organisation, unclear product development path?
- Verbose naming
- Lots of overlap with Prototype/Scriptaculous?: Effects, Drag&Drop, AutoComplete?, DOM-Builder
- Footprint a bit too high for website usage when just using a single component: e.g. 130kb (minified, no gzip) for calendar-component, but looks better when using multiple components: 100kb framework, 30kb calendar component
- Average tracker issue age: 160 days ( http://sourceforge.net/project/stats/detail.php?group_id=165715&ugn=yui&type=tracker&mode=12months&tracker_id=0)
- Low patch activity, but lots of feature requests ( http://sourceforge.net/project/stats/detail.php?group_id=165715&ugn=yui&type=tracker&mode=12months&tracker_id=836478)
- Low comment ratio on existing feature requests
JQuery
Advantages:
- Good easy to understand framework
- Basic UI widgets.
Disadvantages:
- It seems that it' difficult to extend this to support complex applications (by contrast Prototype is well respected in this regard).
Ingo: My personal preference for structuring clientside app goes towards Prototype classes with DOM-containers as attributes, rather than the DOM-node focused behaviour-attachement by jQuery - maybe thats just a leftover from too much actionscripting ;)
Links
Mootools
Advantages:
- Does a 80% of what Prototype and Scriptacilous does, with 20% of the file size. ( http://demos.mootools.net/ )
Disadvantages:
- Perhaps too lightweight to act as the "platform" that we're looking for.
