Tuesday, December 18th, 2007

DOMAssistant 2.5 released – Making a run at the the major JavaScript libraries

Category: Ajax, JavaScript

Robert Nyman has his eyes set on providing a JavaScript library that can hold it’s own against the major players. He just announced the release of DOMAssistant 2.5 with enhancements that he feels are on par with other libraries:

With this release of DOMAssistant, I feel that it can seriously compete with the major JavaScript libraries on the market. It has a very easy syntax to select or manipulate elements, and with the core functionality anyone needs, without having to worry about web browser differences, the compressed version with all modules included weighs in at a mere 6kb (Gzipped). If Gzipping isn’t an option for you, the compressed version lands at 21kb.

This release has a number of new features:

  • Full CSS1-3 selector support
  • New AJAX methods: load and get
  • Enhanced performance and extra checks for memory leaks
  • XPath Support
  • DOMAssistant now creates its own scope to make use of private properties

Also, in terms of code quality Robert has taken the extra step to ensure that the whole library is JSLint validated.

The main purpose of DOMAssistant is to provide a solid foundation to build upon without all of the extras sometimes included in other libraries. As such, DOMAssistant focuses on:

  • Element selection (through CSS selectors or enhanced methods).
  • CSS handling (adding and removing CSS classes).
  • Event handling (adding and removing events).
  • Content manipulation (add or remove elements).
  • AJAX interaction (getting content from other sources, and adding it to the document).
  • DOM loaded (calling functions when the DOM is loaded, as opposed to the document with all dependencies).

While Robert certainly has a big task ahead of him to make up ground on libraries such as jQuery, Prototype or Ext, it seems he’s heading in the right direction and DOMAssistant may appeal to those folks looking for a convenient and lightweight method of using JavaScript without all of the extra fluff.

More information can be obtained about this release here.

Posted by Rey Bango at 7:00 am

3.5 rating from 37 votes


Comments feed TrackBack URI

I read the blog page on DomAssistant. What would be the 2-line answer to developer X as to why he should consider using DomAssistant, where, say, he’s using Prototype or JQuery? What is the value proposition to developers over those 2 libraries? I’m having a hard time determining the answer to those from the blog, and I’d like to make a more educated decision about DOMAssistant.

Is it the lightweightedness? If so, I see value in the mobile arena, but on a standard page, these libraries get cached so over the long-term of an intranet or internet site it’s less of an issue.

Is it the API elegance/friendliness? If so, I think it might have been worth taking the existing libraries and a’la Jack Slocum, getting your API wrappers to work on top of them.

Again, I don’t doubt that its an excellent library, I just want to know what I’m missing if I choose to stick with what I currently use….

Thanks in advance

Comment by Dov Katz — December 18, 2007

I think it’s meant to form a light-weight basis for your own library. This could make sense for people who want to develop their own library syntax (as a wrapper around domassistant), or for highly specialized web apps that need a more specific library than jquery or prototype.

Comment by Joeri — December 18, 2007

Or – if you intend to use jQuery with with Adobe AIR and can’t because of the restrictions to the eval() function – DOMAssistant could provide to be a good alternative.

Comment by mrmass — December 18, 2007

Not sure about that run on the major libraries, maybe it was just sarcasm. When you really want a minimal modular base for your own framework, Base 2 seems to be the best choice because it runs even on the oldest browsers, the code is fantastic, it provides inheritance and includes a lot of helpers extending native javascript behaviour (similar to MooTools or Prototype but without extending native prototypes).

MooTools works great with AIR btw., I already saw some nice animations in AIR apps using MooTools Fx :D

Comment by Harald — December 18, 2007


Very valid questions. First, I’d say that whatever JavaScript library one prefers, I think it might be just a tad naive to think one library will be the perfect option in any context and situation. Most JavaScript libraries out there do compete, but also complement, each other.

To make the case for DOMAssistant:
– Lightweight.
– It contains the features people needs in most projects, without the overhead over sometimes superfluous methods.
– As opposed to, for example, jQuery, the DOMAssistant CSS selector syntax exactly matches the W3C syntax. No need for anyone to learn a certain JavaScript library’s syntax, instead learn the standardized approach from other existing technologies.
– Very easy syntax. While, for example, the Events module is namespaced under DOMAssistant (DOMAssistant.Events), you don’t need to use that tedious syntax to use it. Instead, it hooks into the DOMAssistant core, so you can use it on any element, like this: $(“container”).addEvent(“click”, functionToCall);

At the end of the day, though, I want people to use what they’re happy with. If you love jQuery or Prototype, by all means, use it. But whether its DOMAssistant or any other JavaScript library, I think you should know about the options, and sometimes consider that other libraries might be more suitable in certain scenarios.

Comment by robnyman — December 18, 2007

I gather from the blog that the CSS selector syntax in DOMAssistant is slightly different than the W3C. Particularly with the (“#id”) syntacies.

Comment by Jordan — December 18, 2007


Would you like to elaborate on that? The syntax for CSS selectors is exactly the same as W3C, although it also offers a way of referring to IDs without the starting # (the effect of this backwards compatability, as mentioned in the post, is that if you were to want ALL the elements of a certain tag in the entire document, there’s a slight twist to it, where I discuss the pros and cons in my blog).

Comment by robnyman — December 19, 2007

Good to see some of the lesser known frameworks get some press. Diversity inspires, and having access to more tools, allows you to make better decisions, when choosing the right tool for the job at hand.

Comment by Morgan Roderick — December 19, 2007

Leave a comment

You must be logged in to post a comment.