What This Book Is About


This book is a collection of ASP.NET recipes that aims to help you quickly and efficiently solve many of the day-to-day problems you face developing web applications with the .NET platform. Our recipes run the gamut from simple coding techniques to more comprehensive development strategies that even the most experienced ASP.NET programmers will savor.

More than a compilation of tips and tricks, the ASP.NET Cookbook solves real-world programming problems and is rooted in our experience as professional programmers who have designed and built richly functional web-based projects for a variety of corporate clients . We think we know the kinds of problems that you face, and we aim to help you solve them.

The ASP.NET Cookbook also contains dozens of code examples ranging from relatively simple 10-liners to comprehensive multipage solutions. Without solid and complete working examples, it's difficult to make an informed decision about whether an approach is the right one, or whether you should be looking elsewhere. We are convinced that reading good example code is the best path to understanding any development platform, so we've included lots of it and commented our listings generously to help you follow the logic.

The ASP.NET Cookbook is written in classic O'Reilly cookbook style to focus directly on problems you face today or are likely to face in the future. Using a problem-and-solution format, we make it easy for you to skim for a near match to your particular problem. We have pared down the headings to a bare minimum so you can quickly assess whether a recipe is pertinent.

Many of us occasionally browse through cookbooks looking for new recipe ideas or exploring the nuances of a culinary style. Similarly, we hope you find this book sufficiently interesting to browse, because in many respects it is as much about software techniques and methodology as it is about ASP.NET. For example, we offer a full course of error-handling recipes because we believe the topic is important to our audience and there just isn't enough information about it in general circulation. We could have restricted our discussion to page-level error handling, but that seems inadequate to us. Instead, we prefer to help you deal with error handling at the application level, a more difficult subject but ultimately more useful to serious developers. We have already done the heavy lifting on this and many other important subjects so that you don't have to.

From our point of view, the complexity of web-based development projects is now equal to that of traditional large-scale software development where teams of specialists ” architects , developers, project managers, designers, and the like ”carry out a thoroughgoing development process. This is certainly not news to the many professional developers and others who have been working on Internet team development projects since early DARPA-NET days. What is new is that ASP.NET (and .NET in general) raises the bar for those in the Microsoft camp who consider themselves professional Internet developers but have yet to suffer the slings and arrows of improperly checked-in code, lack of coordination between designers and programmers, drifting project focus, mismanaged risks, and the host of other distractions that team development can bring.

The increased complexity of web projects has direct ramifications in our ASP.NET coding techniques and the organization of this book, and leads directly to some of the recommendations we make. For instance, we believe strongly in using the code-behind feature of ASP.NET to separate server-side code from the user presentation (HTML and content), because this approach allows developers, web designers, and information architects to work independently and concentrate on what each does best. Thus, every recipe we offer consistently splits the code and UI into separate files. There's a small price to pay for the reader who is attempting to decipher the relationship between the two and might prefer to see them bunched together for sake of readability, but we think their separation is worth the price. This approach also supports team development, where the separation of code and content is absolutely essential to good development practice.

Code reuse is another practice that we hold near and dear, and we've gone to some lengths to illustrate its application in ASP.NET. For example, Chapter 4, includes a recipe that shows how to reuse a code-behind class with another .aspx file to provide a different user interface. This is done without any additional coding. As another example, Chapter 3, includes a recipe that sets the focus to a specific control when a page is first loaded, something that could easily have been accomplished by including some simple JavaScript in the page's HTML. However, we take a different tack by programmatically generating JavaScript client-side code. The reason stems from the type of development work we do, where we are constantly under the gun to quickly generate high-quality code, the ultimate in "short-order cooking." As such, we are constantly looking for ways to reuse code. By creating a forms library, complete with custom classes that can programmatically generate JavaScript, we are able to build custom forms with a few calls to the library. It's an approach that has proven highly successful for us, and we felt it was important to provide you a glimpse of it. This is just one of many "reuse-oriented" approaches that you'll find in this book.

ASP. NET Cookbook
ASP.Net 2.0 Cookbook (Cookbooks (OReilly))
ISBN: 0596100647
EAN: 2147483647
Year: 2006
Pages: 179

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net