Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.

Slides:



Advertisements
Similar presentations
Introduction to ASP.NET MVC
Advertisements

INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
{ Model View Controller ASP.NET By Scott Crooks & Maggie Wettergreen.
Fabian Vilers Hands on ASP.NET MVC.
ASP MVC s/mvc-4/getting-started-with- aspnet-mvc4/intro-to-aspnet- mvc-4.
Virtual techdays INDIA │ November 2010 ASP.Net MVC Deep Dive Sundararajan S │ Associate Tech Architect, Aditi Technologies.
AMS304: Introduction to the ASP.NET Model View Controller (MVC) Framework Scott Hanselman Eilon Lipton Microsoft Microsoft
What’s new in ASP.NET MVC 3 Building a NerdDinner/AppStore Application.
ASP.NET 4.0 Web Developers User Group Israel June 2009.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Ori Calvo, 2010 Hi-Tech College
Ori Calvo, 2010 “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,
ASP.NET MVC Tips and Tricks Al Wilkinson. Hi! I’m Al  First program in Logo in 1985 in 1st grade #loveatfirstbyte  Started HTML in 1996, led to web.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
NextGen Technology upgrade – Synerizip - Sandeep Kamble.
Jess Chadwick Lead Code Monkey Infragistics Website Team Todd Snyder Development Team Lead Infragistics Experience Design Group.
JavaScript & jQuery the missing manual Chapter 11
Dr. Azeddine Chikh IS444: Modern tools for applications development.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Building Web Sites with ASP.NET MVC Framework Noam King CTO Sela College
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
Enterprise.NET 1 CA - presentation HENDRI FRANYOHT082210N KRISHNAMURTHY SAMANTH YADAVHT082239L CAI XIANGHT082182A KHAING MYAT THWEHT082208L AUNG MOEHT082184B.
MVC A new Web Project Type for ASP.NET. An option. More control over your More control over your A more easily Testable Framework. Not for everyone.
Jean-Claude Trachsel Senior Consultant Trivadis AG Building a Website with ASP.NET MVC.
Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery
Jean-Claude Trachsel Senior Consultant Trivadis AG.
ASP.NET MVC Intro class MainContoller { function Index() {... raw data HTML CSS JavaScript REQUEST RESPONSE.
J. Michael Palermo IV Director of Development Interface, USA WUX203.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Enterprise.NET 1 CA - presentation HENDRI FRANYOHT082210N KRISHNAMURTHY SAMANTH YADAVHT082239L CAI XIANGHT082182A KHAING MYAT THWEHT082208L AUNG MOEHT082184B.
2 ASP.NET MVC Scott Hanselman Senior Program Manager Microsoft.
Getting started with ASP.NET MVC Dhananjay
ASP.Net MVC Extensibility, scalability and testability Andrew Locatelli Woodcock.
ASP.NET MVC Telerik Academy
Bundles, Minification Andres Käver, IT Kolledž
Introduction  “M” “V” “C” stands for “MODEL” “VIEW” “CONTROLLER”. ASP.NET MVC is an architecture to develop ASP.NET web applications in a different manner.
Virtual techdays INDIA │ 9 th – 11 th January 2011 ASP.Net MVC Sundararajan S │ Associate Tech Architect, Aditi Technologies.
Working with Data Model Binders, Display Templates, Editor Templates, Validation… SoftUni Team Technical Trainers Software University
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
Scott Guthrie
Jean-Claude Trachsel Senior Consultant, Trivadis AG The good news.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Intro to MVC5 Bryan Soltis Bit-Wizards - Director of Technology & Research.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
Bob German Principal Architect Developing SharePoint Applications with MVC and Entity Framework.
BIT 286: Web Applications ASP.Net MVC. Objectives Applied MVC overview Controllers Intro to Routing Views ‘Convention over configuration’ Layout files.
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Introduction to ASP.NET MVC [Name] [ Address] [Blog URL]
1 Using MVC 6. MVC vs. ASP Web Forms Both run under ASP.NET Can coexist In Web Forms, browser requests page. xxx.aspx and xxx.aspx.cs on the server Page.
Introduction to MVC Slavomír Moroz. Revision from Previous Lesson o ASP.NET WebForms applications Abstract away HTTP (similar to desktop app development)
Build Data Driven Apps with ASP.NET Core Rachel Appel.
Jim Fawcett CSE686 – Internet Programming Spring 2014
ASP.NET Essentials SoftUni Team ASP.NET MVC Introduction
An introduction to ASP.Net with MVC Nischal S
Jim Fawcett CSE686 – Internet Programming Spring 2012
Social Media And Global Computing Introduction to The MVC Pattern
ASP MVP Web applications and Razor
ASP.NET MVC Introduction
Haritha Dasari Josue Balandrano Coronel -
Introduction to ASP.NET MVC
ASP.NET Roadmap Mike Ormond Developer & Platform Group Microsoft Ltd
Controllers.
ASP.NET and Model View Control
Chengyu Sun California State University, Los Angeles
Presentation transcript:

virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs

 A Brief Overview of ASP.MVC Concepts  Introduction  Routing, Controllers & Views  A walkthrough of new features in ASP.NET MVC 3  View Engines (Razor)  Unobtrusive Ajax and Unobtrusive Client Side Validation  Dependency resolver virtual techdays INDIA │ 9-11 February 2011 S E S S I O N A G E N D A

 High level abstraction over HTML / HTTP  Simplified state management  ViewState and the post‐back model  Control model  Data binding  Simple event‐driven mechanism  Simple Page Controller pattern  And lots more as well... virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Classic ASP.Net - Main Features

 Sub‐optimal URLs  blog.aspx?date=  Form runat="server"  ViewState  Hard to test  All sorts of code in the page  Requirement to test with an HttpContext virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Classic ASP.Net – Some down sides

 A new project‐type for VS 2010  A new routing mechanism  Applicable not just to ASP.NET MVC  Easier to write using TDD  Clean separation of concerns  NOT a replacement for existing Web Forms  Feel free to completely ignore ASP.NET MVC virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC ASP.NET MVC defined

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC ASP.NET MVC defined

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC ASP.NET MVC defined -Browser requests /Products/ -Route is determined -Controller is activated -Method on Controller is invoked -Controller processes request -Renders View, passing in custom ViewData -URLs are rendered, pointing to other Controllers

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Routing  Routing provides "clean" URLs  URL is mapped to a route handler  Extra level of indirection  Handlers can be changed without impacting URL  URL can be changed without impacting handler  Enables support for multilingual URLs  URL Example :

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Routing  Developers adds Routes to a global RouteTable  Mapping creates a RouteData - a bag of key/values public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } protected void Application_Start(){ RegisterRoutes(RouteTable.Routes); }

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Controller Handling  Scenarios, Goals and Design  URLs route to controller “actions”, not pages – mark actions in Controller.  Controller executes logic, chooses view.  All public methods are accessible public void ShowPost(int id) { Post p = PostRepository.GetPostById(id); if (p != null) { RenderView("showpost", p); } else { RenderView("nosuchpost", id); }

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC Views  Scenarios, Goals and Design: – Are for rendering/output. Pre-defined and extensible rendering helpers – Can use.ASPX,.ASCX,.MASTER, etc. – Can replace with other view technologies: Template engines (NVelocity, Brail, …). Output formats (images, RSS, JSON, …). Mock out for testing. – Controller sets data on the View Loosely typed or strongly typed data

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3  The Razor View Engine – Razor syntax is clean and concise, requiring a minimum number of keystrokes. – Razor is easy to learn, in part because it's based on existing languages like C# and Visual Basic. – Visual Studio includes IntelliSense and code colorization for Razor syntax. – Razor views can be unit tested without requiring that you run the application or launch a web server.

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3  Using traditional asp.net code  Using Razor

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3  New "ViewBag" Property  MVC 2 controllers support a ViewData property that enables you to pass data to a view template using a late-bound dictionary API.  In MVC 3, you can also use somewhat simpler syntax with the ViewBag property to accomplish the same purpose.  For example, instead of writing ViewData["Message"]="text", you can write ViewBag.Message="text".  You do not need to define any strongly-typed classes to use the ViewBagproperty.  Dynamic property, you can instead just get or set properties and it will resolve them dynamically at run time.

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3  New "ActionResult" Types  HttpNotFoundResult. Returns a 404 HTTP status code to the client. HttpNotFoundResult  RedirectResult. Returns a temporary redirect (HTTP 302 status code) or a permanent redirect (HTTP 301 status code), depending on a Boolean parameter. RedirectResult  HttpStatusCodeResult. Returns a user-specified HTTP status code. HttpStatusCodeResult  JavaScript and Ajax Improvements  By default, Ajax and validation helpers in MVC 3 use an unobtrusive JavaScript approach.  Unobtrusive JavaScript avoids injecting inline JavaScript into HTML.  This makes your HTML smaller and less cluttered, and makes it easier to swap out or customize JavaScript libraries.

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3 Dependency Injection Improvements  ASP.NET MVC 3 provides better support for applying Dependency Injection (DI) and for integrating with Dependency Injection or Inversion of Control (IOC) containers. Support for DI has been added in the following areas: – Controllers (registering and injecting controller factories, injecting controllers). – Views (registering and injecting view engines, injecting dependencies into view pages). – Action filters (locating and injecting filters). – Model binders (registering and injecting). – Model validation providers (registering and injecting). – Model metadata providers (registering and injecting). – Value providers (registering and injecting).

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3 Dependency Injection Improvements  MVC 3 supports the Common Service Locator library and any DI container that supports that library'sIServiceLocator interface.Common Service Locator  It also supports a new IDependencyResolver interface that makes it easier to integrate DI frameworks.  For more information about DI in MVC 3, see the following resources: 

virtual techdays INDIA │ 9-11 February 2011 ASP.NET MVC New Features in ASP.NET MVC 3 Other New Features  NuGet Integration  Partial-Page Output Caching  Granular Control over Request Validation  Scaffolding Improvements  Sessionless Controller Support And more..

virtual techdays INDIA │ 9-11 February 2011 RESOURCES  Talk by Scott Hanselmann  Hanselman/ Hanselman/  Must watch to learn more about MVC  Scott Guthrie’s Blog  1.aspx

virtual techdays THANKS │ 9-11 February 2011