Skip to Content
Beginning ASP.NET MVC 1.0
book

Beginning ASP.NET MVC 1.0

by Simone Chiaretta, Keyvan Nayyeri
August 2009
Beginner to intermediate content levelBeginner to intermediate
575 pages
13h 16m
English
Wrox
Content preview from Beginning ASP.NET MVC 1.0

Chapter 4. The Model

Throughout the first few chapters of this book you became familiar with basic Model-View-Controller (MVC) principles, how working with ASP.NET MVC differs from working with ASP.NET WebForms, and the general workings of ASP.NET MVC. Here in Chapter 4 your in-depth examination of the ASP.NET MVC begins with a discussion of the first element in the Model-View-Controller pattern: the model.

Any implementation of software in the MVC pattern consists of three main components, and the first element is the model. The model is the component responsible for encapsulating the data layer manipulations of your application in a simple API that can be used in the controller component easily and quickly. Moreover, it's responsible for including your business logic for what's going to happen with your data. This not only helps to reduce the coupling between your components but also improves the readability of your code significantly.

There is no one specific way to build your models, especially in ASP.NET MVC where a wide range of options exist for building your data storage infrastructure. You have various options for implementing your model component, including traditional data interactions with relational databases, different Object Relational (O/R) Mappers, and programming components for working with other data storage types such as XML or even text files. This gives you the flexibility to work in a variety of ways, and you can choose whatever way is most comfortable for you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET MVC 4

Beginning ASP.NET MVC 4

José Rolando Guay Paz
Programming ASP.NET MVC 4

Programming ASP.NET MVC 4

Jess Chadwick, Todd Snyder, Hrusikesh Panda
Professional ASP.NET MVC 2

Professional ASP.NET MVC 2

Jon Galloway, Phil Haack, Scott Hanselman, Scott Guthrie, Rob Conery

Publisher Resources

ISBN: 9780470433997Purchase book