# Saturday, 16 May 2009

The first chapter of Professional ASP.NET MVC 1.0 walks you through creating the basic NerdDinner site.  This is a great introduction to ASP.NET MVC but really isn’t something you could as reference for creating a real world ASP.MVC site.  With this in mind I set out on a multi part project to create a real world ASP.NET reference application based on the base NerdDinner code.

It the first installation of what I am calling NerdDinnerAdvanced I extended the base NerdDinner code in the following ways;

    • Created 3-tier architecture.  One of the major misconceptions about ASP.NET MVC is that it is a UI framework.  I think this is mainly due to the fact that the major changes that developers need to wrap their head around are in the UI.  To help alleviate this misconception I structured the MVC project architecturally that developers who have experience in n-tier architecture will find familiar.
       The layers, as you can see highlighted above, are UI, Business, and Data.  Because of the overall simplistic nature of the underlying code I did not include a Service layer.  The other projects are shared by the layers.  The Domain project contains my models and the Common project contains common utility classes.

 

    • The base NerdDinner code used LINQ to SQL and was content with passing the LINQ to SQL entities between the layers of the application.  I would guess that Mr. Gu did this for simplicity and brevity and not a show of best practice.  If you are asking yourself what is wrong with architecting around LINQ to SQL entities I would recommend picking up Dino Esposito’s latest book.  The main reason is that you are tightly coupling yourself to the database.  So in my Domain project I created a Models namespace and created Dinner, Rsvp, and DinnerFormView domain objects.

 

    •   Implemented Inversion Of Control/Dependency Injection using Structure Map.  The base NerdDinner code used manual IoC/Di in the DinnersController but I decided to take that a step further because I am on a bit of an Ioc/Di fix lately.  I implemented it on the repository and the dinner services business object as well as the Dinner and Rsvp controllers.

 

    • Implemented a full suite of unit testing using MOQ for mocking objects.

The code can be downloaded here.  Stay tuned for the next installment which will include nHibernate as the DAL.

Wednesday, 27 October 2010 23:23:32 (Central Daylight Time, UTC-05:00)
Watch the swiss replica watch full story on 20/20 Friday rado replicas at 10 p.m. ET
watches replica
Thursday, 28 October 2010 22:27:22 (Central Daylight Time, UTC-05:00)
U.K. The Adidas women shoes government there plays a much tag heuer carrera watch bigger role funding higher education replica belts than the U.S., but it adidas running shoes is contemplating cutting funding up cheap louis vuitton to 30% as it deals Puma men's shoes with a budget shortfall. The adidas shoes top ranked U.K. schools
Thursday, 04 November 2010 00:16:30 (Central Standard Time, UTC-06:00)
dismissed that concern despite Corum Bubble despite doubts raised by the Congressional Oversight Chanel handbags Oversight Panel for
the Troubled Asset Relief Womens Nike Shox LT3 Relief Program, the group charged by Congress Jaeger LeCoultre Atmos Congress with assessing the effectiveness of the gucci hats the federal bank
bailout.Bank of Americ
Wednesday, 10 November 2010 00:45:59 (Central Standard Time, UTC-06:00)
Quaid, 47, said louis vuitton monogram bag said their likely assassins would be "an Bally Belts "an estate planner who would make a replica louis vuitton handbags a living trust and a county that replica burberry scarf thatyrdom operation will be audemars piguet replica be rewarded in the could cash Randy's
Tuesday, 16 November 2010 20:19:51 (Central Standard Time, UTC-06:00)
all wounds, but it louis vuitton monogram denim it can make life meaningful again and Ulysse Nardin Macho Palladium 950 and make a
Monday, 04 March 2013 06:28:34 (Central Standard Time, UTC-06:00)
Every one has their own hobbies that aid them to cope with the daily routine and to cherish the best moments in their life. Mine is traveling, a great hobby, but sometimes a little expensive. I love to travel around the world, especially Mexico because it has a lot of tourist destinations and I enjoyed this region very much, it's like a second home for me. Right now I am searching for tips to find the best offer for Mexico, because I always I want to travel cheap and fast.
deniss
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview