A Place to Learn Ur-self…

ASP.NET MVC

All MVC3 Related Posts:

How to get controls values like textboxes, checkbox, radiobuttons and dropdownlist back to controller from Razor view in mvc3

Allow only numbers or digits in Razor textbox in asp.net mvc 3 using jquery

How to add RadioButton List in asp.net mvc3 view

How to bind Dropdownlist in asp.net mvc3 Dynamically

Dropdownlist based filtering in MVC 3 using EntityFrameWork(EDM) Modalfirst Method

ASP.NET MVC3 Routes

Introduction:

Architectural Design Patterns:

Design patterns are recognized solutions to common problems defined originally by the Gang of Four(GoF) patterns.

 Some are

1.Factory method

2. Abstract Factory

3. 3-Tier / N-Tier

4. Template method

And for detailed information please visit following link:

http://wiki.asp.net/page.aspx/276/design-patterns/

Model View Controller Pattern:

What is MVC?

  • Mvc is a pattern
    • Acronym for Model ● View ● Controller
    • Separation of concerns

The pattern isolates “domain logic” (the application logic for the user) from the user interface (input and presentation), permitting independent development, testing and maintenance of each.

Advantages

*Better Separation of Concerns

*Testability

*Model Binder is excellent !

*No Viewstate anymore

*SEO friendly url’s (automatic)

*Complete control over Html output and HTML based

*Easier integration with Javascript / Jquery

*Building an Internet site where HTML,

*performance, and scalability are paramount ASP.NET MVC may be better suited

Disadvantages

•Not as RAD as using Web Forms

•No drag and drop experience

•Doesn’t build on all your experience with

ASP.NET server controls

•Encourages use of design patterns and best practices

Standard MVC View

ASP.NET MVC is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework

Releases

• Transparently

– Regular source code releases on CodePlex

– Previews 1 – 5, Beta thus far. 6 releases!

– Community feedback via forums, etc…

• Agilely

– 94% Code Coverage/1051 unit tests

– Daily Triage Meetings and weekly design

meetings

– Small agile team

Folder Purpose
/Controllers Controllers respond to input from the browser, decide what to do with it, and return response to the user.
/Views Views hold our UI templates
/Models Models hold and manipulate data
/Content This folder holds our images, CSS, and any other static content
/Scripts This folder holds our JavaScript files

View:

The stuff for displaying whatever it is that you are supposed to be displaying in your application.

Controller:

The bit that connects the view and the model.

Model:

The classes that model the domain or subject matter for which you are writing software.

ASP.NET MVC working mechanism:

Step 1

Incoming request directed to Controller

Step 2

Controller processes request and forms a data Model

 

Step 3

Model is passed to View

Step 4

View transforms Model into appropriate output format

Step 5

Response is rendered

ASP.NET MVC App Execution

Example

• For example, consider the following URL:

/Job/Details/3

• This URL is parsed into three parts like this:

Controller = JobController

Action = Details & Id = 3

• The default route includes default values for

all three segments. The default Controller is

HomeController, the default Action is Index,

and the default Id is an empty string.


Comments on: "ASP.NET MVC" (2)

  1. really this is good article… :)

  2. VinayakD said:

    nice article

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: