Pro ASP.NET MVC 3 Framework (draft) by Steven Sanderson, Adam Freeman

By Steven Sanderson, Adam Freeman

Show description

Read Online or Download Pro ASP.NET MVC 3 Framework (draft) PDF

Similar programming: programming languages books

Start Here! Learn Microsoft Visual C# 2010 (Developer)

Able to research programming? commence the following! ™Learn the basics of contemporary programming with visible C# 2010—and start construction your first apps for the machine and internet. in case you have totally no earlier event, no problem—simply commence right here! This booklet introduces must-know innovations and methods via easy-to-follow causes, examples, and workouts.

Extra info for Pro ASP.NET MVC 3 Framework (draft)

Example text

Listing 3-12. WillAttend == true) { @:It's great that you're coming. The drinks are already in the fridge! } else { @:Sorry to hear that you can't make it, but thanks for letting us know. }

The Thanks view uses Razor to display content based on the value of the GuestResponse properties that we passed to the View method in the RsvpForm action method. PropertyName. Name. Don’t worry if the Razor syntax doesn’t make sense—we’ll explain Razor in Chapter 5. Now that we have created the Thanks view, we have a working example.

In short, a domain model is the single, authoritative definition of the business data and processes within your application. A persistent domain model is also the authoritative definition of the state of your domain representation. The domain model approach solves many of the problems that arise in the smart UI pattern. Your business logic is contained in one place. If you need to manipulate the data in your model or add a new process or rule, the domain model is the only part of your application that has to be changed.

Some of the fine detail of the original MVC pattern was tied to Smalltalk-specific concepts, such as screens and tools, but the broader concepts are still applicable to applications, and they are especially well suited to web applications. Interactions with an MVC application follow a natural cycle of user actions and view updates, where the view is assumed to be stateless. This fits nicely with the HTTP requests and responses that underpin a web application. Furthermore, MVC forces a separation of concerns—domain model and controller logic is decoupled from the UI.

Download PDF sample

Rated 4.73 of 5 – based on 25 votes