• Like
Introduction to Mvc
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Introduction to Mvc

  • 72 views
Published

Internal MVC training

Internal MVC training

Published in Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
72
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Part 1 4/9/2014Infobest Romania
  • 2.  MVC Architecture  M, V and C  Separation of Concerns  .NET MVC Framework  Demo 4/9/2014Infobest Romania  Create a project.How is it configured by default?  Model, View Controller  Razor  Routing  Friendly URLs  Test driven dev  Bundling  Minification  Validation  Forms  Send data to controller from view  Form security
  • 3. 4/9/2014Infobest Romania
  • 4. Players  Controller: - Handles a request from a View and updates the Model that results in a change of the Model's state. - Sends Data to View  Model: The business entity on which the overall application operates. Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be encapsulated by the Model.  View: The user interface that renders the Model into a form of interaction. 4/9/2014Infobest Romania
  • 5. To implement MVC in .NET we need mainly three classes (View, Controller and the Model). 4/9/2014Infobest Romania
  • 6.  The process of breaking a computer program into distinct features that overlap in functionality as little as possible  MVC design pattern aims to separate content from presentation and data-processing from content. Theoretically sound, but where do we see this in MVC? One place is reasonably clear - between the data-processing (Model) and the rest of the application. 4/9/2014Infobest Romania
  • 7. 4/9/2014Infobest Romania
  • 8.  Thus our models, controllers and views lie in logical/physical layers independent of each other. 4/9/2014Infobest Romania
  • 9. 4/9/2014Infobest Romania
  • 10. 4/9/2014Infobest Romania
  • 11.  Create a project.How is it configured by default?  Model, View Controller  Razor  Routing  Friendly URLs  Test driven dev  Bundling  Minification  Validation  Forms  Send data to controller from view  Form security 4/9/2014Infobest Romania
  • 12. 4/9/2014Infobest Romania
  • 13. 4/9/2014Infobest Romania
  • 14. 4/9/2014Infobest Romania
  • 15. 4/9/2014Infobest Romania
  • 16. 4/9/2014Infobest Romania
  • 17. 4/9/2014Infobest Romania
  • 18. 4/9/2014Infobest Romania
  • 19.  ”In addition, the facility exists to optimise (minify) the CSS and Script files for release builds, whilst at the same time providing normal scripts for debugging the web application.” http://johnnewcombe.net/blog/post/4 4/9/2014Infobest Romania
  • 20. 4/9/2014Infobest Romania
  • 21. 4/9/2014Infobest Romania
  • 22. 4/9/2014Infobest Romania
  • 23.  BundleTable.EnableOptimizations = true; 4/9/2014Infobest Romania
  • 24.  Resources  http://www.asp.net/mvc/tutorials/mvc- 4/bundling-and-minification  https://www.youtube.com/watch?v=y4ceKd- JSqc 4/9/2014Infobest Romania
  • 25. 4/9/2014Infobest Romania
  • 26.  @using (Html.BeginForm("Index", "Test"))  {  …  <input type=“submit” id=“submitIndexView”/>  } 4/9/2014Infobest Romania
  • 27.  @using (Html.BeginForm("Index", “Test“ ,new {argTest = "someText"}))  {  …  <input type=“submit” id=“submitIndexView”/>  } 4/9/2014Infobest Romania
  • 28. For View  @Html.AntiForgeryToken() For Controller  [HttpPost]  [ValidateAntiForgeryToken] 4/9/2014Infobest Romania
  • 29. Claudiu Socaci 4/9/2014Infobest Romania