Does Ajax mean the evolution of a new breed of Web developer?
The Usual Suspects
As with any good Web application, an Ajax application should maintain a clear separation among the content of the page, the rules for presenting the content, and the code that provides for user interaction with the page. In traditional Web applications, all three of these aspects—the content, presentation, and code—are all present in their entirety when the page is initially loaded. What Ajax brings to the table is the ability to make everything dynamic. New content, new presentation rules, and new code can be sent to and from the client, allowing for much more complex Web pages to be created. Instead of having to encapsulate a single set of functionality into a page, and then have the user redirected to a different page when a new set of functionality is required, you simply can load new rules and content into the existing page when it is needed. This creates a far more fluid experience for the end user, because refreshing the entire page is a time-consuming, disorienting experience.
Keeping an Eye on the Wire
Tools for Ajax Development
One type of tool that has always been of some value for debugging Web applications, but is now vital for Ajax applications, is the HTTP proxy. Ajax applications consist of a client part that exists in the Web browser, and a server part that exists on a Web server, and the two communicate using the HTTP protocol. Being able to listen in on this communication is vital to debugging an Ajax application, and there are a number of tools to do so. Any HTTP proxy will let you observe the traffic, but there are some proxies that have been specially designed for debugging web applications. One such proxy is the Fiddler HTTP Debugger . Fiddler HTTP Debugger sits between the web browser and the web server, intercepting the requests and responses. The tool allows you not only to view the contents of the requests and responses, but to alter the contents. You can manually alter the contents of either the requests or responses, or you can use the built in JScript .NET event-handling engine to add in automated rules for altering the data. Fiddler has a rich API, and is extremely extensible, and so it should be a part of any Ajax developer’s toolkit, if they use Windows of course. There are also many open source HTTP Proxies, such as Spike Proxy , but Fiddler’s tight integration with Internet Explorer makes it very useful.
Microsoft Fiddler HTTP Debugger
Microsoft Script Debugger
Microsoft Developer Toolbar for Internet Explorer
Mouse Over DOM Inspector
Regardless of what new technologies come and go, the fact remains that more and more intelligence is being moved from the server side of things to the client side. Traditionally, the real processing power happened on the Web server, and the client acted as a means to gather and display information. Now with the Ajax trend, and the tendency towards rich Internet applications, we are looking at a change in the way that Web developers have to work. The separation between the client and server is becoming more complicated, and so a new breed of Web developer that can understand the entire life cycle of the Web application, from both the client and server perspective, will emerge from the dust and the true vision of the Web 2.0 movement will slowly be realized.
- Introducing Fiddler: http://www.fiddlertool.com/fiddler/
- Immunity: Free Software: http://www.immunitysec.com/resources-freesoftware.shtml
- Venkman Homepage: http://www.mozilla.org/projects/venkman/
- Scripting Debugging in Internet Explorer: http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx
- Mouse Over DOM Inspector: http://slayeroffice.com/tools/modi/v2.0/modi_help.html
- Web Development Bookmarklets: http://www.squarefree.com/bookmarklets/webdevel.html
About the Author
Jordan Frank is a hybrid software engineer and hacker who has been working with the Internet in various shapes and forms since the early days of ISPs in the mid 90s. He is a lead developer at www.ebusinessapps.com and is an expert in rich Internet applications, AJAX, Service Oriented Architectures, and security. Jordan maintains a blog at http://blogs.ebusiness-apps.com/jordan/.