Programacion Web 2Modulo 1Rodrigo AlfaroJedi Back-End/Front-End and Insane Web DeveloperE-Mail: ralfaro.pinto@outlook.com
Indice-   Software engineering-   Introduction to MVC in ASP.NET-   Web forms or MVC?-   MVC 2 features-   Desarrollando l...
Software engineeringSoftware engineering (SE) is the application of a systematic, disciplined, quantifiable approachto the...
Introduction to MVC in ASP.NETThe Model-View-Controller (MVC) architectural pattern separates an application into threemai...
Introduction to MVC in ASP.NET
Introduction to MVC in ASP.NETMVC is a standard design pattern that many developers are familiar with. Some types of Webap...
Introduction to MVC in ASP.NETViews:Views are the components that display the applications user interface (UI). Typically,...
Web forms or MVC?Advantages of an MVC-Based Web ApplicationIt makes it easier to manage complexity by dividing an applicat...
Web forms or MVC?Advantages of a Web Forms-Based Web ApplicationIt supports an event model that preserves state over HTTP,...
MVC 2In an ASP.NET Web site, URLs typically map to files that are stored on disk (usually .aspx files).These .aspx files i...
MVC 2
app en MVC2 ASP.NET 4.0Ver ejemplo en clase.
Gracias por su atencion.Carpeta dropbox del curso:https://www.dropbox.com/sh/k1v77qqmr2l75k2/HkAoCN483oBibliografia on lin...
Upcoming SlideShare
Loading in …5
×

Modulo 2 - Introduccion a MVC ASP.NET

631 views

Published on

Introduccion a MVC ASP.NET.
Concepto de ingenieria de software
MVC o Web forms

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
631
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Modulo 2 - Introduccion a MVC ASP.NET

  1. 1. Programacion Web 2Modulo 1Rodrigo AlfaroJedi Back-End/Front-End and Insane Web DeveloperE-Mail: ralfaro.pinto@outlook.com
  2. 2. Indice- Software engineering- Introduction to MVC in ASP.NET- Web forms or MVC?- MVC 2 features- Desarrollando la primera app en MVC2 ASP.NET 4.0
  3. 3. Software engineeringSoftware engineering (SE) is the application of a systematic, disciplined, quantifiable approachto the design, development, operation, and maintenance of software, and the study of theseapproaches; that is, the application of engineering to software.The term software engineering first appeared in the 1968 NATO Software EngineeringConference and was meant to provoke thought regarding the perceived "software crisis" at thetime.Software development, a much used and more generic term, does not necessarily subsume theengineering paradigm.
  4. 4. Introduction to MVC in ASP.NETThe Model-View-Controller (MVC) architectural pattern separates an application into threemain components: the model, the view, and the controller.The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern forcreating Web applications.The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (aswith Web Forms-based applications) is integrated with existing ASP.NET features, such asmaster pages and membership-based authentication. The MVC framework is defined in theSystem.Web.Mvc assembly.
  5. 5. Introduction to MVC in ASP.NET
  6. 6. Introduction to MVC in ASP.NETMVC is a standard design pattern that many developers are familiar with. Some types of Webapplications will benefit from the MVC framework. Others will continue to use the traditionalASP.NET application pattern that is based on Web Forms and postbacks. Other types of Webapplications will combine the two approaches; neither approach excludes the other.The MVC framework includes the following components:Models:Model objects are the parts of the application that implement the logic for the applicationsdata domain. Often, model objects retrieve and store model state in a database. For example, aProduct object might retrieve information from a database, operate on it, and then writeupdated information back to a Products table in a SQL Server database.In small applications, the model is often a conceptual separation instead of a physical one. Forexample, if the application only reads a dataset and sends it to the view, the application doesnot have a physical model layer and associated classes. In that case, the dataset takes on therole of a model object.
  7. 7. Introduction to MVC in ASP.NETViews:Views are the components that display the applications user interface (UI). Typically, this UI iscreated from the model data. An example would be an edit view of a Products table thatdisplays text boxes, drop-down lists, and check boxes based on the current state of a Productobject.Controllers:Controllers are the components that handle user interaction, work with the model, andultimately select a view to render that displays UI.In an MVC application, the view only displays information; the controller handles and respondsto user input and interaction. For example, the controller handles query-string values, andpasses these values to the model, which in turn might use these values to query the database.
  8. 8. Web forms or MVC?Advantages of an MVC-Based Web ApplicationIt makes it easier to manage complexity by dividing an application into the model, the view, andthe controller.It does not use view state or server-based forms. This makes the MVC framework ideal fordevelopers who want full control over the behavior of an application.It uses a Front Controller pattern that processes Web application requests through a singlecontroller. This enables you to design an application that supports a rich routing infrastructure.It provides better support for test-driven development (TDD).It works well for Web applications that are supported by large teams of developers and for Webdesigners who need a high degree of control over the application behavior.
  9. 9. Web forms or MVC?Advantages of a Web Forms-Based Web ApplicationIt supports an event model that preserves state over HTTP, which benefits line-of-business Webapplication development. The Web Forms-based application provides dozens of events that aresupported in hundreds of server controls.It uses a Page Controller pattern that adds functionality to individual pages.It uses view state on server-based forms, which can make managing state information easier.It works well for small teams of Web developers and designers who want to take advantage ofthe large number of components available for rapid application development.In general, it is less complex for application development, because the components (the Pageclass, controls, and so on) are tightly integrated and usually require less code than the MVCmodel.
  10. 10. MVC 2In an ASP.NET Web site, URLs typically map to files that are stored on disk (usually .aspx files).These .aspx files include markup and code that is processed in order to respond to the request.The ASP.NET MVC framework maps URLs to server code differently than an ASP.NET Web Formspage. Instead of mapping URLs to ASP.NET pages or handlers, the framework maps URLs tocontroller classes. Controller classes handle incoming requests, such as user input andinteractions, and execute appropriate application and data logic, based on user input. Acontroller class typically calls a separate view component that generates HTML output as theresponse.The ASP.NET MVC framework separates the model, view, and controller components. Themodel represents the business/domain logic of the application, typically with data backed by adatabase. The view is selected by the controller and renders the appropriate UI. By default, theASP.NET MVC framework uses the existing ASP.NET page (.aspx), master page (.master), anduser control (.ascx) types for rendering to the browser. The controller locates the appropriateaction method in the controller, gets values to use as the action methods arguments, andhandles any errors that might occur when the action method runs. It then renders therequested view. By default, each set of components is in a separate folder of an MVC Webapplication project
  11. 11. MVC 2
  12. 12. app en MVC2 ASP.NET 4.0Ver ejemplo en clase.
  13. 13. Gracias por su atencion.Carpeta dropbox del curso:https://www.dropbox.com/sh/k1v77qqmr2l75k2/HkAoCN483oBibliografia on line:http://msdn.microsoft.com/en-us/library/dd410120(VS.98).aspxhttp://msdn.microsoft.com/en-us/library/dd381412(VS.98).aspx

×