Weird Thoughts From Eric's Head

Tags - Categories : All | AJAX | BUSINESS | PERSONAL | PROGRAMMING | BOOK REVIEW

Surprise From Dojo, not what I was expecting

Lately I have been looking into Ajax frameworks to see what they have to offer. People always ask me what framework I use and I also say I use my own or prototype. Normally I get a blank stare when I respond with that. So I started to do research to find out what toolkits offer. Now this post is not about what frameworks have to offer there are plenty out there. They all say the same thing under a 100 words or less. Search Ajaxian.com, plenty of articles on it.

When I was doing my personal research, I saw something that blew me away. It was not the functionality of a framework, but the actual coding of the website itself. I ended up at the famous website of Dojo to see what they have to offer.

Whenever I go to a so-called "Web 2.0" site, I look at Firebug to see what is going on behind the scenes. The following screenshot is what I see when I open up the Dojo's start page in my Firebug console:
Dojo Firebug Screenshot

How many XMLHttpRequests does a page need to load it? There are 23 GET requests! WOW.... I was lost of what to say when I saw that. Now I did not look at what is happening under the hood, but all I know is that IE only can do two connections at a time, combine that with images, CSS files, and the page itself and you get some extra loading time in there. But that was only the start to my amazement. The following also just made me scratch my chin and wonder what the developers were thinking.

I start to take notes on the features so I can remember what the frameworks have. I click on the "see it in action" tab, and than I click on "effects demo" and than "view demo". I play around with the fade, move, and explode for awhile and get ready to jot down the URL for quick reference. I really do not want to click on multiple things to re-examine the functionality in the future. Plus if a person says “Can it do this?” I can just look up my reference and send them to the demo. Better to see it in action than in some documentation. Think it has a bigger impact seeing instead of believing it works.

I go to bookmark this page and than it hit me. Wait a minute! I can not do this everyday task of surfing. It appears they used a request to get the data for the demo. So how am I supposed to point back to this page? I searched around a little more and seems like I can not do it. HMMMMM....

Now Dojo has some very nice things in it. I point out the toolkit to people when they are looking an editor and other components that other toolkits lack. The thing that turns me away from the toolkit is the coding of the website.

My biggest pet peeve with the XMLHttpRequest object is the reinvention of website navigation. Why reinvent the frame/iframe? So if you are a developer looking to use Ajax on a webpage, make sure I can bookmark a page! If you want a nice framework, look into Dojo, just do not bookmark anything!



Eric Pascarello
Coauthor of Ajax In Action
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for building Dynamic Web Pages


Yet another instance of programmers going overboard with their favorite tool. Something I've learned from working on cars and computers is that there is a correct tool for every job.

Another instance: I think the PHPDoc.org site is generated using the phpdoc script itself. It's horrible to navigate.

p.s. navigation bar - 'BOOK REIVEW' ;)
LOL, Someone pointed that out a long time ago and I never fixed it. Whoops, thanks for pointing out my bad spelling!

What you're seeing here is what DOJO does in a development environment - it loads in all your widgets and templates that aren't in the build you're using. The idea is that when you're ready to make your code live, you compile in all of your widgets and templates into the dojo.js and avoid the calls you see above.

My guess is that
a) DOJO is always changing and their website is supposed to be reflective of the newest build changes so they don't want to recompile the website's build every time.
b) They don't want people to wonder why their copy of dojo.js differs from the one the DOJO website uses.

That is what I was expecting they were doing to not have issues with versions. It looks like crap to anyone that looks at the website for the component and sees this for the first time. Makes you wonder what they would be getting themseleves into with such a simple page with so many files! Eric
Hi Eric, Check out the DojoCompiler at sourceforge - it remembers which files a certain page required and groups them all into one file. It needs PHP to function though.. http://sourceforge.net/projects/dojocompiler


Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 7 + 2 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

TrackBack to http://radio.javaranch.com/pascarello/addTrackBack.action?entry=1155826993787