Programming Microsoft ASP.NET 4 - Dino Esposito [1]
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.
Because of space constraints, I didn’t cover some rather advanced aspects of ASP.NET customization, such as expression builders, custom providers, and page parsers. For coverage of those items, my older book Programming Microsoft ASP.NET 2.0 Applications: Advanced Topics (Microsoft Press, 2006) is still a valid reference in spite of the name, which targets the 2.0 platform. The new part of this book on principles of software design is a compendium of another pretty successful book of mine (actually coauthored with Andrea Saltarello)—Microsoft .NET: Architecting Applications for the Enterprise (Microsoft Press, 2008).
Who Should Read This Book?
This is not a book for novice developers and doesn’t provide a step-by-step guide on how to design and code Web pages. So the book is not appropriate if you have only a faint idea about ASP.NET and expect the book to get you started with it quickly and effectively. Once you have grabbed hold of ASP.NET basic tasks and features and need to consolidate them, you enter the realm of this book.
You won’t find screen shots here illustrating Microsoft Visual Studio wizards, nor any mention of options to select or unselect to get a certain behavior from