Dojo vs. Prototype

Recently I had the chance to dip into some popular Javascript framework and tried out Dojo and Prototype. Even I only scratched the surface here is a little comparison from the experiment.

What are common between them:

Both Dojo and Prototype are Javascript framework or libraries. They simplifies the work of the developers by hiding the nasty stuff such as browser compatibility checking and providing simpler API calls to deal with the DHTML components.

Both of them support Ajax and make it easier to use.

Even Ajax is their selling point, both of them provide much greater capacity for writing other Javascript functionalities and not re-inventing the wheel.

Both of them encourage the clean programming sytax in a way.

Their differences:

Since Dojo is a toolkit, it contains a lot more libraries such as animation or flash. On the other hand, Prototype is closer to the ground and often used as the actual codebase to develop a library or toolkit. For example, Scrip.aculo.us is developed on the base of Prototype.

Based on the last point, Dojo has a much bigger package versus Prototype is essentially just one Javascript file.

Dojo appears to have better documentation but the Prototype community is working on creating better documentation.

My take on them:

Using a framework can make some work simpler but they may also cause other issues if you are not committed using them. That being said, both of the frameworks are nicely developed and useful. I guess the choosing of one over the other is based on where and how they will be used.

If I have a website that use some Javascript in a limited matter, I’ll definitely consider using Prototype. The main advantage of it is its small size and flexibility.

If I were to develop something that heavily relies on Javascript and most Ajax driven, Dojo may be a good candidate. With its widely range of widgets out of the box, it is possible to throw some fancy stuff together in a relatively short time.

This entry was posted in my 2 cents. Bookmark the permalink.

2 Responses to Dojo vs. Prototype

  1. Joshua says:

    Dojo can be used for small projects too if you just used the Core package

  2. Byju Joy says:

    Interesting. Prototype.js is light weight and easy to learn.

Comments are closed.