Chapter 3 ready to review

0 views
Skip to first unread message

Jimmy Bogard

unread,
Jan 24, 2010, 10:04:31 PM1/24/10
to mvc2inaction-discuss
Chapter 3 (View Fundamentals) is ready for a review.

Thanks everyone!
MVC2iA_CH_03.docx

devonlazarus

unread,
Jan 27, 2010, 5:50:17 PM1/27/10
to mvc2inaction-discuss
Overall, a good introductory chapter. It has almost all of the
fundamentals that I'd like each of my developers to know before
getting involved with the framework.

Since this is a "fundamentals" chapter, I do feel it could use some
introductory detail about how the ViewEngine works in ASP.MVC. You
touch on the topic of how a Template gets selected. That type of
information about how a View is selected would be good here as well.
Something like section 3.4.2 but with respect to Views, how they are
connected to the method name, and how the method actually becomes an
Action. Just my .02.

Regards,

-devon

Grammatical edits follow:

Internally, the ViewResult object delegates to a specific IViewEngine
to render the actual content for a view.

could be re-written as:

Internallt, the ViewResult object delegates the responsibility for
rendering the actual content for a view to a specific IViewEngine.

could use some commas, class could be "object", and changed "context"
to "contextual":

There a several more classes involved, but the IViewEngine
implementation is the object responsible for examining the ViewResult
information, as well as other contextual information, and locating the
correct IView to render.

Page 3:

In the Controller base class, we have access to the ViewDataDictionary
object used to pass to the view in the ViewData property

I think you mean "used to pass _information_ to the view _through_ the
ViewData..." ???

Page 4:

"Because we create weak, compile-unsafe link in a dictionary, we open
ourselves to problems in the future..."

links should be plural? "... compile-unsafe links _to_ a
dictionary..." ?
Although "compile-unsafe" makes sense, you might want to consider re-
writing this sentence using something besides that description
(although I struggle with a suggestion at the moment).

Page 8:

"Instead of a loose-typed string..." should be "loosely-typed" or, the
opposite of strongly-typed.

Page 9:

"Instead of enumerating every input field as separate action method
parameters, all of the parameters can be bound to the same ViewModel
we used to render the view, shown in Listing 3.11."

Since this is an early chapter in the book, it might be worth a quick
reference to _how_ this actually gets done. Something like "taking
advantage of ModelBinders (see Chapter XX for an in-depth discussion).
First-timers could benefit from that little tidbit even at this early
stage in the book, imho.

Page 11:

"But for very simple display and edit models, the EditorForModel and
DisplayForModel will likely meet our needs."

Remove the "But" in this sentence since you started the previous
sentence with the same conjunction.

Page 12:

"The Collection and Object templates..."

Although we know you are talking about Editor Templates here, you
might want to be explicit in referencing them:

"The Collection and Object editor templates behave identically to the
display templates..."

Page 14:

"For example, we might have an application-wide template for
displaying the Email template"

should probably be:

For example, we might have an application-wide template for displaying
the Email data type..."

"For the most part, templates are as equivalent to developing a
partial for a type."

should probably be:

For the most part, templates are the equivalent to developing a
partial for a type."

Reply all
Reply to author
Forward
0 new messages