« EntLib 2.0 assemblies can't be hosted with SQL Server 2005 | Main

Atlas incompatible with Prototype

This evening I tried to "ajaxify" an ASP.NET DataGridView. Scott Guthrie wrote a great tutorial on how to do this. While following along, I discovered that the Atlas ScriptManager blew up some of my existing JavaScript. Specifically, anything I had that was relying on Prototype got hosed.

I headed over to the ASP.NET forums to investigate. After some back and forth with Bertrand Le Roy, which you can find here, I learned why:

There is no official documentation [for Prototype] that I could find, and we just can't look at the source code for obvious legal reasons. 

And later...

the design decisions we have to put into Atlas are often far-reaching as there are many constraints that may not be initially visible and that may not exist for other frameworks (like consistency with the .NET framework wherever possible, MSN using our stuff, etc.). So even if it was possible for us to stand on top of things like Prototype, it would probably not fit our needs.

If you pull up AtlasRuntime.js and Prototype.js, you will see that they both are trying to do the same thing. (Note: don't do this if you work for Microsoft or you could apparently get into trouble!) What they are both doing is extending some of the built-in objects in JavaScript to make them behave more like the OO languages we are used to. (By the way, Chapter 3.5 of Ajax in Action has a very nice treatment of how you extend JavaScript using prototypes.)

I don't have much of a point with this post, except to say "What a damn shame". The Atlas team had to do a lot of work that was already done in the open-source community, and they had to do it all without peeking! I wonder if anyone seriously considered the alternative of building Atlas on top of Prototype. This would have had four advantages as I see it:

  1. Do less work.
  2. Bring the large portion of the web developer community who have come to rely on Prototype "into the tent".
  3. Get derivitives of Prototype, like Script.aculo.us, for free.
  4. Participate in a broad, open discussion of how to make JavaScript a more developer-friendly language.
I am hoping to have some good conversations with the Atlas team at Mix06 about this issue. In the meantime, don't try to run Prototype and Atlas simultaneously!
Posted on Thursday, January 26, 2006 at 06:20PM by Registered CommenterPortman Wills in | Comments2 Comments | References1 Reference

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (1)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments (2)

I stumbled across your post looking for something else, but I spotted an error I'd like to point out:

"Note: don't do this if you work for Microsoft or you could apparently get into trouble!"

Bertrand is wrong to think this. Prototype is released under the MIT license, and so, like any BSD or MIT licenced code, anybody is free to futz around with to their heart's content regardless. It's all but in the public domain.
May 27, 2006 | Unregistered CommenterKeith Gaughan
It's a shame that because of some legal issues things cannot develop as fast as would be possible. Atlas not being able to work with prototype is very bad.
June 4, 2006 | Unregistered CommenterEagle

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.