Asp.net mvc

E
ASP.NET MVC CRUSH COURSE,[object Object],ERDEM ERGİN,[object Object]
MVC Pattern – What is it?,[object Object],MVC - Acronym for Model/View/Controller,[object Object],Invented by TrygveReenskaug[1973 - 1978],[object Object],Originally used as an architectural pattern for GUIs.,[object Object],The first implementation of MVC was as part of Smalltalk-80 ,[object Object],class library. ,[object Object]
MVC Pattern – How does it work?,[object Object],The Controller asks the Model for data,[object Object],The request hits the controller,[object Object],Model,[object Object],2,[object Object],1,[object Object],3,[object Object],Controller,[object Object],User,[object Object],The Model gives the data back to the Controller,[object Object],The controller formats the data and passes them to the View,[object Object],View,[object Object],4,[object Object],5,[object Object],The view renders the HTML that needs to be sent to the client,[object Object],3,[object Object]
MVC Pattern – Who uses it?,[object Object],.NET has Spring.NET, MonoRail,[object Object],Java has Swing, Struts, Grails and others,[object Object],Perl has Catalyst, Gantry, Jifty and others,[object Object],PHP has Zend, Zoop, Agavi and others,[object Object],Python has Django, Gluon, Pylon and others,[object Object],Ruby has Ruby on Rails,[object Object],Apple has cocoa and cocoa touch for objective-c [Mac, iPhone],[object Object]
MVC FrameworkHistory,[object Object],Based on Python,[object Object],1970S,[object Object],….,[object Object],2003 RoR,[object Object],{ ASP.NET MVC },[object Object],2009.3 MVC1 ,[object Object],2010.4 MVC2,[object Object]
ASP.NET MVC,[object Object],[object Object]
 No more “postbacks” and “ViewStates”
 Built on top of ASP.NETAdvantages,[object Object],[object Object]
More control over your html and JavaScript
Friendly URLS
More easily Testable Framework.
All ASP.Net providers still work [Membership, Session, Caching, etc]
Extensible and Pluggable [Support replacing any component],[object Object]
ASP.NET MVC Execution Process,[object Object]
DEMO,[object Object],Create New ASP.NET MVC Project,[object Object],Investigate ASP.NET MVC Structure,[object Object]
Routing,[object Object],MVC+R,[object Object],R => the hidden character,[object Object]
ASP.NET MVC Routing,[object Object],URL Patterns,[object Object],Setting Default Values for URL Parameters,[object Object],Adding Constraints to Routes,[object Object],Scenarios When Routing Is Not Applied,[object Object],How URLs Are Matched to Routes,[object Object],Accessing URL Parameters in a Routed Page,[object Object],ASP.NET Routing and Security,[object Object],ASP.NET Routing versus URL Rewriting,[object Object]
Model [M],[object Object],Validation,[object Object]
Controller [C],[object Object],Controlling the flow of application execution,[object Object]
ASP.NET MVC Controller,[object Object],Controller is a class consisting of a set of action methods.,[object Object], Responsible for ,[object Object],Handling user interaction,[object Object],Working with the models,[object Object],Selecting a view to render,[object Object],Sending model and information  to a particular view,[object Object],Making decisions for security, UI, redirects ... etc.,[object Object],The ASP.Net MVC requires the names of all controllers to end with the suffix  "Controller“  e.g.  HomeController, LoginController,[object Object]
ASP.NET MVC Controller,[object Object],A controller action always returns an ActionResult,[object Object],What if I return an object ??,[object Object],Action return ActionResult which can be,[object Object],[object Object]
EmptyResult=> no result.
RedirectResult	=> redirection to a new URL.
JsonResult		=> json result that can be used in an AJAX application.
JavaScriptResult	=> JavaScript script.
ContentResult	=> text result [and wraps any non ActionResult return Type].
FileContentResult	=> downloadable file [with the binary content].
FilePathResult	=> downloadable file [with a path].
FileStreamResult	=> a downloadable file [with a file stream]. Note: all public methods of a controller class consideredas action methods, if you don’t want a public method to be an action, mark it with [NonAction()] attribute,[object Object]
ASP.NET MVC Controller Filter,[object Object]
View [V],[object Object]
ASP.NET MVC View,[object Object],Responsible for presentation, look & feel, formatting, sorting … etc. ,[object Object],Interacts with model but shouldn’t make decisions ,[object Object],No logic should go there,[object Object],Code Behind exists but not recommended,[object Object],No View State, No Server Controls,[object Object],HTML Helpers,[object Object],Takes the view data from the controller,[object Object],Can be strong typed  ,[object Object],Can be extended by implementing View Engines,[object Object],Always build your views !!!,[object Object]
An HTML Helper is just a method that returns a string.,[object Object],• Html.ActionLink(),[object Object],• Html.BeginForm(),[object Object],• Html.CheckBox(),[object Object],• Html.DropDownList(),[object Object],• Html.EndForm(),[object Object],• Html.Hidden(),[object Object],• Html.ListBox(),[object Object],• Html.Password(),[object Object],• Html.RadioButton(),[object Object],• Html.TextArea(),[object Object],• Html.TextBox(),[object Object],e.g.,[object Object],ASP.NET MVC View,[object Object]
Extensibility,[object Object]
The default ASP.NET MVC Pipeline,[object Object],21,[object Object]
1 von 35

