Prototype Sucks 2.0

Written by on December 29th, 2006 in Ajax News.

Another day, another article bashing the Javascript toolkit everyone loves to hate - Prototype. The complaints can be narrowed down to a few points:

  • “it breaks the ‘for in’ loop” - no it doesn’t - you were probably using ‘for in’ where you shouldn’t have. Javascript is a flexible, powerful freedom language, and its _okay_ if your framework uses that to the full extent. That means you and your development team need to be educated and aware of the ramifications of it if you want to play ball. The stuff that Prototype did to Object in earlier versions, btw, was a bit too much and has been removed in the latest versions. (related reading here)
  • “its too big” - eh, cache it, compress it on the server side, or use a stripped down version.
  • “its has no docs” - although I’m disappointed to see that Sergio hasn’t updated his excellent reference since May, there are still so many fantastic howto’s and tutorials written using Prototype. Plus the books out now that base much of their code on Prototype. One official reference doc somewhere would be very nice, however.

My main gripes right now with Prototype would be what looks like a low level of activity in the source and this doc project, and the lack of any good references on how to do solid TDD or BDD in Javascript (with Prototype, or otherwise I suppose). I’m aware of rspec clones in javascript, but what I’m missing is the big picture on how to integrate those tests into the main test suite and what to use for mocks and stubs. I want to be able to write the bulk of my JS tests in textmate, without having to start a browser or use anything like Selenium.

Source: Ajaxian
Original Article: http://ajaxian.com/archives/prototype-sucks-20

Leave a Reply

You must be logged in to post a comment.



Site Navigation