Professional ASP.NET MVC 4
by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen, Scott Hanselman
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 &cmdarr, 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).
The Models folder is 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-drivendevelopment to start fleshing out a design. The ASP.NET MVC framework doesn't dictate your process or methodologies.
Eventually, you might decide the first step in building a music ...
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.
Read now
Unlock full access