Home > Microsoft .Net Development Tips > ASP.NET Development > Ajax programming: Five tips for getting started
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ASP.NET DEVELOPMENT

Ajax programming: Five tips for getting started


Brian Eastwood, Associate Editor
05.02.2006
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Whether Ajax programming spells the end of the traditional Web application as we know it, or merely offers a way to enhance those apps, it is safe to say the technology is not going anywhere.
More on Ajax programming
Ajax programming: The what, how and when examines where Ajax development has come in the year since the term has been coined, how and where Ajax should grow and what type of UI does, and does not, work with the technology.

Most experts, whether they focus on .NET or Java, commercial products or open-source endeavors, agree that the best step forward with Ajax is a small one.

SearchVB.com recently asked Eric Pascarello, co-author of the book Ajax in Action and an expert on both .NET and JavaScript, what developers should take into consideration when they want to commence Ajax programming. Pascarello offered five tips.

Start small, then review your progress. Rather than conducting a complete Ajax overhaul of your app, Pascarello said, "Start with a double combo or an AutoComplete component and work your way up from there. That will give you a good feel on how your users handle the changes and also gives the rest of the developers on your team time to learn the new architecture."

Don't always rely on the server. If users get chunks of data from the server that do not need refreshing, then build your app so that static data caches on the client, Pascarello recommended. To do this right, you'll have to test your app on a variety of security levels, browsers and operating systems, he added.

Make sure the server can handle the load. Single Ajax refreshes are smaller than the typical http refresh, but if dozens of users are performing the same function, that's a lot of pressure on the server. As an example, Pascarello cited 100 users typing 10-letter words into an AutoComplete field. "[T]hat can be 1,000 requests in a short period of time," he said. "Just because it is [a] small [request] doesn't mean it still cannot cause the server to come to a crashing halt."

Let users know something is happening. With Ajax, application refreshes are silent -- a page's URL does not change once the information has been updated. As a result, users expecting a new URL, as they would see in an app making a full http request, are liable to click a button or icon several times, convinced that will bring about the intended result faster. Users need a visual cue that the refresh is in progress, Pascarelo said. "It can be as simple as a line of text or a loading image," he said.

Above all, know how Ajax programming works. The "x" in Ajax stands for XMLHttpRequest, which lets a Web app send http requests to the server without refreshing an entire Web page. That, combined with DHTML, gives Ajax its rich GUI capabilities. "See how it works at the basic level. Without the basic knowledge of this, you cannot architect a good solution," Pascarello said.

A good starting point in a developer's Ajax programming education effort is our Ajax Learning Guide. This resource offers a variety of articles and tutorials about Ajax, including Atlas, Microsoft's upcoming tool for blending Ajax and ASP.NET technology.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
ASP.NET and Ajax development
How to use jQuery to solve Javascript browser compatibility problems
Silverlight, Ajax components require different approach to UI
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Internet Explorer 8 beta's development tools add source visualizations
Microsoft PDC gives a taste of Windows 7, Visual Studio 2010
Widgetbox provides good example of how to use Facebook Developer Toolkit
VBScript Tutorial
Ajax Learning Guide
Mainsoft introduces .NET-to-Java translation tool
Ajax.NET Professional retired

ASP.NET Development
How to use jQuery to solve Javascript browser compatibility problems
How to write an out-of-browser Silverlight 3 application in 3 steps
Silverlight 3 beta SDK download lets developers try new RIA features
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
VBScript Tutorial
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Ajax  (SearchWinDevelopment.com)
Atlas  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts