In this book I have attempted to paint broad strokes by showing you how to design, develop, and deploy multilayered web applications in as close to a real-life development scenario as possible. You’ll start by learning how to set-up and structure your development and test environments using multiple virtual machines. With virtual machines there’s no need to own a rack of computers to perform realistic testing. You then learn how to create complex solutions in Visual Studio. By the term complex solution I mean a Visual Studio solution that contains multiple subprojects. Following this you’ll proceed layer-by-layer starting with the database and work your way towards the Web layer. Along the way you’ll learn how to create database scripts that let you drop and recreate the database within seconds. You’ll learn how to code Value Objects (VOs), Data Access Objects (DAOs), and Business Objects (BOs) and how to write unit tests using NUnit to make sure your code is thoroughly tested before you deploy into production.
For the web layer you’ll learn how to code web form (.aspx) pages. You’ll learn how to control the look-and-feel of your application with the help of master pages and themes. You’ll also learn how to integrate web form pages with MVC to create a hybrid web application. To control access to your site you’ll learn how to implement two types of authorization mechanisms: Forms Authentication and Windows Authentication. I take this approach because in order to be a competent developer, not just in ASP.NET, but in any language, you need a wide array of skills. One skill that’s absolutely fundamental to any type of development is the ability to structure an application in such a way that it can be easily modified and extended. This requires a suitable application architecture. To this end I’ll show you how to create multilayered web applications consisting of the following application layers: Infrastructure, Data Access, Business Logic, and Web. The nice thing about this architecture is that the Infrastructure, Data Access, and Business Logic layers can be used not only in a web application, but in a Windows Forms application as well, should the need arise.
Another important aspect of the book is the abundance of complete source code examples. I do this at the risk of being repetitive. Even if I make a small change to a section of code, I list the complete file so you can see where the change occurred in the context of the bigger picture. I personally hate books that show source code examples and in the middle of the example plug in an ellipsis “…” to indicate where code should be. It always left me wondering “What the heck goes there?” You won’t see any ellipsis in code samples in this book, I promise.