Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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
  #61 (permalink)  
Old March 23rd, 2009, 04:23 PM
Authorized User
 
Join Date: Oct 2008
Location: Tel Aviv, , Israel.
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Thank you very much. Much appreciated!
  #62 (permalink)  
Old May 28th, 2009, 08:32 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Question Newsletter

In the view for createnewsletter.aspx the body field is set to model.htmlbody. Since this is not editing an existing newsletter but creating a new one, I am wondering if this value should be left out? I bring this up because when I tried to pull up the page to test the system, I got a null reference exception.
  #63 (permalink)  
Old May 28th, 2009, 08:41 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

That view is also used for the Edit action. So it cannot be removed. I just tried to reproduce this in the latest code released on CodePlex and was unable to. Can you try getting the latest code.
__________________
Check out my blog at: http://www.coderjournal.com
  #64 (permalink)  
Old May 28th, 2009, 09:37 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I downloaded the latest one from 5/21, which went up the day after I had downloaded the last version. I didn't notice. And the error didn't come up this time. Thank you.

And, all of the things we discussed last week didn't occur either.

However, when I open the project by either double clicking on the project file or the sln file, the test project doesn't come up.
  #65 (permalink)  
Old May 29th, 2009, 07:39 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

Test project?
__________________
Check out my blog at: http://www.coderjournal.com
  #66 (permalink)  
Old May 29th, 2009, 12:56 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

oops sorry. That's what I get for trying to work on projects late at night. I am working on three other ones while looking at this one and I got confused.
  #67 (permalink)  
Old June 1st, 2009, 03:37 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to plastical
Default N-Tier vs Linq to SQL

Is there a reason why you dropped the original DAL+BLL logic replacing it with Linq to Sql? AFAIK dev guidelines suggest a custom approach for accessing data and Marco's seemed quite elegant and flexible...
I got used to and applied the concept in more than 30 websites and now I'm stuck trying to understand what an ORM may offer vs. a hand-crafted solution...

I read the excellent Professional ASP.NET MVC 1.0 and I was a bit disoriented while in the model chapter.

Sorry, but need some feedback on this before moving to MVC

Last edited by plastical; June 1st, 2009 at 03:42 AM.. Reason: forgot a couple of lines...
  #68 (permalink)  
Old June 1st, 2009, 09:21 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

Marco in the original booked used what is called a provider model. Back in ASP.NET 2.0 this model was being pushed as the new way to program. Since then there has been a large push for a more separated data access model. Such as nHibernate or Entity Framework, where you create your domain objects (your BLL) and then use reflection, configuration, separation, and IoC to do all the DAL operations.

There is another book which deals with the beer house and Entity Framework called ASP.NET 3.5 Website Programming.

For our book we decided to update the model to something a little more modern, that was easy to use, and didn't step on the work that was being done in the other book. That is why we choose LINQ-to-SQL.

Also the DAL from the original book is an hand crafted ORM vs an ORM designed for mass consumption like LINQ-to-SQL. If you would like to learn more about MVC in a quick synopsis. Please check out my 7 part series on my blog, which is a preview release of Chapter 2 of my book.

http://www.coderjournal.com/2008/12/...ew-controller/

That explains ASP.NET MVC in a quick and consise manor. But to answer your question about what a model is, you can start here:

http://www.coderjournal.com/2009/01/...t-5-the-model/

A model is basically anything you can retreive and store some kind of data in. For smaller applications the model will be the DAL, or larger applications the model will be the BLL. Hope this answers you questions. Also your custom designed DAL that you have used on 30+ sites can still be your model in MVC, so all your work isn't lost. :)
__________________
Check out my blog at: http://www.coderjournal.com
  #69 (permalink)  
Old June 1st, 2009, 09:55 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to plastical
Default

Thanks Nick... I tried to create the first web site learning from NerdDinner and comparing it with TheBeerHouse MVC (I bought both books... but the latter still not shipping at this time!). Not being a real programmer (my fault, but I'm trying to learn and understand better since I'm a Marketing specialist), I have difficulties to put acquired knowledge in to the Model as BLL. i.e., how would you retrieve categories from the 2.0 custom provider model in the newest MVC? These are the type of questions that I'm not able to find since the community is nowadays focusing on, as you said, more modern ways to achieve the same results.

Or do you suggest to leave the old custom ORM and learn something new. Linq to SQL seems quite simple (although with some issues, in particular with cached queries)... Don't know for others...

Last edited by plastical; June 1st, 2009 at 09:59 AM..
 


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
TheBeerHouse MVC preview ASP.NET MVC Website Programming Problem Design Solution jminatel BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 July 18th, 2009 09:16 AM
chapter 13 - MVC omarosa BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 10 March 25th, 2009 12:00 AM
TBH to MVC Framework rocco50 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 June 23rd, 2008 04:50 PM
mvc datta123 Struts 1 October 26th, 2006 11:00 AM
MVC Design Issue gopalkis J2EE 3 September 21st, 2003 11:15 PM



All times are GMT -4. The time now is 09:35 AM.


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