SlideShare a Scribd company logo
1 of 15
Models, Views, Controllers and all that other crazy stuff!
Models, Views, Controllers and all that other crazy stuff!
Agenda

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

 Concept been around since 1979
 Separation of Concerns
   “Separate content from presentation and data-
    processing (model) from content.” --Wikipedia
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
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
Questions You Might Be Thinking

 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?
Demonstration

 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
Sources 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/
Come on… I know you have at least one question
  that you’ve been dying to ask!
Questions I thought you’d ask… #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)
Questions I thought you’d ask… #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.
Questions I thought you’d ask… #1c
Questions I thought you’d ask… #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
Questions I thought you’d ask… #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

More Related Content

What's hot

Introduction To Asp.Net Mvc
Introduction To Asp.Net MvcIntroduction To Asp.Net Mvc
Introduction To Asp.Net MvcRishu Mehra
 
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜yoshiaki iwanaga
 
Knockout js with mvc
Knockout js with mvcKnockout js with mvc
Knockout js with mvcJoel Cochran
 
Introduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS appIntroduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS appHarvey Hu
 
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?MarkupBox
 
JavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceJavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceDmitry Sheiko
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSAlvaro Sanchez-Mariscal
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)IT PROGRAMMING WORLD
 
JS Framework Comparison - An infographic
JS Framework Comparison - An infographicJS Framework Comparison - An infographic
JS Framework Comparison - An infographicInApp
 
Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slidesMasterCode.vn
 
The Windows Runtime and the Web
The Windows Runtime and the WebThe Windows Runtime and the Web
The Windows Runtime and the WebJeremy Likness
 
Node.js exception handling
Node.js exception handlingNode.js exception handling
Node.js exception handlingMinh Hoang
 
"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor TurskyiJulia Cherniak
 
Require JS
Require JSRequire JS
Require JSImaginea
 
Single Page Application Best practices
Single Page Application Best practicesSingle Page Application Best practices
Single Page Application Best practicesTarence DSouza
 

What's hot (20)

What is mvc
What is mvcWhat is mvc
What is mvc
 
Introduction To Asp.Net Mvc
Introduction To Asp.Net MvcIntroduction To Asp.Net Mvc
Introduction To Asp.Net Mvc
 
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
 
Knockout js with mvc
Knockout js with mvcKnockout js with mvc
Knockout js with mvc
 
Introduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS appIntroduce MVVM & How to implement it in your iOS app
Introduce MVVM & How to implement it in your iOS app
 
Single-page applications and Grails
Single-page applications and GrailsSingle-page applications and Grails
Single-page applications and Grails
 
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
 
JavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right ChoiceJavaScript MV* Framework - Making the Right Choice
JavaScript MV* Framework - Making the Right Choice
 
Mvc
MvcMvc
Mvc
 
MVVM Applied: From Silverlight to Windows Phone to Windows 8
MVVM Applied: From Silverlight to Windows Phone to Windows 8MVVM Applied: From Silverlight to Windows Phone to Windows 8
MVVM Applied: From Silverlight to Windows Phone to Windows 8
 
Developing SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJSDeveloping SPI applications using Grails and AngularJS
Developing SPI applications using Grails and AngularJS
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)
 
JS Framework Comparison - An infographic
JS Framework Comparison - An infographicJS Framework Comparison - An infographic
JS Framework Comparison - An infographic
 
Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slides
 
The Windows Runtime and the Web
The Windows Runtime and the WebThe Windows Runtime and the Web
The Windows Runtime and the Web
 
Sling models
Sling modelsSling models
Sling models
 
Node.js exception handling
Node.js exception handlingNode.js exception handling
Node.js exception handling
 
"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi
 
Require JS
Require JSRequire JS
Require JS
 
Single Page Application Best practices
Single Page Application Best practicesSingle Page Application Best practices
Single Page Application Best practices
 

Viewers also liked

Introduction to csharp
Introduction to csharpIntroduction to csharp
Introduction to csharphmanjarawala
 
