Consumers Cooperatives and REACH Javier Calvo, Policy Officer [email protected]
Ori Calvo, 2010 [email protected]. “If people want to have maximum reach across *all* devices...
-
Upload
winifred-allen -
Category
Documents
-
view
212 -
download
0
Transcript of Ori Calvo, 2010 [email protected]. “If people want to have maximum reach across *all* devices...
![Page 1: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/1.jpg)
Ori Calvo, [email protected]
![Page 2: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/2.jpg)
“If people want to have maximum reach across *all* devices then HTML will provide the broadest reach”
Scott Guthrie, Corporate Vice President, Microsoft
![Page 3: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/3.jpg)
ObjectivesWhy MVC?ASP.NET MVC In DetailBetter IntegrationConclusions
![Page 4: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/4.jpg)
PrerequisitesASP.NET DeveloperGood understanding of HTML and HTTPGood understanding of C# 3.0 LanguageNo MVC Experience is required
![Page 5: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/5.jpg)
![Page 6: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/6.jpg)
Quick DemoCreate new MVC ProjectCreate new controllerCreate new View
![Page 7: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/7.jpg)
Web Development TodayBrowsing experience everywhereGreater variety of devices and browsersIncreasing drive for web standards
HTML5CSS3
Multidiscipline Web ServerHTML GenerationData ServicesService Orientation
![Page 8: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/8.jpg)
Web Development TodayRich Client Side Experience
Did we say HTML5?Easy integration with client side libraries
AgileTest Driven Development
REST over SOAPClean URLs
Ruby on RailsYear 2004MVC basedBuilt-in ORM tool
![Page 9: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/9.jpg)
Classical ASP.NETHuge shift at that timeObject oriented approachCompiled web pagesStateful UIEvent DrivenDrag and Drop DesignerWindows Forms Developing ExperienceIs here to stay !!!
![Page 10: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/10.jpg)
What’s wrong with it?Is “Windows Forms” approach suited?Limited control over HTMLEncourages mixing of presentation and logicHard to testViewStateComplex page life cycleHard to integrate with other libraries
![Page 11: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/11.jpg)
ASP.NET MVCSeparation of concernsBuilt on top of ASP.NET platformTight control over HTMLDesigned to be testableExtensible routing systemBetter integration with 3rd party librariesOpen sourceLanguage innovations
![Page 12: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/12.jpg)
![Page 13: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/13.jpg)
Web Platform Installer
![Page 14: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/14.jpg)
MVC IngredientsRouting SystemControllerActionFilterViewModelModel StateView Data
![Page 15: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/15.jpg)
DemoIntroduction to PhoneBook BLAdd GroupControllerPass model object to view Add Group.Index ViewConfigure RoutingSupport clickingOutgoing URLUse ViewData
![Page 16: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/16.jpg)
Routing SystemMakes your URLs clean and human friendlyNo correspondence between files and URLsInbound URLOutgoing URLImplemented by System.Web.Routing.dll
Originally shipped with .NET 3.5 SP1You can use it in your classical ASP.NET 4.0
web pagesWas merged into System.Web.dll (starting 4.0)
![Page 17: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/17.jpg)
ControllerThe controller is the bossResponsible for application logic
Receiving user inputWork against the domain modelMoving the user between different UI
Implements IControllerSingle method: Execute
Usually derives from Controller
![Page 18: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/18.jpg)
Controller Base ClassActionAction resultFilters
[OutputCache(Duration=600, VaryByParam”*”)]public class DemoController : Controller{
public ViewResult ShowGreeting(){
return View(“MyView”);}
}
![Page 19: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/19.jpg)
Controller – Producing OutputTypes of action results
ViewPartialViewRedirectJsonJavaScriptFileContentOthers
![Page 20: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/20.jpg)
DemoSubmitting data to the controllerUse action filters (GET, POST)Model BindingValidation
![Page 21: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/21.jpg)
Controller - Receiving InputUse context objects
HttpContextRouteDataTempData
Implicit model bindingThrough action parametersEasier to test
Explicit model bindingFull control
![Page 22: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/22.jpg)
Model BindingIs built from
FormRouteDataQueryString
The DefaultModelBinderConverts strings into .NET objectsUses .NET “Type Converter” facility
![Page 23: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/23.jpg)
DemoAdd Master PageAdd Partial View
![Page 24: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/24.jpg)
DemoAdd Authentication filterImplement custom filterRegister global filter
![Page 25: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/25.jpg)
Action FilterAttach reusable behavior
LoggingAuthorizationCaching
Inject extra logicGreat from testing perspective
Action filter implements IActionFilterResult filter implements IResultFilterActionFilterAttribute implements both
![Page 26: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/26.jpg)
Demo – Entity FrameworkGenerate model from DBImplement BL interfaces
![Page 27: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/27.jpg)
Demo - jQueryUnobtrusive JavaScriptPartial RefreshWorking with JSONClient side templatesjQuery UI
![Page 28: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/28.jpg)
Demo - TestingAdd test projectIoC patternControllerBuilder
![Page 29: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/29.jpg)
Questions ?
![Page 30: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/30.jpg)
ConclusionsA different way to develop web applications
Hopefully, better“Semi” WOW effect
Long term benefitsFeel natural
No rich server control libraryBe ready to integrate other libraries
You must know HTTP and HTML goodWhat about client side MVC?
![Page 31: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/31.jpg)
Read morehttp://www.hi-tech.co.il/college/
http://www.asp.net/mvchttp://jquery.com/http://jqueryui.com/http://weblogs.asp.net/scottgu/
MVC 3.0 RC is released today !!!
![Page 32: Ori Calvo, 2010 Ori.calvo@gmail.com. “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,](https://reader036.fdocuments.in/reader036/viewer/2022070406/56649e015503460f94aeb31c/html5/thumbnails/32.jpg)
Thank You !!!