Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 1
page 6 of 8
by Keyvan Nayyeri
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 27414/ 329

Getting Started

At first glance, Visual Studio generates an ASP.NET web application project for you with a simple structure.

Figure 3: ASP.NET MVC solution structure

Taking a look at this project, you believe that there are some references for the project and one important reference is to System.Web.Extensions assembly. There are also four folders available including Content, Controllers, Models and Views.

·         Content folder is just for a default CSS stylesheet file for default look and feel of the site.

·         Controllers folder is responsible to hold controller classes.

·         Models folder is responsible to hold model classes.

·         Views folder is responsible for holding view files and contains some folders that include ASPX and master files.

As you see, Controllers, Models and Views are more important for us here. While they are generated to hold controllers, models and views, this is not a rule and you can replace them with your own structure.

Beside these folders, there are some well-known ASP.NET files that of course have some extra definitions that I will describe later.

There is a point to mention here about Default.aspx file and as mentioned in the content of this file, you should not remove the file to let IIS activate MVC for the application when the user navigates to this page.

That is enough for now. Step-by-step, I am going to add my implementation to this project in the upcoming posts.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 4 and 4 and type the answer here:

User Comments

Title: about blog   
Name: rem
Date: 11/16/2008 3:41:24 AM
Comment:
nice blog...
Title: about post   
Name: Rem
Date: 11/4/2008 6:10:36 AM
Comment:
Nice post...
Title: BlogService open source blog engine on MVC   
Name: Jarrett
Date: 10/18/2008 5:48:48 PM
Comment:
There is an open source blog engine called BlogSvc over at

http://codeplex.com/blogsvc

Check out the source code.
Title: How...   
Name: AmyJK
Date: 6/5/2008 6:27:20 AM
Comment:
How do i get hold of the extentions?
Title: Part 4   
Name: Keyvan Nayyeri
Date: 5/2/2008 3:01:15 AM
Comment:
You can read the fourth part here:
http://aspalliance.com/1630_Building_a_Simple_Blog_Engine_with_ASPNET_MVC_and_LINQ__Part_4
Title: Part 3   
Name: Keyvan Nayyeri
Date: 3/5/2008 1:35:04 PM
Comment:
You can read the second part here:
http://aspalliance.com/1604_Building_a_Simple_Blog_Engine_with_ASPNET_MVC_and_LINQ__Part_3
Title: Part 2   
Name: Keyvan Nayyeri
Date: 3/5/2008 1:34:21 PM
Comment:
You can read the second part here:
http://aspalliance.com/1559_Building_a_Simple_Blog_Engine_with_ASPNET_MVC_and_LINQ__Part_2
Title: Download   
Name: Alexandre
Date: 3/3/2008 3:09:17 PM
Comment:
How may i download it?

[]s
Title: Great starter kit   
Name: dotservant.com website hosting services
Date: 2/21/2008 3:26:26 AM
Comment:
Great introduction to MVC and a simple hands on exercise for a quick run through of the general concept of ASP.NET MVC.
Title: Comment on Figure 1   
Name: Keyvan Nayyeri
Date: 2/4/2008 12:59:35 PM
Comment:
Dave,

Thank you for leaving your comment. If I can remember it correctly, I took Figure 1 from MSDN. Yes, there can be a two-way connection between controller and view but don't forget that this isn't mandatory. There may be some cases where controller gets data from view to perform an update but this isn't 100% a case for all scnearios.

I hope this makes sense.
Title: Figure 1 (MVC structure) is incorrect   
Name: Dave
Date: 2/4/2008 12:40:04 PM
Comment:
The view NEVER(!) updates the model. The controller is responsible for loading and saving states to the model layer. Loaded information from the models layer is than passed the the view. The view does only presentation. By definition it is impossible that a presentation contacts the models view or even updates it. The controller is responsible for all logic needed to view, create, update or delete a page.

(I hope my schema stays correct)
+------------+ +-------+
| controller | --- loading information --> | model |
| | <-- saving information ---- | |
+------------+ +-------+
|
V
+------------+
| view |
+------------+

(Basicly your have to define a two-way (loading and saving) connection from the controller to the model. The controller has a 'write-only' connection with the view.

The rest of the article is written very well. Keep up the good work!
Title: Great   
Name: Santosh
Date: 1/29/2008 1:16:45 PM
Comment:
Nice article, easy to undestand!
Title: Nice   
Name: Gustavo
Date: 1/24/2008 1:45:58 PM
Comment:
Keep Going...
I want to see the final result soon! =]






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 1/8/2009 1:48:13 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search