00 Fundamentals of csharp course introduction
00 Fundamentals of csharp course introduction00 Fundamentals of csharp course introduction
00 Fundamentals of csharp course introductionmaznabili
 
C#, OOP introduction and examples
C#, OOP introduction and examplesC#, OOP introduction and examples
C#, OOP introduction and examplesagni_agbc
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity TipsKeith Bennett
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Viewers also liked (8)

Introduction to csharp
Introduction to csharpIntroduction to csharp
Introduction to csharp
 
00 Fundamentals of csharp course introduction
00 Fundamentals of csharp course introduction00 Fundamentals of csharp course introduction
00 Fundamentals of csharp course introduction
 
C#, OOP introduction and examples
C#, OOP introduction and examplesC#, OOP introduction and examples
C#, OOP introduction and examples
 
Unix Command Line Productivity Tips
Unix Command Line Productivity TipsUnix Command Line Productivity Tips
Unix Command Line Productivity Tips
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Asp netmvc

ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC PresentationVolkan Uzun
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernatebwullems
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET WebskillsCaleb Jenkins
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterPongsakorn U-chupala
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 dayQuach Long
 
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S GuideAlicia Buske
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9AHM Pervej Kabir
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1Gaurav Arora
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Gaurav Arora
 
Java Programming
Java ProgrammingJava Programming
Java ProgrammingTracy Clark
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation Arumugam P
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentationbuildmaster
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applicationsDivyanshGupta922023
 

Similar to Asp netmvc (20)

Php and-mvc
Php and-mvcPhp and-mvc
Php and-mvc
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
ASP .NET MVC - best practices
ASP .NET MVC - best practicesASP .NET MVC - best practices
ASP .NET MVC - best practices
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 
Building an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernateBuilding an enterprise app in silverlight 4 and NHibernate
Building an enterprise app in silverlight 4 and NHibernate
 
Asp.netmvc handson
Asp.netmvc handsonAsp.netmvc handson
Asp.netmvc handson
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
 
CG_CS25010_Lecture
CG_CS25010_LectureCG_CS25010_Lecture
CG_CS25010_Lecture
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniter
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
 
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
 
Mvc
MvcMvc
Mvc
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applications
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 

Recently uploaded

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 

Recently uploaded (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

Asp netmvc

  • 1. Models, Views, Controllers and all that other crazy stuff!
  • 2. Models, Views, Controllers and all that other crazy stuff!
  • 3. Agenda  What is MVC?  Questions You Might be Thinking  Demonstration…  Code, code, and more code!  Questions & Answers
  • 4. What is MVC?  Concept been around since 1979  Separation of Concerns  “Separate content from presentation and data- processing (model) from content.” --Wikipedia
  • 5. 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
  • 6. 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
  • 7. Questions You Might Be Thinking  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?
  • 8. Demonstration  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
  • 9. Sources 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/
  • 10. Come on… I know you have at least one question that you’ve been dying to ask!
  • 11. Questions I thought you’d ask… #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)
  • 12. Questions I thought you’d ask… #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.
  • 13. Questions I thought you’d ask… #1c
  • 14. Questions I thought you’d ask… #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
  • 15. Questions I thought you’d ask… #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

Editor's Notes

  1. 1. No, MVC will not replace Web Forms. It will only be an alternative approach for web development. Don’t be fearful that your precious post-back View State model will be taken away from you ;) 2. If you have a highly intensive user experience you may want to stay with the classic Web Form approach, however, if you find yourself in a very large enterprise you may want to consider using MVC since it provides a lot of flexibility and enables unit testing…. Something very difficult to do in a Web Form environment. 3. There are many sites that already use MVC in production, however, technically the product hasn’t been released yet. It is still in Preview 5. 4. The rumor is that MVC will be released in a month that ends in “ber”. There is no official release date that I am aware of. Since the project has been hosted on CodePlex it has had the unique experience of being tested while it is being developed. The community is helping drive the direction of the product, but with that comes a flexible delivery date. It’s done when it’s done.
  2. This is a test note