Modeling the Music Store

Imagine you are building the ASP.NET MVC Music Store from scratch. You start, as with all great applications, by using the File ⇒ New Project menu command in Visual Studio. Once you give the project a name, Visual Studio will open the dialog you see in Figure 4.1, and you can tell Visual Studio you want to work with the Internet Application project template.

The Internet Application project template gives you everything you need to get started (see Figure 4.2): a basic layout view, a default homepage with a link for a customer to log in, an initial style sheet, and a relatively empty Models folder. All you find inside the Models folder is an AccountModels.cs file with some view-specific model classes for account management (the classes are specific to the views for registering, logging in, and changing a password).

Why is the Models folder nearly empty? Because the project template doesn't know what domain you are working in and it doesn't know what problem you are trying to solve.

At this point, you might not know what problem you are trying to solve, either! You might need to talk to customers and business owners, and do some initial prototyping or test-driven-development to start fleshing out a design. The ASP.NET MVC framework ...

Get Professional ASP.NET MVC 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.