It's not about technical side-by-side comparisons, but about how to "think in jQuery" and "think in prototype."
I used Prototype for several years, and jQuery is slightly less than a year ago when I started to do a lot with it.
With Prototype, I can write pretty elegant code; my boss once examined a large amount of my code and noticed that this was the first Javascript that he ever enjoyed reading. I understand - and I understood from the very beginning almost - almost instinctively that I am trying to make a prototype and know how to work with it.
My jQuery code is much larger, how can I put this, "workmanlike". It seems to me that I'm fighting jQuery at every turn. I have to (try) force myself to adhere to this and not go down to the "native" JS, where I know that I could bash clear cross-browser code faster. Working with him more makes him more, no less, disappointing.
This is not (or at least not quite) a lack of familiarity with the available features. I often know that I need to use this function, but the way it is used seems really bizarre. This is usually a sign that I am coming to something completely wrong way.
The more I think about it, the more I think I'm trying to use jQuery in a prototype.
There must be some kind of blinding flash of light that is not yet with me. Especially if you have worked a lot with both, what do you consider the most fundamental differences in approach? How do you need to customize your thinking when moving from one to another?
Don't be afraid to say blindingly obvious, because it could just be a blinding flash ...
source
share