Preface

Ten years ago, ASP.NET provided software developers with a means to write complex web applications with their existing Windows Forms skillsets. Today, it continues to be a robust framework for writing scalable applications, from small e-Commerce to enterprise-level CRM. But ten years later, with many business critical applications existing solely on the Web, the Forms paradigm is less relevant.

ASP.NET MVC, based on Ruby On Rails, is now in its second release, with a third around the corner—a powerful framework based on new and old ideas, ASP.NET MVC allows the developer to work with web protocols and standards, while still making use of the industry-standard development environment—Visual Studio.

By example, this book will take you through the key areas of ASP.NET MVC. We'll look at the MVC structure, data access, and ASP.NET MVC's compatibility with client scripting and dependency injection. With a minimal knowledge of web development, this book will help you build scalable web applications with relative ease.

What this book covers

Chapter 1, Working with the View... The view is possibly the most recognizable component of ASP.NET to a web forms developer, with its familiar ASPX extension. However, the differences are significant; we will explore the concepts of ViewData, strongly typed Views, and helpers in this chapter.

Chapter 2, Taking Action in Your Controllers... For every view there is an action and a controller to host it, for it is the action that you navigate to in your browser. The view is merely a template to be called upon. In this chapter, we will learn about controllers and their actions, particularly the resulting types that are not necessarily HTML.

Chapter 3, Routing... If the action is a destination, routing is how you get there. The structure of a URL is an important aspect of a site's navigation; it should read like a map, showing you where you are and give hints as to where you can go. We'll look at how you can manage URLs to create user-friendly site maps, control errors, and provide a hackable API into the current view.

Chapter 4, Master Pages... Don't Repeat Yourself; every good developer should keep things DRY. Master Pages are one of many conventions for doing just that. Here, we'll look at creating a site-wide look and feel, nesting, and shared functions.

Chapter 5, Working with Data in the View... The difference between static HTML and dynamically generated sites is usually the data. In this chapter, we'll look at how easy it is to manage data in this powerful new framework and how it reintroduces old concepts to powerful effect.

Chapter 6, Working with Forms... Forms are the heart of the interactive Web, working at the browser's most basic level; they can be enhanced to provide a rich and intuitive experience. ASP.NET MVC provides extraordinary control over these elements; we'll see how we can capitalize on this control with client scripting and templates.

Chapter 7, Simplifying Complex Applications... ASP.NET MVC has been designed from the ground up to be tested, extended, and improved. Here we'll see how third-party libraries can be used to extend existing functionality or provide a completely new set of options.

Chapter 8, Validating MVC... Validation is the key to any application that accepts input of any kind, but where should it be implemented—on the client where it is most responsive, in the business logic where it is most central, or in the data layer where it is most secure? ASP.NET MVC provides a simple yet powerful framework for defining validation from a central location that is decoupled from the data layer; validation that makes use of client scripting without being dependent on it; and with all this, keeping the validation DRY. In this chapter, we'll look at data annotations, client-side scripting, and remote validation.

Chapter 9, Data Access and Storage... With so many options for storage these days, you might find that you don't want to tie yourself to just one. In this chapter, we'll look at the repository pattern and how, when used in conjunction with dependency injection, we can create an application that, with minimal work, can be connected to XML, SQL, or test data sources.

Chapter 10, Application, Session, Cookies, and Caching... Application optimization has never been easier with ASP.NET MVC. In this chapter, we'll look at session management using session and cookies, and how to cache different aspects of the application to provide the best performance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset