Desenvolvimento Web com ASP.NET MVC

Click here to load reader

  • date post

    10-Jan-2017
  • Category

    Technology

  • view

    180
  • download

    0

Embed Size (px)

Transcript of Desenvolvimento Web com ASP.NET MVC

DEV-B314: ASP.NET & Visual Studio Web Tools Preview

Desenvolvimento Web com ASP.NET [email protected]

110/7/2015 7:28 AM 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Rodolfo Fadino JuniorEspecialista em desenvolvimento de aplicaes webMicrosoft MVP .NETArquiteto de Solues no Portal Minha VidaTecnologia em Processamento de Dados - [email protected]://rodolfofadino.com.br

210/7/2015 7:28 AM 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

AgendaASP.NET MVC (Fundamentals)MobileSeguranaPerformanceNovidades ASP.NET MVC

310/7/2015 7:28 AM 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

ASP.NET MVC

O que o ASP.NET MVC ? um framework de desenvolvimento web extremamente poderoso, open source e performticoConstruido sobre o ASP.NET CoreUtiliza o padro arquitetural de desenvolvimento MVC (1978, Smalltalk Xerox)Flexvel, extensvel e performticoConveno

ASP.NET MVC

MVCModels: Classes que representam os dados do aplicativo e que a lgica de validao uso para impor regras de negcios para esses dados.Views:Arquivos com templates que a aplicao utiliza para gerar o HMTLControllers:Classes que manipulam as requisies, recuperam os dados do modelo e selecionam a view para a resposta

Models. Model objects are the parts of the application that implement the logic for the application s data domain. Often, model objects retrieve and store model state in a database. For example, a Product object might retrieve information from a database, operate on it, and then write updated information back to a Products table in SQL Server.

Views. Views are the components that display the application s user interface (UI). Typically, this UI is created from the model data. An example would be an edit view of a Products table that displays text boxes, drop-down lists, and check boxes based on the current state of a Products object.

Controllers. Controllers are the components that handle user interaction, work with the model, and ultimately select a view to render that displays UI. In an MVC application, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles query-string values, and passes these values to the model, which in turn queries the database by using the values.

TechEd 2013 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.10/7/2015 7:28 AM7

Como o ASP.NET MVC funciona

ResponseControllerView

Request

Controllerfaz algoRetorna o ModelViewRepresenta visualmente o ModelRouting

Routing

TechEd 2013 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.10/7/2015 7:28 AM9

Routing

EspecficaGenrica

TechEd 2013 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.10/7/2015 7:28 AM10

Controllers

Controllers

Controllers

Controllers (Model Binding)Model Binding

Controllers

Cache

ViewsRazor

ViewsView Engine => Razor HelpersPartialLayoutSection

Views

Views

Models (Data)Validation

Democriando uma aplicaoASP.NET MVC

MobileProject templatejQuery MobileCSS Media QueriesViewport Meta TagSobrescrevendoViews, Layouts e Partial ViewsBrowser-Specific Views

DemoASP.NET MVC Mobile Features

SeguranaCross-site request forgery (XSRF/CSRF)Filters (LogonAuthorize, RequireHttpsAttribute, HandleErrorAttribute)OAuth Providers

DemoASP.NET MVC + OAuth Providers

Bundling e MinificationSteve SoudersWeb Performance10% a 20% => Server Side (tempo)80% a 90% => Front-end

DemoBundling eMinification

ASP.NET MVC 6Open sourceMulti plataformasPerformance

Linkshttp://www.asp.net/vnexthttp://www.asp.net/mvchttp://rodolfofadino.com.br/

have a niceCODE