Forum Moderators: open

Message Too Old, No Replies

JavaScript Toolkits vs. Home Built Code

Which ones do you like? What are they good at? How do they suck?

         

XtendScott

6:57 pm on Sep 20, 2007 (gmt 0)

10+ Year Member



I am looking for some expieriences or suggestions on Javascript Toolkits.

1. Which ones do you like.(dojo,jQuery, ExtJs, ProtoType,etc)
2. What are they good at?
3. What are they NOT got at?

I have been creating custom scripts per site/app or even per page if it is not going to be needed elsewhere. I can understand some advantages of the toolkits for visual enhancements and such but each site seems to require different needs so I provide custom solutions per need.

How have the toolkits made it easier or better for you?

Fotiman

7:22 pm on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I prefer the Yahoo UI Library. I've read good things about jQuery, but haven't had an opportunity to put it to use.

What is the Yahoo UI Library good at? Lots. But I especially love its Event handling and DOM Utilities. While some other utilities will give you the ability to add an effect quickly, the YUI will give you the ability to create your own effects and customize them much more.

What is it not good at? If you just want a quick drop in animation effect, this might require more work than some of the other libraries. But ultimately, I think you'll have more control over the effects with the YUI.

XtendScott

1:45 am on Sep 21, 2007 (gmt 0)

10+ Year Member



what about the attached code, isn't there quite a bit of linked code for the initial download with Yahoo?

vincevincevince

2:20 am on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



At the end of the day, compared to a good javascript developer, a toolkit will always produce slower downloads and less flexibility regarding the precise end result obtained.

On the other hand, if your developer's javascript leaves much to be desired, a toolkit will enable the production of good looking functional code which he would have otherwise struggled to produce robustly.

Fotiman

1:37 pm on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




what about the attached code, isn't there quite a bit of linked code for the initial download with Yahoo?

I guess that depends on what your view of "quite a bit" is. The files are minified (removing extra whitespace and comments), so they're not THAT big. The latest version (2.3.1) of the yahoo-dom-event.js file (which is the one I find most useful) is about 29.6 kb. But you're also encouraged to configure your server to serve compressed versions of the files (or if you use the Yahoo-hosted files, they're already compressed). And once the files have been downloaded once, they'll be cached, so this is minimal in my opinion.

[edited by: Fotiman at 1:39 pm (utc) on Sep. 21, 2007]

cmarshall

2:16 pm on Sep 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I generally like to "roll my own." There are a few reasons:

1) EVERYTHING I write is XHTML 1.0/Strict or 1.1. I also validate WAI AAA on EVERYTHING. To add insult to injury, I like to ensure that dynamically rendered content validates (I use iCab [icab.de], and make sure every page "smiles.") Very few libraries out there produce code that meets these standards. Even Scriptalicious and Google Maps set off warnings.

2) I don't usually get fancy, and when I do, my site has to degrade extremely well for less capable browsers, including ones with JS and cookies disabled. This means that I write code that either does not depend on the JS Framework for the majority of the content, or I provide a robust HTML alternative.

3) The "Iceberg Syndrome." You need capability B, but you need to load all the supporting code for A-Z. Since so many of these frameworks were not written by professional software engineers, they can be a bit, shall we say, "crufty." I really don't like Rube Goldberg devices running my critical sites.

To be fair, you are starting to see JS and PHP libraries that have been developed according to real Software Engineering standards, but these are often developed by people who are used to writing with compiled [research.att.com] and semi-compiled [java.com] languages, and they seem to be under the illusion that JS is the same as these languages.

No, it's not. [webmasterworld.com]

It has both things that are better than these languages, and things that are worse. The rules change. Even though it looks like Java or C++, it's way different. I've spent the last couple of years running into these differences. It has been an education.

I have been using the Google Maps API [google.com] extensively lately, and it seems to be a pretty well-written implementation of a large-scale "Web 2.0" JS framework. ScriptaLicious [script.aculo.us] is also pretty nice. I use it to add some "zing" to some of my stuff.

Just my $0.02.