ASP.net MVC

  • Published on
    13-Jul-2015

  • View
    104

  • Download
    4

Embed Size (px)

Transcript

<p> 1</p> <p>ASP.NET MVCAGENDAMVC (Model-View-Control)ASP.NET MVC</p> <p>MVC (Model-View-Control)What is MVC1979smalltalkDesign Pattern() or framework ()Separation of Concerns ()</p> <p>ComponentsView () Control ()Model () The relationship between MVC</p> <p>1. 2. 123. 34ASP.NET MVCViewHTML/XML/CSSJSONJavascript (jQuey, JQuery UI, Ext JS,)AJAXControlASP.NET ControllerModelADO.NETEntity FrameworkLINQ to SQLDatabase operationASP.NET MVC &amp; Web FormWeb Form (viewstate)HTML &amp; CSSMVC</p> <p>ASP.NET MVC &amp; Web FormWeb FormView basedDesign FlowOrderaddorder.aspxUIdatasourceExample CodeFile structureAboutRegister/login</p> <p>MVCController basedDesign FlowURLControllerModelmodelviewviewExample CodeFile structureAboutRegister/login</p> <p>ModelControllerView SNMP </p> <p>KeyIndexintDeviceNamenvarchar(32)DeviceIPvarhar(32)SNMPVersionint1 ~ 2ReadCommunityvarchar(32)WriteCommunityvarchar(32)DeviceTypeintDeviceStatusint ModelModels-&gt; -&gt; -&gt; </p> <p> ModelDeviceInfo.cs (Code First)using System.ComponentModel;using System.ComponentModel.DataAnnotations;[Key][Required]null[DisplayName()]View[MaxLength(32)][Range(1, 2)]</p> <p> ControllerController -&gt; -&gt; -&gt; </p> <p> ViewDeviceTypeDeviceStatusModelRouteConfig.csDeviceInfoController.csIndex.cshtmlCreate.cshtml</p>