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 Display Modes
  #1 (permalink)  
Old July 8th, 2009, 09:58 AM
Registered User
 
Join Date: Nov 2006
Location: , , United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pg 118

Is it me or is it just assumed that certain steps will be taken by the reader, I refer to the code on pg 118:

public static SelectList GetOccupationList(String occupation)
{

TheBeerHouseDataContext dataContext = new TheBeerHouseDataContext();
var Occupations = from occupationList in dataContext.Occupations
orderby occupationList.OccupationName
select occupationList;
return new SelectList(Occupations, "OccupationName", "OccupationName", occupation ?? "Business Owner");
}

On what page in Chapter 5 has "TheBeerHouseDataContext" created? in order for this code to compile?

Again on page 118:

public static SelectList GetCountryList(String country)
{
return new SelectList(Iso3166CountryCodes.CountryDictonary, "Key", "Value", country ?? "US");
}

Where in chapter 5 has the class "Iso3166CountryCodes" been defined?
  #2 (permalink)  
Old July 8th, 2009, 11:42 AM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Location: Phoenixville, PA, USA
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

Quote:
Originally Posted by DyerOppenheimer View Post
On what page in Chapter 5 has "TheBeerHouseDataContext" created? in order for this code to compile?
Read Chapter 4

Quote:
Originally Posted by DyerOppenheimer View Post
Where in chapter 5 has the class "Iso3166CountryCodes" been defined?
Somethings had to be left out, because they would have broken the flow of the book and didn't really do much to further the understand of creating a website or using MVC. Specifically some things dealing with the complex understandings of internationalization and ISO codes. It would have taken us a good 5 pages explaining ISO codes and diving in to internationalization to understand a little couple line class dealing with Iso3166CountryCodes. Plus then we would have been stepping on the purpose of the Internationalization and Globalization chapter.

We tried our best to make the book flow and to keep building on what the reader understood, but a couple things just didn't belong where they were first used. Because as you are probably aware application development is usually not a linear exerscise. Often times you have to do a couple things up front that you really planned on tackling later on.

Hope you have enjoyed the book thus far.
__________________
Check out my blog at: http://www.coderjournal.com
  #3 (permalink)  
Old July 8th, 2009, 12:28 PM
Registered User
 
Join Date: Nov 2006
Location: , , United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by nberardi View Post
Read Chapter 4



Somethings had to be left out, because they would have broken the flow of the book and didn't really do much to further the understand of creating a website or using MVC. Specifically some things dealing with the complex understandings of internationalization and ISO codes. It would have taken us a good 5 pages explaining ISO codes and diving in to internationalization to understand a little couple line class dealing with Iso3166CountryCodes. Plus then we would have been stepping on the purpose of the Internationalization and Globalization chapter.

We tried our best to make the book flow and to keep building on what the reader understood, but a couple things just didn't belong where they were first used. Because as you are probably aware application development is usually not a linear exerscise. Often times you have to do a couple things up front that you really planned on tackling later on.

Hope you have enjoyed the book thus far.



Somethings had to be left out, because they would have broken the flow of the book and didn't really do much to further the understand of creating a website or using MVC. Specifically some things dealing with the complex understandings of internationalization and ISO codes. It would have taken us a good 5 pages explaining ISO codes and diving in to internationalization to understand a little couple line class dealing with Iso3166CountryCodes. Plus then we would have been stepping on the purpose of the Internationalization and Globalization chapter.

We tried our best to make the book flow and to keep building on what the reader understood, but a couple things just didn't belong where they were first used. Because as you are probably aware application development is usually not a linear exerscise. Often times you have to do a couple things up front that you really planned on tackling later on.

Hope you have enjoyed the book thus far.[/quote]


I do appreciate you taking the time out to respond to my email, but just to be clear with my initial observations on reading the book so far; It's not that I don't understand the notion of Linq or appericate that in editing this book, certain assumptions were made about the reader, as well certain information had to be left out. It more the perfunctory nature, of what I have read in this chapter so far.

In chapter 4 yes, Linq is explained but at no point was it mention in the solution portion that the datacontext had to be done prior to starting the next chapter, I'm looking at page 83 marked solution, I don't see it.

With reference to your answer about my question concerning Iso3166CountryCode, a little comment that this class would be created in subsequent chapters(which I have yet to reach) would have been helpful.

I most certainly concur that programming is usually not a "linear exerscise", but I do expect a book of this quality to be consistent, with giving at least a "heads up" prior to the introduction of such material.
  #4 (permalink)  
Old July 8th, 2009, 12:59 PM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Location: Phoenixville, PA, USA
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

I will let Al address these concerns that you have since he worked on Chapters 4 and 5.

But my guess is that Al simply forgot to talk about the TheBeerHouseDataContext, because the core of the chapter was based off the Membership provider. You will notice however that in Chapter 6, I do cover TheBeerHouseDataContext because it is integral to understanding Chapter 6.

Also as for your second point about the ISO Country Codes, I still stand by my original statement. As you get farther along in the book there are going to be a couple of things that we simply don't talk about in the code. For the very fact that it is distracting to the actual subject of chapter.
__________________
Check out my blog at: http://www.coderjournal.com
  #5 (permalink)  
Old July 20th, 2009, 05:50 PM
Wrox Author
 
Join Date: Aug 2008
Location: Pittsford, NY, USA.
Posts: 19
Thanks: 1
Thanked 4 Times in 4 Posts
Send a message via AIM to Al_Katawazi
Default

Actually I did talk about the datacontext in chapter 5 at some point but I think it was simply cut via the editing process. The information was already present in chapter 6 and most of chapter 5 dealt with membership provider as nick indicated. I think perhaps in the next edition of this book we might move it. Thanks for the suggestion.
  #6 (permalink)  
Old February 17th, 2011, 05:17 AM
Registered User
 
Join Date: Feb 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Can anyone please explain how the file TheBeerHouse.designer.cs came about?
It said the codes within the file was auto-generated. (which implies the file itself was auto-generated?)
If so, when would that happen? Would that imply that the namespace TheBeerHouse.Models (seen in the codes) was also auto-generated? How would that be possible?

Shall the namespace TheBeerHouse.Model rather be manually defined first (within which the partial class TheBeerHouseDataContext -- derived from System.Data.Linq.DataContext -- is properly defined so that one can intantiate it later? i.e.

TheBeerHouseDataContext dc = new TheBeerHouseDataContext();
If the file was auto-generated before this statement, then the logic would be going backward ?!
  #7 (permalink)  
Old February 18th, 2011, 12:31 AM
Registered User
 
Join Date: Feb 2011
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Oh never mind. I found answer to my own question, mostly by reading and do lab on page 179 ~
 


Thread Tools
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
Sharepoint files - client.stp - PG 118 step #1 Chris Sutherland BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 0 January 31st, 2008 04:37 PM
Chapter 4 Page 118 code PhoenixInc BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 15th, 2008 08:58 PM
Chapter 4 pp. 118-119 luciano991 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 13th, 2006 02:56 PM
parse error $end pag 118 table3.php vkranendonk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 February 2nd, 2006 12:05 PM
P117-118 teldridge Dreamweaver (all versions) 1 November 18th, 2004 05:22 PM



All times are GMT -4. The time now is 01:53 AM.


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