I always keep an eye out for new JS libraries that might be useful in our products, so I was obviously interested in an article on Ajaxian about some upcoming libraries...
The Ajaxian article links to 10 Promising JavaScript Frameworks on Six Revisions website - unfortunately, none of them really float my boat although there are a few that get worthy mentions...
SproutCore
SproutCore markets itself as:
SproutCore is designed to make desktop-like apps for the web. Imagine the possibilities by sampling some demo apps.
When I first heard of this library, and what it evolved from, I just had to scratch my head and wonder "Why?". However, I decided to take another look at it now some time has passed... I looked at the various demos and wasn't particularly bowled over by the UI - any desktop app, and vast numbers of web apps, have far better UI. That being said, they do seem to have one of the more solid panel layouts I've seen.
I dug a little further and found that SproutCore is not just JS, there's a back-end component that you need to install on the server. Sorry, not for me., it's just too damn messy and I have to change the way I do things in order to use it.
Spry
Spry, from Adobe, markets itself as:
The Spry framework for Ajax is a JavaScript library that provides easy-to-use yet powerful Ajax functionality that allows designers to build pages that provide a richer experience for their users. It is designed to take the complexity out of Ajax and allow designers to easily create Web 2.0 pages.
Spry is split in to: Spry Data, Spry Widgets and Spry Effects. It's obviously got lot of good documentation and Adobe behind it so it will make ground in corporate circles. But I still don't really see the benefit of it other than "yet another framework" to choose from? Do we really need Spry when things like jQuery exist?
The Data part is good, but nothing special compared to jQuery.
The widgets are again are pretty solid, and possibly more stable than jQuery UI, however they seem lacklustre, especially considering this is from Adobe. I was expecting MUCH better.
The effects are pretty slick and possibly a bit more fluid than those in some other libraries. Again, nothing special compared to jQuery and if you want truly awesome effects go look at UIZE.
I get the distinct feeling that Spry is just part of a process for getting developers in to Flex development: Want better data connections, widgets and effects? Use Flex! - yup, I think Spry is more of a marketing tool than anything else.
JavaScriptMVC
JavaScriptMVC is a library that describes itself as:
JavaScriptMVC is a framework that brings methods to the madness of JavaScript development. It guides you to successfully completed projects by promoting best practices, maintainability, and convention over configuration.
It's the first time I've encountered this one so I spent a bit of time digging in to it...
Their website has the world's most annoying chat panel that pops-up over the page, on every page view, even if you're not remotely interested in it! This sort of UI disaster instantly made me worry about this framework. I'm looking for information, not chat rooms!
Anyway, the library itself is pretty solid. However it reminds me of ExtJS (but without the glossy finish) in that it really does expect to take over the whole web page - this isn't the sort of thing that you'd want to try embedding in an existing web app.
So, if you want to create full-page web apps that have a feel of a Windows desktop app, JavaScriptMVC is worth a look. I think ExtJS is probably the better option if you have cash to throw at a project, otherwise JavaScriptMVC is a good free alternative as is Cappuccino.
It should be noted, however, that frameworks that require you to adapt to their way of working, can turn around and kill you. It's all too easy to assume the framework does everything you want and then get 90% of the way though a big project and hit an insurmountable brick wall that you never recover from. You have been warned!
qooxdoo
qooxdoo (WTF?) markets itself as:
qooxdoo is a comprehensive and innovative Ajax application framework. Leveraging object-oriented JavaScript allows developers to build impressive cross-browser applications. No HTML, CSS nor DOM knowledge is needed.
No. No, no, no, no, NO! Avoid like the plague! That's all I have to say on this library.
midori
Ah, midori... It markets itself as:
JavaScript is nice, but it can be a lot nicer. midori does exactly that without making you relearn things.
This library is a bit like jQuery without the plugins. It does many of the same things as jQuery - the obligatory selectors and effects are included - but jQuery does them much better IMHO.
I really can't see the benefit of this library in comparison to jQuery - jQuery can easily be stripped down to make it much smaller than midori and jQuery does so much more.
Archetype JavaScript Framework
Archetype JavaScript Framework is another library I'd not heard of before - it markets itself as:
Archetype is a structural JavaScript Framework. It is designed to provide a framework for JavaScript and Ajax application that ables developers to use JS for heavy clientside developments.
Hrm... I was already carefully stepping away, backwards, from this library. In fact, I started stepping away when I saw the lengthy and drab name of the library.
I read on and found this page which just struck me with horror - this library is designed to create a JavaScript Zoo! By the time I got to this page - where they show how it eases development - the nail was in the coffin, this library is going in completely the wrong direction.
Picture it this way: Archetype will encourage you to make a big bloaty enterprise application... in the web browser! Nooooooooooo! Cats and dogs living together! Human sacrifice! Run away! Abandon all hope!
Really, if you let this anywhere near a project, please quit web development and go and become a goat herder or something.
June Framework
June Framework - yet another library I'd not heard of, hopefully it won't be as bad as Archetype! It markets itself as:
JUNE is a javascript library inspired from the Core library published by Kevin Yank and Cameron Adams in their Simply JavaScript book. In its initial form, the Core library didn't offer too much except basic DOM manipulation using the Object literal notation. I liked that, and because at that time I was looking for a library (having a similar structure and not wanting to use Prototype or JQuery) to help me building some of my projects, I decided to extend it so it will better fit my requirements.
Hrm. Ok. I kept reading down the page, looking at code samples and eventually realised that this library is, in my view, pointless. I'll explain why later.
But what really put the nail in the coffin was that JUNE commits the worst imaginable sin: It puts all sorts of crappy methods and properties on core javascript objects such as Array and Object. Do not pass GO! Do not collect £200 GBP. Go directly to JAIL! JUNE is fired for gross misconduct and crimes against javascript!
UIZE
UIZE is another framework I've not heard of and it kind of jumps out and slaps you in the face. It markets itself as:
You can call it an "Ajax Framework", an "Ajax Toolkit", a "JavaScript Framework", a "JavaScript API", a "JavaScript Toolkit", a "JavaScript Toolbox"... whatever you like! We call it the The UIZE JavaScript Framework (or just "UIZE" for short).
Oh no, wait, it's...
UIZE is an object oriented JavaScript framework for creating more effective user interfaces in your Web content and Web-based applications and services. UIZE is open source. UIZE is free to use (distributed under the terms of the GNU General Public License). UIZE is in active development, and is used on a high profile, consumer facing, e-commerce Web site.
Ok, so it's free to use but takes away your freedoms (GNU license) and it hopes to do all sorts of things but nobody is quite sure what or why. This one was going to take a while to work out...
Let's start with the easy bit - it's got one of the snazziest effects libraries I've seen to-date. Quite how useful those would be in a business product, I'm not sure, but I still thought they were pretty awesome. Unlike almost every other effects library I've looked at (with the exception of script.aculo.us which I no longer use) it doesn't suffer from occasional judders at the start of an effect and on top of that it has some of the most unique effects I've ever seen in a JS library.
As I continued to look through their site, examining code examples and the plethora of demos, I came to the following conclusions:
- It's some pretty awesome JS coding
- Lots of cool UI things, but I couldn't really see myself using any of them
- It's GPL so this whole post is academic anyway
The library seems to have a split personality - on the one hand it looks like a bunch of coders are showing off all the crazy cool things they can do and on the other they have things like an extensive coding style guide that makes it feel quite business like.
I'm really lost for words. I'm going to keep an eye on this library to see how it evolves over the next year or so as it has me intrigued.
SimpleJS
SimpleJS is what June Framework and midori should have been. I've seen it before and think it has a future. It describes itself as:
SimpleJS is a simple and light javascript library which proposes functions ready to use to make the the exploitation of ajax easier. First developed for the beginners and the small projects, SimpleJS is a free library which can't be compared with Prototype or other professional framework.
And it does exactly what it says on the tin! Look how small the files are:
- simple.js : simpleJs base library (5ko)
- simpleajax.js : ajax functions (6ko)
- simpleacco.js : accordion effects (1 ko)
- simpleslish.js : easy create Slide Show (2ko)
While this library wouldn't be useful for our plugins (because Confluence has jQuery built in anyway so we might as well use it), I think of all the 10 libraries reviewed by Six Revisions SimpleJS is the one that actually differentiates itself from the crowd and has a clearly defined use.
If you're writing a small web app or web site and need to just add a sprinkling of functionality, this library is ideal.
Fleegix.js
Fleegix.js is a library I'd not heard of before, which describes itself as:
Fleegix.js provides an extremely lightweight, cross-browser set of JavaScript tools for building dynamic Web-app UIs.
Hrm, sounds good... until you realise that uncompressed it's only half the size of jQuery and compressed it's practically the same size! Uhm, how does that make this a lightweight library?
By the time I got to the build instructions explaining what you need to do with Ruby, I must admit I'd given up on the library. It does less than jQuery and in a less pleasing manner. I just don't see the point.
Summary
Use jQuery, unless you need ultra-light footprint in which case use SimpleJS.
MooTools, not reviewed here, is also worth a look. It's like a modern-day prototype + script.aculo.us and from a developer perspective it's pretty powerful. It'll be around for a very long time.
DOMAssistant, also not reviewed here, is another library to keep an eye on - it's arguably faster and smaller than jQuery, but is perhaps more "niche". I think it'll still be around for a long time.
ExtJS, mentioned but not reviewed on this page, is arguably the best library for creating full-page desktop-like applications in the browser. But be warned, it forces you to code within a framework and can turn around and bite you!
Spry is also worth a look if you're heavily in to Adobe stuff, but struggle to see a future for it compared to jQuery. I guess it'll end up in Adobe apps like Dreamweaver, but with the huge and growing popularity (and simplicity) of jQuery even that probably isn't enough to guarantee its future.
UIZE is just barking mad. I don't know whether it'll just fizzle out or turn in to something that's truly useful, so keep an eye on it. It's arguably the craziest JavaScript project I've ever seen.
Another upcoming library is Cappuccino - I've really not looked in to this one but it looks like a solid alternative to things like ExtJS and JavaScriptMVC.
As for all the other libraries on this page, death and obscurity awaits them. If you're thinking of creating a new library, avoid stepping on jQuery's toes because you've got virtually no chance!
Compare to jQuery
Reviewing this list of upcoming JavaScript libraries has made me realise just how amazing jQuery is in terms of the features it packs in to a relatively small file size.
jQuery doesn't try to turn JavaScript in to some other language or impose a rigid framework upon me - I can just use it where I see fit to make life simpler.
Contrast to SproutCore, JavaScriptMVC, qooxdoo, Archetype JavaScript Framework, ExtJS
jQuery has a staggering array of plugins, all written with a fairly high degree of consistency - if jQuery doesn't do something out the box I can likely find a plugin that does or write my own.
Contrast to the other libraries, pretty much all of them, which have awful plugin architecture or no plugin architecture.
jQuery can be stripped down to almost nothing - all the selectors and other features are actually implemented using jQuery's plugin framework. If you need to shrink it's file size, it's trivial to do.
Compare to libraries such as midori and JUNE which claim to be small but aren't. Only SimpleJS actually achieves this goal better than jQuery.
jQuery is completely namespaced - it doesn't pollute core JavaScript objects and the only thing it puts on the global scope are $ and jQuery variables - and even those can be removed with .noConflict(true). It's clean and tidy!
Contrast to things like prototype, script.aculo.us and JUNE that pollute things on purpose!
If you've not tried jQuery, I'd highly recommend it. Some people find it odd at first but after a while they simply can't imagine web development without it - and for good reason.
Ok, time for me to get back to work...