+ All Categories
Home > Education > Asp netmvc

Asp netmvc

Date post: 26-May-2015
Category:
Upload: hmanjarawala
View: 263 times
Download: 0 times
Share this document with a friend
Popular Tags:
15
Models, Views, Controllers and all that other crazy stuff!
Transcript
Page 1: Asp netmvc

Models, Views, Controllers and all that other crazy stuff!

Page 2: Asp netmvc

Models, Views, Controllers and all that other crazy stuff!

Page 3: Asp netmvc

AgendaAgenda

What is MVC? Questions You Might be Thinking Demonstration… Code, code, and more code! Questions & Answers

Page 4: Asp netmvc

What is MVC?What is MVC?

Concept been around since 1979 Separation of Concerns

“Separate content from presentation and data-processing (model) from content.” --Wikipedia

Page 5: Asp netmvc

What is MVC?What is MVC?

What do I gain from ASP.NET MVC? Clean separation of concerns Testability & TDD Highly extensible and pluggable Powerful URL mapping for clean REST-ful

URLs Can leverage existing ASP.NET features

Authentication, Authorization, & Roles Session, State Management, Output & Data

Caching Localization, etc…

Total control over the rendered View

Page 6: Asp netmvc

What is MVC?What is MVC?

What do I loose from ASP.NET MVC? ASP.NET Web Form post-back model Dependency of View State Initially Rich Controls may be more

difficult Tons of HTML being generated for you Big learning curve for .NET Web

Developers

Page 7: Asp netmvc

Questions You Might Be Questions You Might Be ThinkingThinking Will ASP.NET MVC replace ASP.NET

Web Forms? How would I go about choosing

between using ASP.NET MVC or ASP.NET Web Forms?

Is ASP.NET MVC ready for production? When will ASP.NET MVC be officially

released?

Page 8: Asp netmvc

DemonstrationDemonstration

Pet Shop 5.0 Technologies Used

Visual Studio Team System 2008 .NET 3.5 using C# 3.0 & LINQ to SQL ASP.NET MVC Preview 5 Microsoft SQL Server 2005 Express jQuery v.1.2.6

Flexigrid jGrowl

Page 9: Asp netmvc

Sources of InspirationSources of Inspiration

Scott Guthrie http://weblogs.asp.net/Scottgu/

Scott Hanselman http://www.hanselman.com/blog/

Phil Haack http://haacked.com/

Stephen Walther http://weblogs.asp.net/StephenWalther/

Page 10: Asp netmvc

Come on… I know you have at least one question that you’ve been dying to ask!

Page 11: Asp netmvc

Questions I thought you’d Questions I thought you’d ask… #1aask… #1a

What is the difference between MVC & MVP And no… I’m not referring to Microsoft’s

Most Valuable Professional (of which you can find some in here)

Page 12: Asp netmvc

Questions I thought you’d Questions I thought you’d ask… #1bask… #1b

What is the difference between MVC & MVP MVC

Controller responsible for determining which view is displayed in response to any action.

The view does not directly bind to the model. The view usually will not have any logic in the

code behind. MVP

Presenter contains the UI business logic for the view.

All actions from the view delegate to the presenter.

Tends to be a very natural pattern for achieving separated presentation in ASP.NET Web Forms.

Page 13: Asp netmvc

Questions I thought you’d Questions I thought you’d ask… #1cask… #1c

Page 14: Asp netmvc

Questions I thought you’d Questions I thought you’d ask… #2ask… #2

What is the DRY Principle? It means “Don’t Repeat Yourself”, but it isn’t

necessarily talking about the Copy/Paste Code Smell… that is better described by the “Once and Only Once” (OAOO) principle.

An example of something really DRY is XSLT… where knowledge is not repeated.

“The DRY code philosophy is stated as ‘Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.’” --Wikipedia

Page 15: Asp netmvc

Questions I thought you’d Questions I thought you’d ask… #3ask… #3

What is the PRG Pattern? “…instead of returning an HTML page

directly, the POST operation returns a redirection command… instructing the browser to load a different page using an HTTP GET request. The result page can then safely be bookmarked or reloaded without unexpected side effects.” --Wikipedia


Recommended