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:
- Do less work.
- Bring the large portion of the web developer community who have come to rely on Prototype "into the tent".
- Get derivitives of Prototype, like Script.aculo.us, for free.
- Participate in a broad, open discussion of how to make JavaScript a more developer-friendly language.
References (1)
-
Response: Atlas and Scriptaculous working together...By just moving around some tags, I was able to get a Atlas + Scriptaculous demo running in about 30 minutes. I call it
Reader Comments (2)
"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.