ASP.NET MVC Telerik Academy http://academy.telerik.com.

Slides:



Advertisements
Similar presentations
Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Advertisements

.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Introduction to ASP.NET MVC
{ 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.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Development of mobile applications using PhoneGap and HTML 5
Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
User Group 2015 Version 5 Features & Infrastructure Enhancements.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
UNIT-V The MVC architecture and Struts Framework.
ASP.NET 4.0 Web Developers User Group Israel June 2009.
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
ASP.NET MVC 3 and Some 4 JaxCodeCamp August 2011.
Kay Herzam Herzam IT Consulting What‘s new in ASP.NET MS TechTalk.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Sitefinity CMS Technical Overview & Developer’s Perspective
Ori Calvo, 2010 “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Building Web Sites with ASP.NET MVC Framework Noam King CTO Sela College
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
Jonathan Canfield Mavin Lisa Giss Professor Kenytt D. Avery
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Telerik Software Academy ASP.NET Web Forms Telerik Software Academy ASP.NET Web Forms.
George Gonsalves.  Free and lightweight web development tool.  Create, publish, and maintain your website  Optimized for Open Source  Designed for.
Getting Started with ASP.NET MVC BRIJ BHUSHAN MISHRA.
ASP.NET MVC Introduction MVC, Models, Views, Controllers, ASP.NET SoftUni Team Technical Trainers Software University
Getting started with ASP.NET MVC Dhananjay
ASP.Net MVC Extensibility, scalability and testability Andrew Locatelli Woodcock.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
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.
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
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.
ASP.NET WEB Applications. ASP.NET  Web application framework developed by Microsoft  Build dynamic data driven web applications and web services  Subset.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
Submitted by: Moran Mishan. Instructed by: Osnat (Ossi) Mokryn, Dr.
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
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.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Introduction to ASP.NET MVC [Name] [ Address] [Blog URL]
Build and Learn ASP.NET Workshop.
Web Programming Language
Introduction to ASP.NET MVC
MVC Architecture, Symfony Framework for PHP Web Apps
ASP.NET MVC Introduction
Building Web Applications with Microsoft ASP
Haritha Dasari Josue Balandrano Coronel -
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
CO6025 Advanced Programming
CS5220 Advanced Topics in Web Programming Course Overview
Lecture 1: Multi-tier Architecture Overview
ASP.NET Module Subtitle.
and Program Development
ASP.NET MVC Web Development
ASP.NET MVC Imran Rashid CTO at ManiWeber Technologies.
CS5220 Advanced Topics in Web Programming Course Overview
Presentation transcript:

ASP.NET MVC Telerik Academy http://academy.telerik.com

Table of Contents The MVC Pattern ASP.NET MVC Model, View, Controller The MVC Pattern for Web and Examples ASP.NET MVC Comparison with ASP.NET ASP.NET MVC Advantages Creating ASP.NET MVC Project NuGet Package Management Server Information with Glimpse

The MVC Pattern

Model–view–controller (MVC) is a software architecture pattern The MVC Pattern Model–view–controller (MVC) is a software architecture pattern Originally formulated in the late 1970s by Trygve Reenskaug as part of the Smalltalk Code reusability and separation of concerns Originally developed for desktop, then adapted for internet applications

Model Set of classes that describes the data we are working with as well as the business Rules for how the data can be changed and manipulated May contain data validation rules Often encapsulate data stored in a database as well as code used to manipulate the data Most likely a Data Access Layer of some kind Apart from giving the data objects, it doesn't have significance in the framework

Defines how the application’s user interface (UI) will be displayed View Defines how the application’s user interface (UI) will be displayed May support master views (layouts) and sub-views (partial views or controls) Web: Template to dynamically generate HTML

Process the requests with the help of views and models Controller The core MVC component Process the requests with the help of views and models A set of classes that handles Communication from the user Overall application flow Application-specific logic Every controller has one or more "Actions"

MVC Steps Incoming request routed to Controller For web: HTTP request Controller processes request and creates presentation Model Controller also selects appropriate result (view) Model is passed to View View transforms Model into appropriate output format (HTML) Response is rendered (HTTP Response)

Front controller (dispatcher) The MVC Pattern for Web HTTP Request Front controller (dispatcher) /Some/Page/ Delegate request User Controller HTTP Response CRUD model Select view & pass data View (render UI) Model (data) Use model data

MVC Frameworks CakePHP (PHP) CodeIgniter (PHP) Spring (Java) Perl: Catalyst, Dancer Python: Django, Flask, Grok Ruby: Ruby on Rails, Camping, Nitro, Sinatra JavaScript: AngularJS, JavaScriptMVC, Spine NodeJS: Express ASP.NET MVC (.NET Framework)

ASP.NET MVC

ASP.NET WebForms ASP.NET MVC ASP.NET Core ASP.NET WebForms ASP.NET MVC Presentation Caching .NET Handlers Routes Pages Controls Globalization Profile Master Pages Membership Roles Etc... ASP.NET Runtime

ASP.NET Web Forms Stable and mature, supported by heaps of third party controls and tools Event driven web development Postbacks Viewstate Less control over the HTML Hard to test Rapid development

Runs on top of ASP.NET Embrace the web Uses MVC pattern ASP.NET MVC Not a replacement for WebForms Leverage the benefits of ASP.NET Embrace the web User/SEO friendly URLs, HTML 5, SPA Adopt REST concepts Uses MVC pattern Conventions and Guidance Separation of concerns

ASP.NET MVC Tight control over markup Testable Loosely coupled and extensible Convention over configuration Razor view engine One of the greatest view engines With intellisense, integrated in Visual Studio Reuse of current skills (C#, EF, LINQ, JS, etc.) Application-based (not scripts like PHP)

Separation of Concerns Each component has one responsibility SRP – Single Responsibility Principle DRY – Don’t Repeat Yourself More easily testable TDD – Test-driven development Helps with concurrent development Performing tasks concurrently One developer works on views Another works on controllers

Replace any component of the system Extensible Replace any component of the system Interface-based architecture Almost anything can be replaced or extended Model binders (request data to CLR objects) Action/result filters (e.g. OnActionExecuting) Custom action result types View engine (Razor, WebForms, NHaml, Spark) View helpers (HTML, AJAX, URL, etc.) Custom data providers (ADO.NET), etc.

Friendlier to web crawlers Clean URLs REST-like /products/update /blog/posts/2013/01/28/mvc-is-cool Friendlier to humans /product.aspx?catId=123 or post.php?id=123 Becomes /products/chocolate/ Friendlier to web crawlers Search engine optimization (SEO)

You can vote for new features in ASP.NET UserVoice site Community-based ASP.NET MVC, Web API, and Web Pages source code is available in CodePlex http://aspnetwebstack.codeplex.com/ You can vote for new features in ASP.NET UserVoice site http://aspnet.uservoice.com/forums/41199-general-asp-net vNext is on GitHub https://github.com/aspnet

MVC Pattern in ASP.NET MVC HTTP Request Web server ASP.NET MVC Routing engine /Users/Ivo/ Select controller and invoke action (method) User Controller (C# class) HTTP Response (HTML, File, JSON, …) CRUD model Select view & pass data (model) View engine (Razor) Model (POCO) Use model data

Creating ASP.NET MVC Project

Visual Studio installer will install everything we need The Tools Tools that we need: IDE: Visual Studio 2013 (2012 is also OK) Framework: .NET Framework 4.5 Web server: IIS 8.5 (Express) Data: Microsoft SQL Sever (Express or LocalDB) Visual Studio installer will install everything we need http://www.microsoft.com/visualstudio/eng/2013-downloads

Technologies that ASP.NET MVC uses The Technologies Technologies that ASP.NET MVC uses C# (OOP, unit testing, async, etc.) ASP.NET HTML(5) and CSS JavaScript (jQuery, KendoUI, AngularJS, etc.) AJAX, Single-page apps Databases (MS SQL) ORM (Entity Framework and LINQ) Web and HTTP

Visual Studio 2012: New Project

VS 2012: Default Layout

Visual Studio 2013: New Project

VS 2013: Default Layout

Internet App Project Files Static files (CSS, Images, etc.) All controllers and actions JavaScript files (jQuery, Modernizr, knockout, etc.) View templates _Layout.cshtml – master page (main template) Application_Start() – The entry point of the application Web.config – Configuration file

Demo: Internet application

NuGet Package Management

NuGet package management Free, open source package management Makes it easy to install and update open source libraries and tools Part of Visual Studio 2012/2013 Configurable package sources Simple as adding a reference GUI-based package installer Package manager console

Demo: NuGet

Server Information with Glimpse

Server Info with Glimpse Glimpse shows execution timings, server configuration, request data and more Showed inside browser (like FireBug) With no changes to the application code Supports ASP.NET MVC, WebForms and EF

Install NuGet packages: Install Glimpse Install NuGet packages: Glimpse.Mvc5 Glimpse.EF6 Run the project Configure it: http://localhost:port/Glimpse.axd

Demo: Glimpse

Summary HTTP is a client-server protocol for transferring web resources via Internet Model–view–controller (MVC) is a software architecture pattern ASP.NET MVC is a great platform for developing Internet applications Visual Studio is the main development tool for creating ASP.NET MVC applications Almost everything in ASP.NET MVC is a package Glimpse is a tool that helps with debugging