Introduction to MVC Slavomír Moroz. Revision from Previous Lesson o ASP.NET WebForms applications Abstract away HTTP (similar to desktop app development)

Slides:



Advertisements
Similar presentations
Introduction to ASP.NET MVC
Advertisements

Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
{ Model View Controller ASP.NET By Scott Crooks & Maggie Wettergreen.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Fabian Vilers Hands on ASP.NET MVC.
Razor. Slide 2 Remember this? Browser Web Server HTTP Request HTTP Response (Web page / code) Client code (script) Interpret request Generate HTML and.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Virtual techdays INDIA │ November 2010 ASP.Net MVC Deep Dive Sundararajan S │ Associate Tech Architect, Aditi Technologies.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
UNIT-V The MVC architecture and Struts Framework.
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,
Jess Chadwick Lead Code Monkey Infragistics Website Team Todd Snyder Development Team Lead Infragistics Experience Design Group.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Building Angular Applications with TypeScript Sergey Barskiy Architect Level: Intermediate.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Standalone Java Application vs. Java Web Application
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Jean-Claude Trachsel Senior Consultant Trivadis AG Building a Website with ASP.NET MVC.
Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Building Secure Web Applications With ASP.Net MVC.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
Getting started with ASP.NET MVC Dhananjay
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
ASP.NET MVC Telerik Academy
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
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.
ASP.NET MVC An Introduction. What is MVC The Model-View-Controller (MVC) is an architectural pattern separates an application into three main components:
Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Jean-Claude Trachsel Senior Consultant, Trivadis AG The good news.
Model-View-Controller an introduction to MVC design pattern with Castle.MonoRail Presentation: v1.0 Prepared by: Chorn Sokun
Ruby on Rails. Web Framework for Ruby Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller –almost.
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.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
INTRODUCTION TO MVC BY SUHA MNEIMNEH. WHAT’S THE AGENDA What is MVC? MVC components MVC vs web forms vs ASP.NET vocabulary When to create MVC application.
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.
6. Application Server Issues for the Project
Introduction to .NET Florin Olariu
An introduction to ASP.Net with MVC Nischal S
Better RESTFul API – Best Practices
Social Media And Global Computing Introduction to The MVC Pattern
MVC WELCOMES Webinar on Mumbai Techie Group One And All For
MVC Architecture, Symfony Framework for PHP Web Apps
ASP MVP Web applications and Razor
ASP.NET MVC Introduction
The Modern ASP.NET Tech Stack!
Model View Controller
ASP.NET Filters SoftUni Team ASP.NET MVC Introduction
Building Web Applications with Microsoft ASP
Haritha Dasari Josue Balandrano Coronel -
Understand Windows Forms Applications and Console-based Applications
Introduction to ASP.NET MVC
Controllers.
ASP.NET Module Subtitle.
Web Development Using ASP .NET
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
ASP.NET MVC Imran Rashid CTO at ManiWeber Technologies.
ASP.NET and Model View Control
Presentation transcript:

Introduction to MVC Slavomír Moroz

Revision from Previous Lesson o ASP.NET WebForms applications Abstract away HTTP (similar to desktop app development) Object oriented and event-based o Cons UI logic coupled with code. Hard to separate. Hard to unit test Heavy page size due to viewstate management

ASP.NET MVC Design pattern Separates UI from logic through shared data Makes testing easier Has no viewstate

ASP.NET MVC

Controller can change the model Controller can send model to the view to get the representation of the model How does view recieves data from controller? o Viewbag object o Strongly and weakly typed model

Routing Routes are defined as patterns. Route must always lead to a controller and his action. Route may define additional parameters that will be passed to action handler. Order is important

Routes

ActionResult Every action method returns object derrived from ActionResult class

Action selectors MVC provides attributes to tweak how the actions can be selected based on the name or the request verbs (post, get, put…).

Action filters An action filter is an attribute that you can apply to a controller action -- or an entire controller -- that modifies the way in which the action is executed. The ASP.NET MVC framework includes several action filters: o OutputCache – This action filter caches the output of a controller action for a specified amount of time. o HandleError – This action filter handles errors raised when a controller action executes. o Authorize – This action filter enables you to restrict access to a particular user or role.

Action selectors vs. Action filters An ActionSelector dictates which action method is triggered. An ActionFilter provides some methods that are run before and after request and response processing.

Razor and Helpers Razor is a markup syntax that lets you embed server-based code (Visual Basic and C#) into web pages. ASP.NET helpers are components that can be accessed by single lines of Razor code. You can build your own helpers using Razor syntax, or use built-in ASP.NET helpers. Razor syntax

Razor helpers

Layouts You typically want to maintain a consistent look and feel across all of the pages within your web-site/application. Razor supports a feature called “layouts” – which allow you to define a common site template, and then inherit its look and feel across all the views/pages on your site.

Partial views If you want to reuse a view in your web application, you can go for the partial view concept. We can use partial views in a situation where we need a header, footer reused for an MVC web application. We can say that it’s like a user control concept in ASP.NET WebForms.

Model validation Attributes defined in System.ComponentModel.DataAnnotations IValidatableObject