The great thing about being a Microsoft MVP is that you are always out to learn new tools, technologies, tips, and tricks, in anticipation of being asked a technical question on any forum regardless of what your competencies actually are. Not only does gaining knowledge benefit MVPs themselves; it also lets them share that knowledge, expertise, and experience to the developer community at large. I simply love doing it, and I am glad that I too am finally blogging about AJAX and Atlas after so many of my fellow -MVPs and -bloggers around the world have already done so. I hope to blog about Atlas, as I have understood it, in a series of posts.
You might have been hearing and reading a lot about Web 2.0 lately. If you haven't heard about it, and you apparently live in a cave (as the saying goes) check out an indepth article on it here.
AJAX is all about JavaScript as it involves using the XmlHTTP object built into your web browser, and has been a part of the browser since 1998. I dont think a lot web developers would want to get down to writing AJAX apps using directly the XmlHttp object, and would instead rely on pre-built libraries that leverage XmlHTTP. If you happen to be an ASP.NET developer (and you probably are), you need to get hold of Atlas, the client and server-side libraries and controls for building AJAX applications from Microsoft. Since Atlas has not been finally released, you might have to do a lot of JavaScript coding yourself. The thing with working with JavaScript is that when you are getting down and dirty writing code in a language that you usually do not program in, and reluctantly learning many of the details of client-side scripting that you are not accustomed to or atleast did not care about previously, you are bound to get an error once in a while. Many times, the line of code that is marked as being the culprit for the error is not actually the one that has something wrong with it. Since you might not get a lot of Intellisense and debugging support in the VS IDE for client-side scripts (although Microsoft is working to change that in future), there are a couple of things that I recommend you do when you encounter a JavaScript error.
Pray that you are able to solve the problem within the next hour. [Optional]
Go and have a glass of water. [Mandatory]
Take a deep breath and relax. [Mandatory]
Empty your web-browser's cache. [Optional]
Go over your script's code, one statement at a time, to ensure that you did not mis-spell anything. Check variable and function names. Do not assume that your typing skills are excellent. You could be great, but that changes when you are typing JavaScript code. DO IT! [Mandatory]
REMEMBER, JavaScript is case-sensitive, so textbox is not the same as textBox. [Mandatory]
Use the JavaScript 'alert' function judiciously to display values in a browser dialog box, to ensure variable values are what you think they are at a particular point in your code. [Mandatory]
There is NOTHING wrong with the Atlas client libraries (*.js files inserted into the project when an Atlas website is created); so if you get an error at, lets say, line no. 1554, check to see if you have closed all Atlas tags correctly. [Mandatory]
IE would do just so much to let you know the line of code that has the error. It is highly likely that the line marked with having the error is perfectly alright. Check to see if that line in followed by a function-call statement. If it is, go to point no. 5 and start debugging that function. [Mandatory]
REMEMBER, AJAX/Atlas involves calling web services asynchronously. Every web service call must also specify a call-back function, which is executed when the service finishes executing and returns data back to the browser.
When you get an error on the JavaScript statement calling a web service, be sure to debug the call-back function (the function that executes once the web service returns the results of its execution). [Mandatory]
There are more indepth tutorials and technical stuff that I would cover in my future "Atlas at last" posts.
Nice stuff of the combination of Optional and Mandatory. I as the student request you to manage any presentation over AJAX power in the NED user group caz you take too long time to present any presentation over any new technology. We are waiting for your acknowledgement.