I have settled on ASP.NET AJAX 1.0. Why you ask? Well for many reasons! One, it is written well. Lacks all the visual effects, but seriously, who needs those? It is fast, as it uses JSON, and that is a MAJOR surprise, as I figured M$ would be all over using XML. Secondly, if you pair it up with PHP for Microsoft AJAX it just flat out works nicely and costs little effort to write scripts for!
I wrote a few sample scripts using it in less than 5 minutes! 5 minutes!! I cannot stress that enough. I was amazed at the type of complexity I could write in just a few minutes of using it. Now, I am not a "big" M$ fan, but I am willing to give credit when due, and they deserve credit for this. I am truly pleased with the fact it works in Firefox, it works in IE, and it probably works in Opera (though I haven't tested it). It has files for all languages, to handle currencies, dates, etc. Totally amazing.
I have so many plans on how to use this to perform more advance functionality in several of my applications and best of all, I didn't have to write my own XmlHttpRequest methods.
Today was a great reminder of a known helpful tip. When you get heavily involved with a project and you have been working on it non-stop for several weeks, it really pays off to set a day that you do not work, think, or even consider the project you had been working on. Why? Because a step back will likely give you a new perspective on the project (Tip #1).
The bridge I had been working on for months, has had three known issues all that were complicated in various ways, or at least that is what my brain told me. For the past few days, I have been working on a different project and thus my mental focus was not even close to this bridge application. Today, I started to work on the remaining issues and things just snapped. I knew exactly where to look to find the communication issues and I knew exactly what was necessary to solve them. I got through one of my biggest issues (which had 5 minor issues attached to it) throughout the morning. Come afternoon, I was working on the second and third problem (of which I had a meeting about with two other developers) and I got really close to solve the second issue, but then my brain was back to playing tricks. It just decided it couldn't figure out the issue entirely.
That was fine by me. Within the first 30 minutes of our meeting, one of the developers had it solved and I had the code written and proven to work. Another 40 minutes later, the final issue was resolved. This is TIP #2. A look from a second or third developer will eventually leave you with less headaches, as they will see what your brain has decided not to see. It has been proven that your brain can play tricks on you. The code you are seeing with your eyes might not really exist, but your brain knows that is what you were expecting to see, so that is what it presents.
I forget the technical term for this behavior, but you can easily read about it in any psychology book. Most of the examples use patterns, with missing pieces and your brain magically fills in the piece that was missing. Finally, Tip #3, is do not forget Tips #1 and #2! I cannot stress that enough. Without the first two tips, you will eventually break down. As a programmer, cope with asking others to look at your code and determine what is wrong. It does not mean you are a bad programmer.
I am searching for a good ajax library to use in several of my applications. I have heard about Prototype, Mootools, Dojo, etc but which one does the trick and does it well? I tried Dojo a while back and never really got the hang of its layout. Connecting events to the controls felt awkward and not very clear. I have seem demos of Prototype and Mootools, and though they look cool, I have not had any experience with them.
So why don't I just write my own for my upcoming applications? Well the difference is, the upcoming applications are in PHP. PHP does not have nice ways of serializing directly into XML, so that is less of a reason for continuing my current approach. Plus, with it taking 5 seconds to run, it kinda seems like its slow. I visit many sites whose Ajax runs much quicker than that.
So let's hear it! Tell me which Ajax framework works best for you, what are its' strengths, its' weaknesses? Leave nothing to the imagination.