Open Source AJAX toolkits 147
twofish writes "InfoWorld columnist Peter Wayner recently reviewed six
of the most popular "open source" Ajax toolkits. The article sets
out to see if they are enterprise ready in comparison to commercial products
such Backbase, JackBe, and Tibco's General Interface. The six open source projects
covered were selected because each has a high-profile in the developer community
and support of one or more stable organizations. "
The toolkits covered are:
- Dojo
- Google Web Toolkit
- Microsoft Atlas
- Open Rico and Prototype
- Yahoo AJAX Library
- Zimbra Kabuki AJAX Toolkit
Whilst the definition of open source is broad, the round-up is quite helpful.
Nice, printer format... (Score:2, Informative)
Re:Nice, printer format... (Score:3, Insightful)
Probably because a large percentage of the /. community prefers "to-the-point" links instead of the typical multi-page click versions. I personally get really annoyed by online articles that require page-click after page-click just to read an article, so printer-formatted versions typically are consolidated and easier to read. It was really just a courtesy that many in the /. community enjoy.
Was m
"Open source?" (Score:5, Insightful)
From the article:
Microsoft's Atlas may not be open source -- the license includes terms that would rankle a devotee -- but the code you create with the system is yours to license as you like, and you'll be able to create Atlas apps with few practical restrictions.
Oh. Is that what Open Source means? That I can create apps with it and license them how I like? Well, crap, Visual Studio must be open source too!
Last I checked, neither Atlas nor GWT were open source in any sense of the word, though at least GWT will run on real servers.
Re:"Open source?" (Score:5, Interesting)
1. It's a crappy product that their marketing people cannot justify as promotion cost
2. There are better free products
3. They are trying to get their foot into the niche so they can then charge for the "Professional" version
4. They don't understand the space yet
This is common for Microsoft and now becoming common for Google.
Sadly AJAX is still the "silver bullet" of web based companies and the buzzword of the moment. So many companies are using AJAX for the sake of using it despite the fact it is not applicable to the ir use case; sometimes it is easier to wedge something in and use a buzzword to sound cool and relevant.
Re:"Open source?" (Score:3, Interesting)
i.e., they have learned the lesson of Borland.
e.g., Oracle can't survive in the long term if Microsoft gains control over server platforms
e.g., IBM can't survive inthe long term if they have to use Microft's own tools to complete with it.
So: yes, support of open source is self interested in cases like these. But not necessarily cynical or pernicious.
Re:"Open source?" (Score:2)
I don't necessarily think it will be the best solution. The yahoo tools are really more D/HTML client-side tools, and not sure where they fit into
Re:"Open source?" (Score:2)
Eivind.
Spelling mistake in Summary (Score:5, Funny)
Hemos appears to have misspelt "incorrect" as "broad".
Re:"Open source?" (Score:2)
Re:"Open source?" (Score:4, Interesting)
Re:"Open source?" (Score:2)
Re:"Open source?" (Score:2)
I see it at work on a daily basis, when I say that the project I'm working in is based on OS software I always get the you-must-be-a-top-software-engineer look (and pretty much the same happens with AJAX and old engineers that are kinda scared because they don't understand why ever
Re:"Open source?" (Score:2)
The class libraries are available under the Apache 2.0 license. The compiler itself is proprietary.
Java != Javascript (Score:5, Interesting)
This is in response to Google's toolkit, which allows users to code in Java instead of Javascript. I think this feature is a real winner to Java coders. Who wants to code Javascript when you can use Swing? Regardless of what TFA says, there is a difference between the two programming experiences.
In summary, if you are already proficient in Java, Google is the way to go.
Re:Java != Javascript (Score:5, Interesting)
when are people going to realize that Javascript and Java share only a name???
Re:Java != Javascript (Score:5, Interesting)
It's times like these that I am glad I get to tag articles.
Re:Java != Javascript (Score:5, Interesting)
Re:Java != Javascript (Score:2)
Re:Java != Javascript (Score:4, Interesting)
Re:Java != Javascript (Score:3, Funny)
Re:Java != Javascript (Score:2)
Re:Java != Javascript (Score:2)
This author is obviously not a developer.
"This isn't as magical as it sounds because JavaScript is pretty close to a superset of Java, at least in a cosmetic sense. It's not complicated to strip away some typing information from the Java code and end up with something that resembles JavaScript."
uuuh this is totally besides the point, even if it IS false. Forget about this idea that the toolkit converts java code to javascript (which in itself doesn't make any sense).
The point is you can
Re:Java != Javascript (Score:3, Informative)
http://wp.netscape.com/comprod/columns/techvision
Re:Java != Javascript (Score:3, Informative)
Google did not write a Swing API for JavaScript. That would be incredibly complicated and not worth their time. As you can see here [google.com], only some classes in the java.util and java.lang packages are supported, and some of them do not have identical APIs due to the differences between Java and JavaScript. The user interface can be written using GWT's components [google.com].
Re:Java != Javascript (Score:2)
Isn't that a bit like saying "Who wants to get hit by a bicycle when you can get run over by an SUV?"
Re:Java != Javascript (Score:2)
Erm... (Score:5, Insightful)
Or just write the ten lines needed to do XMLHttpRequest calls yourself (there, that's the AJAX part taken care of), and for all other effects write your own functions just like always (copy/paste from your personal library and adapt), so you don't have to deal with bloat, nine out of every ten functions being unneeded, and far too many levels of abstraction and generalization, and have the benefit of actually being able to quickly debug the script when you encounter a problem!
The only organizations where these toolkits might be useful are the really really large ones where there's a team that can dig into the framework and basically "make it their own". Everything smaller, using occasional contractors to maintain the code, benefit far and far more from simplicity, readability and maintainability than from dubious-quality top-heavy frameworks with lack of code-level documentation and thousand and one edgecase-bugs. (Spoken like someone who's had to trace such bugs in the mess of prototype and scriptaculo.us; I've only _looked_ at Dojo, Rico, Yahoo and Zimbra (and not at all at the other two), but my impressions were that what they made up in better code quality, they lost in bloat.)
Re:Erm... (Score:3, Interesting)
Or you just do exactly what digg does and take your own javascript library and include everything you possibly can do "just in case".
I'm actually surprised kitchenSink.js isn't included.
This is just an example from the standard front screen of digg without any cookies or logins to concern itself with.
<script src="/js/spellChecker.js" type="text/javascript">
Re:Erm... (Score:2)
Re:Erm... (Score:3, Informative)
Forgot? The media types for JavaScript were only standardised this year [ietf.org]. Before April, application/javascript was merely a common convention - and actually a less common convention than text/javascript, which is also an acceptable (if deprecated) media type for JavaScript according to the RFC.
So a) there wasn't anything to "forget", and b) they aren't doing anything wrong anyway.
Re:Erm... (Score:2)
Just be glad they're not using language="Javascript" without a MIME-type at all..
Re:Erm... (Score:5, Insightful)
Re:Erm... (Score:3, Interesting)
Re:Erm... (Score:2, Informative)
dig into the framework and basically "make it their own".
just an aside, but any modification of the framework code itself in GWT (maybe some of the others too?) is a breach of the T&C that the developer accepted before downloading the kit.
Re:Erm... (Score:1)
Re:Erm... (Score:5, Insightful)
As for the usefulness of these toolkits, weighing in at 53k (considerably less if you were to use any of the js compacting methods available out there), I find prototype to be an enormous time-saver, and the code saved in my applications goes a great distance toward offsetting the one-time 53k download for users of my websites.
Look, if I took your logic, the next time I wrote an OS X app, I'd write it from scratch in C, without the benefit of the Mac frameworks, and cut and paste from "my own personal library." And I'd probably want to compile it by hand too -- God knows what kind of code the compiler is actually generating, right?
There is a tremendous advantage to abstraction and generalization -- indeed, we'd still be coding ones and zeros if we didn't have it. Sure, you can take it too far too fast, but as one who has done a lot of coding with javascript since not long after its inception, I can tell you that unless you're not doing anything much more complicated than rollovers, it's time to move up. Whether you want to do that with community code or your personal collection is up to you, but I'd like to have a little free time at the end of the day.
Re:Erm... (Score:4, Insightful)
It depends what you are using it for. For a complex DHTML interface for a web application that people use on a regular basis, sure, ~50KB isn't a big deal, especially when it's usually going to be coming from their cache. But for an average website that just wants to enhance particular aspects of their interface, it's ludicrous to make visitors download all that JavaScript, most of which will remain unused.
The Digg example LiquidCoooled posted is a good one. The Digg developers seem to have paid no attention to efficiency, they just dump everything they might ever possibly use onto every page regardless of whether they use one function or twenty. For instance, they reference a 36KB drag and drop library on every page on their site, but I don't see them actually using any drag and drop anywhere - do you? Or how about the fact that they reference aboutdigg.js on every page despite the fact that the code is only ever used on one specific page which most visitors aren't ever going to visit anyway?
Sure, there are a lot of instances where it's a good idea to use a library. But I think a lot of the people using libraries like this are doing so because they want to cut corners, not because it's the right tool for the job.
Re:Erm... (Score:2)
That said, I can't speak to the Digg example, but I have seen plenty of large sites where it is worth it in terms of developer time to dump everything you might need everywhere rather than crafting the right set of functions for each page. I work for a university, and there's undoubtedly a lot of unused code on our si
Re:Erm... (Score:2)
Developer time is expensive, download bandwidth is fairly cheap.
Eivind.
Re:Erm... (Score:2)
You definitely don't want a unique JS file per page. The maintenance alone will kill you.
Grouping JS code into libraries and only including the libraries when you intend to use them makes the most sense to me.
Re:Erm... (Score:2)
Even though the JS files may be cached they still have to be parsed when they are included so you still have memory and processor overhead to deal with.
This makes me think of those guys that are still bitching about the performance hit from putting bevels and drop shadows on OS icons. Really, we're not talking about paring two more bytes off a boot loader for a 6802.Re:Erm... (Score:2)
IMHO this is what prototype does, and why it shouldn't be lumped in with Dojo as being stable.
Try this in a page with prototype included:
var t = [5,'test',4,7];
j=0;
for(i in t)
{ j++
};
alert('J is ' + j);
You're going to get 'J is 5' back. To me, this is something that's part of the language primitives, and shouldn't be violated. That could easily mess up any other javascript library you've got.
The other reason you mentioned doesn't really address the fact that you don't
Re:Erm... (Score:2)
Try this in a page with prototype included:
You're going to get 'J is 5' back. To me, this is something that's part of the language primitives.
I presume that's a typo. You get 35 back.
As for it being part of the language primitives, Javascript doesn't have an array primitive. It's just an object, and when you do for(i in t) you're iterating the properties of an object. The "incorrect" result could occur regardless of whether you use prototype -- all you have to do is add a proper
Re:Erm... (Score:2)
I'm sure no one is reading this anymore, but here's an excellent discussion of this "issue:"
http://www.andrewdupont.net/2006/05/18/javascri p t-associative-arrays-considered-harmful/
A key passage: I am aware of the mitigating factors -- hell, I just enumerated them -- but complaining that Prototype "breaks" your ability to use Array as a hash is like complaining that Prototype "breaks" your ability to use String as a hash. It is not Prototype's fault that JavaScript does not deter this improper use, and
Re:Erm... (Score:2)
Re:Erm... (Score:2)
As for prototype being great for people just jumping onto the AJAX bandwagon, if you think that, you really have not taken a good look at it. The AJAX bits are a small part of the whole -- most of i
Re:Erm... (Score:2)
That's a different story. In the time that I'v been doing web development, I've used perl, pl/sql (as a server side programming language), mod_perl, php, cold_fusion, asp, and now am starting to use asp.net. But in all that time, it has always been on JavaScript on the client side, and probably will continue to be for the forseeable future. Obviously the libraries evolve with time- the code I use (and write)
Re:Erm... (Score:2)
That's a different story...
You missed the point, which is simply that sticking to a paradigm merely because you're invested in it is not always smart.
I have looked a little more closely at ATLAS
I'm not defending ATLAS.
they broke some fundamental parts of the language
I think that's hogwash. Javascript didn't include the prototype property because they liked the way it sounded -- it's meant to be used to extend existing objects. The only instances in which this should break people's code is a)
Re:Erm... (Score:2)
Re:Erm... (Score:2)
Heartily seconded. (Score:2)
The biggest problem with the toolkits that are coming out is that they're sacrificing runtime efficiency for programing efficiency. Case in point: just about every one of these toolkits have the asinine $(elementId) method as a shortcut for writing out document.getElementById(elementId). WHY? Do you really need a meth
Re:Heartily seconded. (Score:2)
For convenience. Which is what all languages are for. Yes, I'd like it if javascript had syntax macros, but no one notices the difference. I mean holy cow, listen to yourself, thundering from on high about the dire consequences of such minutae. Why is it so important to you?
Anyway, if you're manipulating hundreds of elements every second and are concerned about the overhead of the $ method, perhaps javascript
Re:Heartily seconded. (Score:2)
Because, as I already said, JavaScript is not a compiled language. Convience methods are strictly convenient for the programmer, not for the person on the other end of the pipe who's actually using the program. They couldn't give two shits if you saved yourself from future RSI. Because it's not a compiled langauge, convenience methods come at a cost of execution speed. Which means every cutesy $() or A() function is slowing down your user's environment. A lot? No, of cour
Re:Heartily seconded. (Score:2)
To get a performance hit from the indirection of $, you indeed do. Okay, perhaps dozens. In fact, some implementations of $ cache their result, so they end up faster than calling getElementByTagName every time. I dislike that optimization because it eats more memory than it has to (there was no limit on the cache in the version I saw), but fortunately it's easy to fix. Memory leaks are the bane of most ja
Re:Heartily seconded. (Score:2)
Yeah, dozens. Add into that the other shortcuts and it starts to feel bloaty.
Better algorithms beat your curmudgeonly micro-optimizations every time.
Better algorithms != programmer coding conveniences.
Full page refreshes always lose for performance in my world, so I go with Ajax.
Bully for you. So do I. You seem to be under the impression that I don't like AJAX, which couldn't be further from the truth. The banking application I wrote relies heavily on it for dynamic table generation
Re:Erm... (Score:2)
Re:Erm... (Score:2)
Re:Erm... (Score:2)
I think you missed the seminar on job security.
DWR (Score:5, Informative)
If you're doing Java/J2EE work, you should really have a look at DWR [getahead.ltd.uk]
It makes it disgustingly simple to expose pretty much anything as AJAX calls
Re:DWR (Score:2)
But, if you are really a Java web developer, I have what may be an even better suggestion:
http://javawebparts.sourceforge.net/ [sourceforge.net]
Take a look at the AjaxParts Taglib (hit the javadocs link and you'll find it in the ajaxparts package). This is a completely codeless approach to AJAX. Configure all your AJAX events in an XML file, what you want to be sent to the server and what to do when the response comes back, drop some tags in your JSP, and your good to go. There is an introd
Huh? (Score:3, Funny)
Why do we care what horse-breeders think? I mean since when have they been the technical thought-leaders?
Google toolkit it is... (Score:1)
I've just implemented my first AJAX site... (Score:4, Informative)
I took a normal asp.net form I built for an ordering-page (lot's of postbacks for updating various basket options, etc, etc), wrapped it in an atlas XML container (all of 10 seconds work), and Bob became my uncle - the entire thing was AJAX enabled, doing lightweight postbacks & updates instead instead of the usual full-page postbacks you normally get with asp.net page-events.
And all the JS is cross-platform too - IE, FF, Safari, etc (allthough, sadly, no Opera support just yet).
And the best thing is, for all you JavaScript haters is turning off JS in the browser just meant the page automatically reverted to full-blown postbacks instead; thus not limiting accesibility.
Oh, and I understand you can link php into Atlas too, but I'm guessing there's other stuff out there for php aswell.
Re:I've just implemented my first AJAX site... (Score:2)
Re:I've just implemented my first AJAX site... (Score:1)
1. Build form with standard asp:buttons, labels, repeaters, etc - setting all screen properties on the code-behind, just like normal.
2. Wrap in node
3. Specify update triggers in XML, for example -
4. That's it. You've just AJAX-enabled your page.
5. Profit?
Re:I've just implemented my first AJAX site... (Score:1)
Re:I've just implemented my first AJAX site... (Score:2)
Re:I've just implemented my first AJAX site... (Score:2)
For work I've written a few things by hand, a SCORM API adapter, which communica
A better review (w/ actual code samples) (Score:5, Informative)
--
Carnage Blender [carnageblender.com]: Meet interesting people. Kill them.
Re:A better review (w/ actual code samples) (Score:2, Interesting)
Just did this myself (Score:5, Informative)
Re:Just did this myself (Score:2)
Useless... (Score:1, Troll)
Bob
Echo2 is good! (Score:3, Informative)
MOD PARENT UP (Score:2)
script.aculo.us? (Score:3, Informative)
Re:script.aculo.us? (Score:2, Informative)
Re:script.aculo.us? (Score:3, Insightful)
Anti-disclaimer: I don't have anything to do with the script.aculo.us guys, but as a Ruby on Rails developer it has served my needs just fine.
Re:script.aculo.us? (Score:2)
If you're interested in JS toolkits... (Dojo, etc) (Score:2, Interesting)
Its not the best known, but its one of the most promising toolkits in [very] active development. I've been involved (sort of -- following the mailing list) and its open source & very slick.
http://www.qooxdoo.org// [qooxdoo.org]
The 0.6 release is expected in the next day or so, and is a big jump over 0.5. The only area that is still a bit weak is the documentation, but there is a good group of developers working actively on getting that properly sorted for the next releas
Should have reviewed DWR (Score:3, Interesting)
Central idea behind DWR is it exposes methods of Java Beans over the web. Create a server side class and then call methods from javascript like this: MyBean.method(). It couldn't be simpler.
I have used DWR in my just released online version of Risk, called Grand Strategy [denizengames.com].
Erm... what about? (Score:2, Informative)
Kudos to Rico (Score:2, Insightful)
Looking over the packages listed here, I'm especially impressed with Rico. Single file used in conjunction with the prototype.js script. And a really excellent demo page:
http://openri [openrico.org]
Yahoo YUI Toolkit (Score:5, Informative)
Re:Yahoo YUI Toolkit (Score:2)
My Own Survey (Score:2, Informative)
Rico's newsgroup was great; I got (friendly) answers within hours, but I'm not exaggerating when I say the documentation was the worst I've ever seen. If I had more time to play around, I would have stuck it out and helped (their community is cool), but I'm on the clock and need simple working examples.
I briefly tried Atlas and was impressed with ease of use, but got hung up with bugs (it's beta, but will be a go
alternative (Score:1)
Other free famous scripts (Score:1)
1. script.aculo.us [aculo.us] : That have many effects include in it and is used in Ruby [ruby-lang.org]
2. script.aculo.us [xajaxproject.org] : An active library to help for ajax development.
Re:Other free famous scripts (Score:2)
*one issue. Doesn't appear to work on any window open as a modal dialog. One time I needed that I coded the ajax calls directly myself.
Documentation (Score:4, Insightful)
This stuff is really exciting, but until there is documentation, it is not worth mentioning at work.
Re:Documentation (Score:3, Insightful)
Dojo's [dojotoolkit.org] docs [jot.com] are very much hit-or-miss. Some features are pretty smoothly documented. Others are like navigating a trackless wilderness with no more than the sun and stars to guide you. Also, Dojo's annoying because it requires you to add non-standard attributes to your HTML in order to identify widgets. For example:
Re:Documentation (Score:2, Informative)
Dojo's widgets can be defined using a separate namespace, "dojo", so your XHTML will validate. As in: <button dojo:type="Button" dojo:widgetId="helloButton">Hello World!</button>
MJC
Qooxdoo (Score:3, Informative)
No one has mentioned magicajax.net ... (Score:2)
...and if you like your Python... (Score:2)
W3C Standard-based ones (Score:3, Informative)
The FormFaces [formfaces.com] OSS product is an entire XForms implementation done in JavaScript, running in the browser. You write your page in HTML with XForms markup, and FormFaces does the "HiJax" thing of re-writing it for you. You never need to use XmlHttpRequest, and you can interact with regular servers, RESTful services, etc., all via XML.
Another product that does this, in a slightly different way, is AjaxForms. I just found out about it, but it looks pretty good. AjaxForms uses some server-side components to do the translation from strict XHTML+XForms markup into Ajax (HTML4+JavaScript), but they claim it can work in PHP and Tomcat servers. Again, FOSS, and available at http://ajaxforms.sourceforge.net/ [sourceforge.net] [sourceforge.net]
I recently implemented dynamic forms for weblogs and wikis, and did it using Chiba [sourceforge.net], another FOSS product, that like AjaxForms does its conversion on the server, using Tomcat as a container.
The Orbeon folks have a nice blog [orbeon.com] that shows how to use XForms (their implementation, the Mozilla extension [mozilla.org], or any of the other above toolkits) to accomplish typical dynamic page tasks such as listing countries and ISO codes [orbeon.com], or resizing flickr [orbeon.com] (also via formsplayer [formsplayer.com].
help me out. (Score:2)
I mean, if you can't take 30 minutes to an hour (tops) to read a short book on AJAX concepts/examples then you really shouldn't be developing ANY web apps. Its not like this stuff is rocket science, or even a new idea/concept. How many years has this functionality been in IE? 5 or 6 years?
The larger i
Re:help me out. (Score:2)
Th
Unpopular AJAX library (Score:2)
I'd like to advertise my own, unpopular javascript library:
The ff javascript library [fforw.de]
A ultra lightweight (below 7k normal / below 3k gzipped) javascript library offering crossbrowser support for:
Php & js Ajax toolkit & Visual development (Score:2, Informative)
It comes with a visual development studio web application for point and click application development, and it's all open source.
I think there may be some similar proprietary products, but I don't think there are any other open source projects like it.
--
zeemu