In the fall of 2004, at a popular software conference I realized how all major component
vendors were advertising their ASP.NET products using a new word—Ajax. Only a few weeks
later, a brand new module in my popular ASP.NET master class made its debut—using Ajax
to improve the user experience. At its core, Ajax is a little thing and fairly old too—as I
presented the engine of it (XmlHttpRequest) to a C++ audience at TechEd 2000, only four
weeks before the public announcement of the .NET platform.
As emphatic as it may sound, that crazy little thing called Ajax changed the way we approach Web development. Ajax triggered a chain reaction in the world of the Web. Ajax truly represents paradigm shift for Web applications. And, as the history of science proves, a paradigm
shift always has a deep impact, especially in scenarios that were previously stable and consolidated.
We are now really close to the day we will be able to say “the Web” without feeling
the need to specify whether it contains Ajax or not. Just the Web—which has a rich client
component, a made-to-measure layer of HTTP endpoints to call, and interchangeable styles.
Like it or not, the more we take the Ajax route, the more we move away from ASP.NET
Web Forms. In the end, it’s just like getting older. Until recently, Web Forms was a fantastic
platform for Web development. The Web, however, is now going in a direction that Web
Forms can’t serve in the same stellar manner.
No, you didn’t pick up the wrong book, and you also did not pick up the wrong technology
for your project.
It’s not yet time to cease ASP.NET Web Forms development. However, it’s already time for
you to pay a lot more attention to aspects of Web development that Web Forms specifically
and deliberately shielded you from for a decade—CSS, JavaScript, and HTML markup.
In my ASP.NET master class, I have a lab in which I first show how to display a data-bound
grid of records with cells that trigger an Ajax call if clicked. I do that in exactly the way one
would do it—as an ASP.NET developer. Next, I challenge attendees to rewrite it without inline
script and style settings. And yes—a bit perversely—I also tell anyone who knows jQuery
not to use it. The result is usually a thoughtful and insightful experience, and the code I
come up with gets better every time. ASP.NET Web Forms is not dead, no matter what
ASP.NET MVC—the twin technology—can become. But it’s showing signs of age. As a
developer, you need to recognize that and revive it through robust injections of patterns,
JavaScript and jQuery code, and Ajax features.
In this book, I left out some of the classic topics you found in earlier versions, such as
ADO.NET and even LINQ-to-SQL. I also reduced the number of pages devoted to controls.
I brought in more coverage of ASP.NET underpinnings, ASP.NET configuration, jQuery, and
patterns
and design principles. Frankly, not a lot has changed in ASP.NET since version 2.0.