Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 21st, 2009, 03:42 PM
Registered User
 
Join Date: Sep 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default Code and no explation.

Hello,

There is code in your samples that is not explained anywhere in the book. For example, in p. 136, ForgotPassword.aspx:

Inherits="System.Web.Mvc.ViewPage<TheBeerHouse.Mod els.UserInformation>"

What is its purpose? How did it get there? Some views have it, others do not, why?

Should I consult MSDN to figure it out?

I am finding one cannot follow the examples page by page.
  #2 (permalink)  
Old September 22nd, 2009, 12:31 AM
Friend of Wrox
Points: 546, Level: 8
Points: 546, Level: 8 Points: 546, Level: 8 Points: 546, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Location: Portland, OR
Posts: 105
Thanks: 3
Thanked 20 Times in 19 Posts
Default

Andres,

The inherits property is on each view page and defines the class that will be used to pass data into the view and back out. In the example you site the userInformation class in the Model is being used. If you check the UserController and look at the ForgotPassword ActionResult you will see that the veiw uses a new UserInformation. So an empty object from the UserInformation class is initially passed to the view.

The POST ActionResult for the ForgotPassword accepts two properties from the userInformation object used in the view, the user name and the secret Answer.

I agree that it is difficult to try and follow the book page by page and end up with working code like was possible with the previous version of this book. However, if you go through the book and with the source code at the same time it should become clear; and you will learn the material that much better for having to strive to understand it. It is a fine line that publishers and authors have to tread, make everything very explicit and the book has to many pages and costs to much to produce; and the reader doesn't learn the underlying principles as well since they are doing rote work. On the other hand if the book is not explicit enough it can be much harder to follow along or understand the principles which doesn't help generate sales. Overall I think this version of the book has erred on not being explicit enough; in some places it is not clear enough in others and to wordy in others, but I'm muddling through it non the less.


Steve

Last edited by Steve S; September 22nd, 2009 at 12:33 AM..
The Following User Says Thank You to Steve S For This Useful Post:
andresb (September 30th, 2009)
  #3 (permalink)  
Old September 30th, 2009, 02:11 PM
Registered User
 
Join Date: Sep 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you Steve for your explanation. Also thank you for your understanding. I wish this book was as well detailed as the previous Bellinaso's book.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to save html page source code? Jaymond Flurrie Access VBA 2 July 2nd, 2019 06:04 PM
Urgent:hard disk serial code and vb code ivanlaw Pro VB 6 0 July 25th, 2007 04:05 AM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 06:22 PM
Writing Client Side Script from Code-Behind code sajid_pk Classic ASP Databases 1 January 18th, 2005 12:53 AM



All times are GMT -4. The time now is 04:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.