Ajax seminar
Useful frameworks
I have compiled a list of frameworks that I find interesting and/or useful. Some of the frameworks are presented in more detail below. I have chosen not to include »fat client« frameworks such as AjaxTK/Zimbra, Backbase and Bindows, because they are a little different in my view, they try to recreate a desktop environment, and that’s not really what I’m interested in. Desktop environments have their place, and it’s not on the web.
Hover over the column titles for a definition.
| Framework | Widgets | DOM | XSLT/XPath | Effects | State | XHR | Documentation |
|---|---|---|---|---|---|---|---|
| Dojo | x | x | x | x | x | poor | |
| Rico | x | x | x | poor | |||
| MochiKit | x | x | x | good | |||
| Prototype | x | x | poor | ||||
| script.aculo.us | x | poor | |||||
| AJAXSLT | x | ok | |||||
| Sarissa | x | x | good | ||||
| DWR | x | good | |||||
| RSH | x | ok |
Dojo
Dojo is the most complete of the frameworks above, although it lacks in documentation. It has all the things you want, but in my opinion, Dojo tries to do too much. On the other hand, it comes in parts, so you can choose not to load the extra things, like data structure implementations and crypto.
The best things about Dojo are dojo.io.bind which lets you load data and chooses the best loading mechanism available transparently, and dojo.storage which can be used to save your applications state, it too chooses the best method available, for example Flash cookies if those are available, giving you 100K memory to play with.
Dojo also provides event handling and basic DOM abstraction. It has a packaging mechanism that let’s you divide your code into packages, which can be loaded dynamically when needed. This is also how the whole Dojo framework is deployed, you explicitly load a bootstrap file, which contains enough code to load the packages necessary for your application.
Dojo tries to do everything, but what good is it if you don’t document? Look at the documentation page it’s got a few half-baked tutorials and an API documentation where quite alot is marked as undocumented, and the rest is barely.
Also, have a look at dojo.io.bind, what a monster. A call to that function is like a whole application in itself. Everything can be done with it, load some data, update the state, parse the data, etc. These things should be separate operations, in my view.
MochiKit
MochiKit is partly a browser abstraction framework. It provides simplified ways of working with XHR, especially if it’s JSON data, and other asynchronous calls like timers. It has a good DOM abstraction library with event handling and all. I have written a whole application with MochiKit and Firefox and it worked in Internet Explorer without modification (this would probably have been the case if I used Dojo too).
Besides browser abstraction, MochiKit has a function library that provides useful functions that you might miss in JavaScript, and it provides some powerful iteration mechanisms. The fun thing about MochiKit is that it embraces powerful concepts from other environments like functional programming. It doesn’t try to make JavaScript into something else, just make it more powerful.
Prototype
Prototype is a part of the Ruby on Rails framework, but can be used separately. Its purpose is to provide browser abstraction. Its the base of other frameworks like Rico and script.aculo.us. I don’t care for it very much, but I know that many like it.
Finally
That was a lot, and it wasn’t all. Apart from this, the seminar contained a JavaScript primer, examples of XHR, a discussion on the back, reload, bookmarks-problem and examples of good sites.
There are some useful links and other things on the resources page, it’s in Swedish, though.
2006-11-21 at 22:32
Hi All Experts, I want to use AJAX (Asynchronous JAVA script with XML ). How can i Optimize the site SEO. as Java script and flash is not recommended by search engines. Any suggestion or help is welcomed. With Regards.