Recomendados

Struts 2 Overview von
Struts 2 OverviewStruts 2 Overview
Struts 2 Overviewskill-guru
2.6K views16 Folien
Mvc interview questions – deep dive jinal desai von
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desaijinaldesailive
12.7K views4 Folien
Introducing Struts 2 von
Introducing Struts 2Introducing Struts 2
Introducing Struts 2wiradikusuma
2.6K views25 Folien
MVC ppt presentation von
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
14K views36 Folien
01 introduction to struts2 von
01 introduction to struts201 introduction to struts2
01 introduction to struts2Smita B Kumar
642 views28 Folien
Backbone js von
Backbone jsBackbone js
Backbone jsKnoldus Inc.
1.5K views37 Folien

Más contenido relacionado

Was ist angesagt?

Struts2 von
Struts2Struts2
Struts2Rajiv Gupta
6.4K views105 Folien
Introduction to ASP.NET MVC von
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCLearnNowOnline
1.5K views112 Folien
ASP .net MVC von
ASP .net MVCASP .net MVC
ASP .net MVCDivya Sharma
5.4K views26 Folien
Struts 1 von
Struts 1Struts 1
Struts 1Lalit Garg
2.4K views42 Folien
MSDN - ASP.NET MVC von
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVCMaarten Balliauw
6K views26 Folien
Spring Web MVC von
Spring Web MVCSpring Web MVC
Spring Web MVCzeeshanhanif
10.6K views44 Folien

Was ist angesagt?(20)

Introduction to ASP.NET MVC von LearnNowOnline
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
LearnNowOnline1.5K views
ASP.NET MVC. von Ni
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni 1.1K views
Introduction to Spring MVC von Richard Paul
Introduction to Spring MVCIntroduction to Spring MVC
Introduction to Spring MVC
Richard Paul6.4K views
Unit testing and MVVM in Silverlight von Devnology
Unit testing and MVVM in SilverlightUnit testing and MVVM in Silverlight
Unit testing and MVVM in Silverlight
Devnology1.3K views
Real-world Model-View-ViewModel for WPF von Paul Stovell
Real-world Model-View-ViewModel for WPFReal-world Model-View-ViewModel for WPF
Real-world Model-View-ViewModel for WPF
Paul Stovell6.5K views
ASP .NET MVC Introduction & Guidelines von Dev Raj Gautam
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam1.2K views
Beginning AngularJS von Troy Miles
Beginning AngularJSBeginning AngularJS
Beginning AngularJS
Troy Miles1.6K views

Similar a Asp.net mvc

Inside asp.net mvc framework von
Inside asp.net mvc frameworkInside asp.net mvc framework
Inside asp.net mvc frameworkCiklum Ukraine
249 views23 Folien
Inside ASP.NET MVC framework von
Inside ASP.NET MVC frameworkInside ASP.NET MVC framework
Inside ASP.NET MVC frameworkCiklum Ukraine
653 views23 Folien
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web... von
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe
1.2K views43 Folien
ASP.NET MVC Fundamental von
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamentalldcphuc
4.9K views22 Folien
Introduction To Mvc von
Introduction To MvcIntroduction To Mvc
Introduction To MvcVolkan Uzun
2.4K views28 Folien
Controllers & actions von
Controllers & actionsControllers & actions
Controllers & actionsEyal Vardi
834 views19 Folien

Similar a Asp.net mvc(20)

SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web... von SoftServe
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe1.2K views
ASP.NET MVC Fundamental von ldcphuc
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
ldcphuc4.9K views
Introduction To Mvc von Volkan Uzun
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun2.4K views
Controllers & actions von Eyal Vardi
Controllers & actionsControllers & actions
Controllers & actions
Eyal Vardi834 views
Simple mvc4 prepared by gigin krishnan von Gigin Krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan769 views
CTTDNUG ASP.NET MVC von Barry Gervin
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin7.2K views
Developing ASP.NET Applications Using the Model View Controller Pattern von goodfriday
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Pattern
goodfriday2.7K views
angularJs Workshop von Ran Wahle
angularJs WorkshopangularJs Workshop
angularJs Workshop
Ran Wahle509 views
AngularJs Workshop SDP December 28th 2014 von Ran Wahle
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
Ran Wahle510 views

Asp.net mvc