SlideShare a Scribd company logo
ASP.NET MVC 3 Training for Heroes  WELCOME TO MVC SHINE DAY LêDươngCôngPhúc SESSION 1: ASP.NET MVC FUNDAMENTAL
Who am I? LêDươngCôngPhúc Technical evangelism Software engineer  at Vina Digital  Co,. Ltd.
Active Server Pages Visual Studio 98: ASP, VBScript, ADO Request, Response object
Evolution of ASP.net #2: ASP 1.0, 1.1, 2.0 ASP.net 1.0: January 16th 2002 ASP.net 1.1: April 24th 2003 ASP.net 2.0: Nov 7th 2005, Visual Studio 2005 New data controls (GridView, FormView, DetailsView) Declarative data access (SqlDataSource, ObjectDataSource, XmlDataSource controls) Navigation controls Master pages Login controls Themes Skins Web parts Personalization services Full pre-compilation New localization technique Support for 64-bit processors Provider class model Code Behind,Web Form,  ViewState
ASP.net 3.0, 3.5, 3.5 SP 1 ASP.net 3.0: Nov 21 2006 : WCF, CardSpace ASP.net 3.5: Nov 19 2007, released with VS2008: LINQ Data Source New data controls (ListView, DataPager) ASP.NET AJAX included as part of the framework Support for HTTP pipelining and syndication feeds. WCF Support for RSS, JSON, POX and Partial Trust ASP.net 3.5 sp1: Aug 11 2008: Dynamic Data Browser history in an ASP.NET AJAX Combine multiple Javascript files into a single file New namespaces System.Web.Abstraction and System.Web.Routing ASP.NET 4.0 Easier to get started, develop and deploy Routing and Search Engine Optimization Productivity & Extensibility
The Microsoft Web Platform Web Platform Installer Ajax Control Toolkit & jQuery ASP.NET ADO.NET Entity Framework SQL Server IIS The Microsoft Web Platform combines a rich and powerful web application framework with a supporting cast of tools, servers,technologies and applications for creating, designing, developing and delivering web solutions.
Web Platform Installer Makes it easy to install the Microsoft Web Platform from one place Framework, Web Server, Database and Tools  Cost = free; Size < 2MB Always has latest version of the platform available Available in 9 languages Web App Gallery Umbraco, DotNetNuke, Drupal, WordPress and many more Submit your own apps, get distribution
Today’s Web Developers I want to build web sites myself with an easy to learn tool and framework I’m a professional software developer and I build complex, large scale web sites with a team of developers I <3 Web Apps. I just need a tool that makes them easier to configure, customize and publish them
Goals of ASP.NET MVC Clean URL schemes Support existing ASP.NET runtime features Build on top of System.Web, doesn’t replace it Enable clean separation of concerns Testable by default (built with TDD in mind) Support third-party view engines Auto-mapping of form variables to object properties Provides complete control over your HTML markup Enables rich JavaScript, AJAX integration
Key Concepts Controller Factory Controller forwards MvcHandler creates Model invokes Action uses produces produces View Result Action Result View Engine defines View renders
MVC Pattern Model Decouples the backend business logic from the  front end Binds the model and view together and selects which view to display next Data Transfer Event Notification Data Transfer Controller Request Business InteractionLayer User InteractionLayer View Response Visualizes the application data supplied by the model
How MVC Works What does MVC look like? Controller Controller Retrieves Model “Does Stuff” Request View View Visually represents the model Response
Introducing “MVC Shine” application Features View detail about asp.net mvc activities of heroes Rate an activity What you are doing to see today Build the first ASP.NET MVC application ASPX view engine Learning about ASP.NET MVC 3 fundamental Razor view engine Implementing simple functionalities (CRUD, master-detail)
Controllers View Controller Request Controllers handle requests from the user Controllers create the model for the views Application logic is placed in the controllers
Models View Controller The models hold the application data Models are the mean of communication between the controllers and the views Models hold no application logic
Views View Views are visual representations of a model There can be many views for the same model Views contain no application logic
URL routing Web form: without query string, an URL maps to one aspx page MVC: URL maps to Controller/Action/RoutesValues /Company/Details/3 Controller = CompanyController Action = Details Route Value = {ID = 3} /News Controller  = NewsController Action = Index Route Value = null
Action Result The ActionResultclass is the base for all action results. However, there are different action result types, depending on the task that the action method is performing.  The most common action is to call the View method. The View method returns an instance of the ViewResultclass, which is derived from ActionResult.
Action Result Examples Return JSON [AcceptVerbs(HttpVerbs.Get)] public ActionResultGetSubSkill(int id) {     return Json(db.GetSkills(id));  //Return data in JSON format } $.getJSON("/Skill/GetSubSkill/" + $(this).attr("id"), function(data) { Returns JavaScript [AcceptVerbs(HttpVerbs.Get)] public JavaScriptResultJAction() { return JavaScript("alert('HelloWorld')"); } … <script type="text/javascript" src="/Home/JAction"></script>
MVC UI Helper Controls The HtmlHelper class renders Html fragments of views. Basic MVC UI Helper Controls Html.ActionLink(), Html.BeginForm(), Html.CheckBox(), Html.DropDownList(), Html.EndForm(), Html.Hidden(), Html.ListBox(), Html.Password(), Html.RadioButton(), Html.TextArea(), Html.TextBox() MVC UI Helper Controls can be extended using extension method. http://www.asp.net/Learn/mvc/tutorial-09-cs.aspx
Framework Goals Frictionless Testability Tight control over <markup> Leverage the benefits of ASP.NET Conventions and Guidance
MVC vs Web Form MVC is just another choice of technologies for web development using ASP.NET.  Web forms is still well developed and supported

More Related Content

What's hot

Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fairTech_MX
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun
 
Architecting RIAs with Silverlight
Architecting RIAs with SilverlightArchitecting RIAs with Silverlight
Architecting RIAs with Silverlight
Josh Holmes
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
Jesse Anderson
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Jinkyu Kim
 
MVC
MVCMVC
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
Edureka!
 
Mvc summary
Mvc summaryMvc summary
Mvc summary
Muhammad Younis
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
M Ahsan Khan
 
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Codemotion
 
Single page application 03
Single page application   03Single page application   03
Single page application 03
Ismaeel Enjreny
 
Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Cherie Williams
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net AjaxJeff Blankenburg
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
Hatem Hamad
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Codemotion
 
Angular introduction basic
Angular introduction basicAngular introduction basic
Angular introduction basic
jagriti srivastava
 

What's hot (20)

Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
Architecting RIAs with Silverlight
Architecting RIAs with SilverlightArchitecting RIAs with Silverlight
Architecting RIAs with Silverlight
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Why Use MVC?
Why Use MVC?Why Use MVC?
Why Use MVC?
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
 
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOSSoftware architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
Software architectural design patterns(MVC, MVP, MVVM, VIPER) for iOS
 
MVC
MVCMVC
MVC
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Mvc summary
Mvc summaryMvc summary
Mvc summary
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
 
Single page application 03
Single page application   03Single page application   03
Single page application 03
 
Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0Introducing Pebble SDK 2.0
Introducing Pebble SDK 2.0
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net Ajax
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
Sviluppare applicazioni nell'era dei "Big Data" con Scala e Spark - Mario Car...
 
Angular introduction basic
Angular introduction basicAngular introduction basic
Angular introduction basic
 

Viewers also liked

F# Eye for the C# Guy - DDD North 2013
F# Eye for the C# Guy - DDD North 2013F# Eye for the C# Guy - DDD North 2013
F# Eye for the C# Guy - DDD North 2013Phillip Trelford
 
Focus on the outside, testing in ASP.NET MVC
Focus on the outside, testing in ASP.NET MVCFocus on the outside, testing in ASP.NET MVC
Focus on the outside, testing in ASP.NET MVC
Rob Ashton
 
Controller Testing: You're Doing It Wrong
Controller Testing: You're Doing It WrongController Testing: You're Doing It Wrong
Controller Testing: You're Doing It Wrong
johnnygroundwork
 
Unit Testing in JavaScript with MVC and QUnit
Unit Testing in JavaScript with MVC and QUnitUnit Testing in JavaScript with MVC and QUnit
Unit Testing in JavaScript with MVC and QUnit
Lars Thorup
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
Andy Butland
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
vodqancr
 
CQRS на практике. В поиске точки масштабирования и новых метафор
CQRS на практике. В поиске точки масштабирования и новых метафорCQRS на практике. В поиске точки масштабирования и новых метафор
CQRS на практике. В поиске точки масштабирования и новых метафор
Alexander Byndyu
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
MichalSchroeder
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
David Berliner
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with CucumberBrandon Keepers
 

Viewers also liked (12)

F# Eye for the C# Guy - DDD North 2013
F# Eye for the C# Guy - DDD North 2013F# Eye for the C# Guy - DDD North 2013
F# Eye for the C# Guy - DDD North 2013
 
Focus on the outside, testing in ASP.NET MVC
Focus on the outside, testing in ASP.NET MVCFocus on the outside, testing in ASP.NET MVC
Focus on the outside, testing in ASP.NET MVC
 
Web App Mvc
Web App MvcWeb App Mvc
Web App Mvc
 
Controller Testing: You're Doing It Wrong
Controller Testing: You're Doing It WrongController Testing: You're Doing It Wrong
Controller Testing: You're Doing It Wrong
 
Unit Testing in JavaScript with MVC and QUnit
Unit Testing in JavaScript with MVC and QUnitUnit Testing in JavaScript with MVC and QUnit
Unit Testing in JavaScript with MVC and QUnit
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
 
Laws of test automation framework
Laws of test automation frameworkLaws of test automation framework
Laws of test automation framework
 
CQRS на практике. В поиске точки масштабирования и новых метафор
CQRS на практике. В поиске точки масштабирования и новых метафорCQRS на практике. В поиске точки масштабирования и новых метафор
CQRS на практике. В поиске точки масштабирования и новых метафор
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 

Similar to ASP.NET MVC Fundamental

ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
Ian Carnaghan
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
Taranjeet Singh
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rtt
Lanvige Jiang
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
Aaron Jacobson
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC eldorina
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
SaBin SaleEm
 
ASp.net Mvc 5
ASp.net Mvc 5ASp.net Mvc 5
ASp.net Mvc 5
ahmedxp kh
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
Sudhakar Sharma
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
AHM Pervej Kabir
 
Marlabs - ASP.NET Concepts
Marlabs - ASP.NET ConceptsMarlabs - ASP.NET Concepts
Marlabs - ASP.NET Concepts
Marlabs
 
Asp.Net MVC Intro
Asp.Net MVC IntroAsp.Net MVC Intro
Asp.Net MVC Intro
Stefano Paluello
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
Sergey Seletsky
 
Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desai
jinaldesailive
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
Gigin Krishnan
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
Bhavin Shah
 

Similar to ASP.NET MVC Fundamental (20)

ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
MVC 4
MVC 4MVC 4
MVC 4
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Head first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rttHead first asp.net mvc 2.0 rtt
Head first asp.net mvc 2.0 rtt
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
 
ASp.net Mvc 5
ASp.net Mvc 5ASp.net Mvc 5
ASp.net Mvc 5
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9Asp.net c# MVC-5 Training-Day-1 of Day-9
Asp.net c# MVC-5 Training-Day-1 of Day-9
 
Marlabs - ASP.NET Concepts
Marlabs - ASP.NET ConceptsMarlabs - ASP.NET Concepts
Marlabs - ASP.NET Concepts
 
Asp.Net MVC Intro
Asp.Net MVC IntroAsp.Net MVC Intro
Asp.Net MVC Intro
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
 
Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desai
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
 
Intro ASP MVC
Intro ASP MVCIntro ASP MVC
Intro ASP MVC
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

ASP.NET MVC Fundamental

  • 1. ASP.NET MVC 3 Training for Heroes WELCOME TO MVC SHINE DAY LêDươngCôngPhúc SESSION 1: ASP.NET MVC FUNDAMENTAL
  • 2. Who am I? LêDươngCôngPhúc Technical evangelism Software engineer at Vina Digital Co,. Ltd.
  • 3. Active Server Pages Visual Studio 98: ASP, VBScript, ADO Request, Response object
  • 4. Evolution of ASP.net #2: ASP 1.0, 1.1, 2.0 ASP.net 1.0: January 16th 2002 ASP.net 1.1: April 24th 2003 ASP.net 2.0: Nov 7th 2005, Visual Studio 2005 New data controls (GridView, FormView, DetailsView) Declarative data access (SqlDataSource, ObjectDataSource, XmlDataSource controls) Navigation controls Master pages Login controls Themes Skins Web parts Personalization services Full pre-compilation New localization technique Support for 64-bit processors Provider class model Code Behind,Web Form, ViewState
  • 5. ASP.net 3.0, 3.5, 3.5 SP 1 ASP.net 3.0: Nov 21 2006 : WCF, CardSpace ASP.net 3.5: Nov 19 2007, released with VS2008: LINQ Data Source New data controls (ListView, DataPager) ASP.NET AJAX included as part of the framework Support for HTTP pipelining and syndication feeds. WCF Support for RSS, JSON, POX and Partial Trust ASP.net 3.5 sp1: Aug 11 2008: Dynamic Data Browser history in an ASP.NET AJAX Combine multiple Javascript files into a single file New namespaces System.Web.Abstraction and System.Web.Routing ASP.NET 4.0 Easier to get started, develop and deploy Routing and Search Engine Optimization Productivity & Extensibility
  • 6. The Microsoft Web Platform Web Platform Installer Ajax Control Toolkit & jQuery ASP.NET ADO.NET Entity Framework SQL Server IIS The Microsoft Web Platform combines a rich and powerful web application framework with a supporting cast of tools, servers,technologies and applications for creating, designing, developing and delivering web solutions.
  • 7. Web Platform Installer Makes it easy to install the Microsoft Web Platform from one place Framework, Web Server, Database and Tools Cost = free; Size < 2MB Always has latest version of the platform available Available in 9 languages Web App Gallery Umbraco, DotNetNuke, Drupal, WordPress and many more Submit your own apps, get distribution
  • 8. Today’s Web Developers I want to build web sites myself with an easy to learn tool and framework I’m a professional software developer and I build complex, large scale web sites with a team of developers I <3 Web Apps. I just need a tool that makes them easier to configure, customize and publish them
  • 9. Goals of ASP.NET MVC Clean URL schemes Support existing ASP.NET runtime features Build on top of System.Web, doesn’t replace it Enable clean separation of concerns Testable by default (built with TDD in mind) Support third-party view engines Auto-mapping of form variables to object properties Provides complete control over your HTML markup Enables rich JavaScript, AJAX integration
  • 10. Key Concepts Controller Factory Controller forwards MvcHandler creates Model invokes Action uses produces produces View Result Action Result View Engine defines View renders
  • 11. MVC Pattern Model Decouples the backend business logic from the front end Binds the model and view together and selects which view to display next Data Transfer Event Notification Data Transfer Controller Request Business InteractionLayer User InteractionLayer View Response Visualizes the application data supplied by the model
  • 12. How MVC Works What does MVC look like? Controller Controller Retrieves Model “Does Stuff” Request View View Visually represents the model Response
  • 13. Introducing “MVC Shine” application Features View detail about asp.net mvc activities of heroes Rate an activity What you are doing to see today Build the first ASP.NET MVC application ASPX view engine Learning about ASP.NET MVC 3 fundamental Razor view engine Implementing simple functionalities (CRUD, master-detail)
  • 14. Controllers View Controller Request Controllers handle requests from the user Controllers create the model for the views Application logic is placed in the controllers
  • 15. Models View Controller The models hold the application data Models are the mean of communication between the controllers and the views Models hold no application logic
  • 16. Views View Views are visual representations of a model There can be many views for the same model Views contain no application logic
  • 17. URL routing Web form: without query string, an URL maps to one aspx page MVC: URL maps to Controller/Action/RoutesValues /Company/Details/3 Controller = CompanyController Action = Details Route Value = {ID = 3} /News Controller = NewsController Action = Index Route Value = null
  • 18. Action Result The ActionResultclass is the base for all action results. However, there are different action result types, depending on the task that the action method is performing. The most common action is to call the View method. The View method returns an instance of the ViewResultclass, which is derived from ActionResult.
  • 19. Action Result Examples Return JSON [AcceptVerbs(HttpVerbs.Get)] public ActionResultGetSubSkill(int id) { return Json(db.GetSkills(id)); //Return data in JSON format } $.getJSON("/Skill/GetSubSkill/" + $(this).attr("id"), function(data) { Returns JavaScript [AcceptVerbs(HttpVerbs.Get)] public JavaScriptResultJAction() { return JavaScript("alert('HelloWorld')"); } … <script type="text/javascript" src="/Home/JAction"></script>
  • 20. MVC UI Helper Controls The HtmlHelper class renders Html fragments of views. Basic MVC UI Helper Controls Html.ActionLink(), Html.BeginForm(), Html.CheckBox(), Html.DropDownList(), Html.EndForm(), Html.Hidden(), Html.ListBox(), Html.Password(), Html.RadioButton(), Html.TextArea(), Html.TextBox() MVC UI Helper Controls can be extended using extension method. http://www.asp.net/Learn/mvc/tutorial-09-cs.aspx
  • 21. Framework Goals Frictionless Testability Tight control over <markup> Leverage the benefits of ASP.NET Conventions and Guidance
  • 22. MVC vs Web Form MVC is just another choice of technologies for web development using ASP.NET. Web forms is still well developed and supported

Editor's Notes

  1. 3Mins
  2. Estimated Time: 5 minutesThe Microsoft Web Platform is a complete stack for running powerful, rich web applications that scale easily too. It’s also easy to install thanks to the Web Platform Installer – a free, one click download that gets everything setup for you very quickly!At the foundation of the platform is Windows Server and Internet Information Services which provides a really powerful web server which you can rely on to serve up your web applications. For storing your application data, SQL Server is a robust and secure database which scales effectively to deliver huge datasets. Moving up the stack, the most effective way to map data to your application code is the Entity Framework, which now in v4, provides an ORM that allows you to code against multiple data sources without concerning yourself with writing database centric calls. At the application layer there are a couple of choices thanks to the flexibility of ASP.NET – either ASP.NET Web Forms or ASP.NET MVC – we’ll be discussing both these in more detail a little later.On the client we support and contribute towards the jQuery Core Library and plugins making JavaScript development easier as well as providing the Ajax Control Toolkit for Web Forms developers to easily create rich web applications.On the tooling side, Visual Studio 2010 provides software, support and collaboration features to deliver cool web applications.NotesSome notes on security – if needed.Web Server.Note that these numbers are run against specific advisories against IIS or Apache, and for consistency, we’re looking at the most recent 2 versions of each.IIS had 8 Security advisories directly associated with it. (2 for IIS7, 6 for IIS 6)Apache had 56 Security advisories (17 for 2.2.x and 39 for 2.0.x)As of February 2010, IIS 7 has 0 unpatched advisories, and IIS 6 has 1 unpatched advisory. Apache 2.2.x has 2 unpatched advisories, and Apache 2.0.x has 4 unpatched advisories.Conclusion: Not only does IIS have less advisories against it, Microsoft also demonstrate that they are quicker to patch these advisories.DatabaseNote that these numbers are run against advisories for specific versions of SQL Server and MySQL. As such we’re using the most recent 2 versions of each.SQL Server had 4 Security advisories (0 for SQL Server 2008, 4 for SQL Server 2005)MySQL had 44 Security advisories (20 for MySQL 5.x, 22 for MySQL 4.x)As of February 2010, SQL Server had 0 unpatched advisories, and MySQL has 4 unpatched advisories.Conclusion: Not only does SQL Server have less advisories against it, Microsoft also demonstrate that they are quicker to patch these advisories.Application Framework.Note that ASP.NET is in the .NET framework, so the numbers are for the framework as a whole. Note also that as the advisories are published for specific versions, we’re looking at the last two versions of each..NET had 9 total advisories (2 for .NET 3.x, 7 for .NET 2.x)PHP had 28 total advisories (2 for 5.3.x, 26 for 5.2.x)There are 0 unpatched advisories for /NET, there are 5 unpatched advisories for PHP.
  3. 2 minutesWhen we look at all the different profiles of people creating websites we see certain patterns emerge. First, there is a group of people that want to easily create simple web sites to share information about their hobbies, work, to share photos, and so on. Web Apps are overkills for them. They just need to get the site up and running rapidly from scratch.There’s another group of people that like to use the large number of rich web applications out there as a starting point, they need to get to a solution quickly and in an easy way. Many of this web apps are tailored for specific tasks, and provide 80% of the functionality of a solution; the developer just need to customize them and publish them.Finally, there are the professional developers that need to build complex and scalable web sites. For this, they need tools that help them work in a team, source and version control, a testing framework, and tools with lots of powerful extensions.
  4. The ASP.NET MVC simplifies the complex parts of ASP.net Web Forms without any compromise of the power and flexibility of ASP.NET platform. ASP.net MVC implements Model-View-Controller UI pattern for web application development that lets you allows to develop applications in a loosely couples manner. MVC pattern is separating the application in three parts- Model, View and Controller. A view is responsible for rendering the user interface (UI) of the application and it is nothing more than html templates that filled with application’s data passed by the controller. The Model implements the logic for the application&apos;s data and it represents the business objects of the application that using the View for rendering user interface. Controllers are handles and responds to user input and interaction. The web request will be handled by the controller, and the controller will decide which model objects to use and which view objects to render. The MVC model replaces the Web Form events with the controller actions. The main advantages of the MVC models are clear separation of concerns, unit testing facility, and more control over the URLs and HTML. The MVC model does not use Viewstate, Postbacks, Server controls, and server-based forms that enable full control over the application and html rendered by the Views. MVC model is using Representational state transfer (REST) based URLs instead of file-name extensions used by the Web Form model so that we can make search engine optimization (SEO) URLs published by the application
  5. Estimated Time: 2 mins
  6. Estimated Time: 2 minutesFinally, we got to the C (from MVC), the Controllers.Controllers are responsible of receiving user requests and taking care of them accordingly. In general, controllers would create a model, which they fill with data from a persistence source like a database and pass it to a view.
  7. Estimated Time: 2 minutesLet’s first start by the M (of MVC), the Models.Models are the mean of communication between the controllers and the views. Whenever a controller processes a request from the user and has to display information, it creates the model and passes it to the view. The model only holds data. It doesn’t know anything about the application logic or how to display itself.
  8. Estimated Time: 2 minutesNow let’s continue with the V (from MVC), the Views.Views are visual representations of the models. They are responsible for displaying a model or part of it to the user. The views don’t hold application logic.Note that there can be many views of the same model. Maybe one view displays the name and address of a customer while other displays the telephone and the orders from that same customer but both rely on the same model: the customer.
  9. Estimated Time: 3 minutesThe primary framework goals of ASP.NET MVC are…Frictionless testability– By “frictionless” I mean that when you want to test your code, the framework it was written it doesn’t cause you friction. This is very important if you want to seriously perform long-term unit testing on an application, because if developers were constantly running into points of friction when trying to test, they would eventually abandon it.Tight cover over markup – ASP.NET MVC doesn’t contain any server controls or high-level abstractions that mask their underlying rendering. When you develop an ASP.NET MVC application, you have complete control over the markup. ASP.NET MVC does include some HTML helpers that “hide” away some HTML, but they are at the most basic level of rendering (i.e. just an &lt;input&gt; element).Leverage the benefits of ASP.NET – Because ASP.NET MVC is built on top of the core ASP.NET runtime, you still have plenty of old-friends that can be used (i.e. profiles, membership, roles, caching). All of the same intrinsics you’ve always known are still valid and used heavily.Conventions and guidance – ASP.NET MVC comes with a set of predefined conventions that make the use of it much easier, without the need to for tons of configuration. It also provides framework-level guidance. The idea is that ASP.NET MVC wants to try to lead developers down the pit of success.