SlideShare uma empresa Scribd logo
1 de 44
• A design Pattern (Methodology)
• Invented by Smalltalk programmer (Trygve
Reenskaug 1979).
• Separation of Concerns / Single Responsibility
Principle
• More easily testable
M
Model
V
View
C
Controller
• Representation of domain data
• Business Logic
• Persistence mechanisms
• User Interface
• The representation of Model
• An intermediary between Model and View
• Application’s Brain (Handle user requests, bind
Data, return views)
Ok
C
Controller
M
Model
V
View
CreateInvoice (fact)
Create invoice (data)
fact = new Invoice ()
LatestInvoices ()
return view ("Last-Invoices", ListFact[])
ListFact[]
HTML
• Part of ASP.NET
• Not an upgrade or replacement for Web Forms
ASP.NET
Webforms MVC Webpages
• No server controls
• No ViewState
• No Code Behind
• Full control over html
• Unit Testing
• Separation of application tasks (No code Behind)
• Flexibility and Extensibility
• Friendly URLs (Routing)
• Scalability and Performance
• Supports existing ASP.NET features
(Authentication, Membership, roles, output
caching,…)
• Natural integration with Ajax
• View Engines
o Aspx
o Razor
• Layout
• Partial View
• Section
• HtmlHelper, AjaxHelper
• ActionLink
@Html.ActionLink(“Modifier", “Edit“, new {Id=3})
<a href="/Product/Edit/6">Modifier</a>
• Form Elements (Form, TextBox, Hidden,….)
@Html.TextBox(“Nom")
<input id=" Nom " type="text" value="" name=" Nom ">
• DropDownList
var db = new NorthwindDataContext();
IEnumerable<SelectListItem> items = db.Categories
.Select(c => new SelectListItem { Value = c.CategoryID.ToString(), Text = c.CategoryName });
ViewBag.Categories = items;
@Html.DropDownList("CategoryID",
(IEnumerable<SelectListItem>) ViewBag.Categories)
• Ajax ActionLink
@Ajax.ActionLink("Get Time", "GetTime", new AjaxOptions () {
UpdateTargetId="divTorefresh",
HttpMethod="GET"
})
<a href="/Home/GetTime" data-ajax-update="#divTorefresh"
data-ajax-mode="after" data-ajax-method="GET" data-
ajax="true">Get Time</a>
• Action Results
• Filters
• Caching
• ViewResult
• PartialViewResult
• JsonResult
• JavaScriptResult
• ContentResult
• FileResult
• RedirectResult
• Authorization filters
• Action filters
• Result filters
• Exception filters
[OutputCache(Duration=3600)]
Public ActionResult GetListCountries()
{
// Logic to get countries list
}
[OutputCache(Duration=3600, VaryByParam = "countryId")]
Public ActionResult GetListRegions(int countryId)
{
// Logic to get regions list
}
• Annotation
• Validation(Client Side & Server Side)
• Required
• DisplayName
• Range
• DataType
• StringLength
• Open source package manager for the .NET
Framework
• Provide the ability to produce and consume packages
• Bundling & Minification
• Web Api
• Template Mobile
• Asynchronous
• RealTime avec SignalR
Improve JavaScript and CSS files loading
• Minimize the Number of requests (Bundle in
one File)
• Reduce the size of files (remove spaces, enters
and comments)
Fully customizable and extensible
• Entity Framework
• Database First
• Model First
• Code First
• Object-relational mapping (ORM) Framework
• Gives an automated mechanism for Data Access
• Manipulate Data as Object
• Reduce hard coded Query
• Have inheritance relationships between entities
• Performing basic CRUD(Create, Read, Update, Delete)
• Existing DataBase
• Generate .Edmx From DataBase
• Use ObjectContext & DBContext
• Use T4 template (POCO)
• Empty Edmx Model
• Design th DB Schema
• Generate DataBase From Model
• Create Domain Models (Class)
• Generate DataBase From Domain Models
• Full Control Over Code
• No Autogenerated code
• User Authentification
• Authorization
• Cross-site request forgery
• Cross-site Scripting
• Forms Authentification
• Cookies
• Windows Authentification
• Windows Session
• Via IIS
• OAuth
• Facebook, google, Hotmail, twitter, etc.
• Role-based Authorization
• [Authorize(Roles = "Admin, Super User")]
• [Authorize(Users = "Betty, Johnny")]
• Malicious attack (Cross Domain)
• Using Forms
• Session hijacking
• Malicious attack Using Script Injection
• Inject Code Inside Pages
• Design pattern
• Removal of hard-coded dependencies
• Giving an object its instance variables (Dynamically)
Asp.net MVC training session
Asp.net MVC training session

Mais conteúdo relacionado

Mais procurados

ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewShahed Chowdhuri
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...Edureka!
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptAmit Tyagi
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentationBhavin Shah
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introductionBhagath Gopinath
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMMudasir Qazi
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETRajkumarsoy
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptForziatech
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsWebStackAcademy
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariSurekha Gadkari
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxMalla Reddy University
 

Mais procurados (20)

ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Angular Directives
Angular DirectivesAngular Directives
Angular Directives
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScript
 
Angular modules in depth
Angular modules in depthAngular modules in depth
Angular modules in depth
 
ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
Angular Introduction By Surekha Gadkari
Angular Introduction By Surekha GadkariAngular Introduction By Surekha Gadkari
Angular Introduction By Surekha Gadkari
 
Jquery
JqueryJquery
Jquery
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 

Semelhante a Asp.net MVC training session

Dot Net Online training in uk and usa
Dot Net Online training in uk and usaDot Net Online training in uk and usa
Dot Net Online training in uk and usaalmaandrea
 
Dotnet Online Training
Dotnet Online TrainingDotnet Online Training
Dotnet Online TrainingSumma Mcclane
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015Hossein Zahed
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
Cert05 70-487 - developing microsoft azure and web services
Cert05   70-487 - developing microsoft azure and web servicesCert05   70-487 - developing microsoft azure and web services
Cert05 70-487 - developing microsoft azure and web servicesDotNetCampus
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...Malin Weiss
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...Speedment, Inc.
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8Thomas Robbins
 
Cloud architecture patterns and pratices
Cloud architecture patterns and praticesCloud architecture patterns and pratices
Cloud architecture patterns and praticesGustavo Alzate Sandoval
 
OrigoDB - take the red pill
OrigoDB - take the red pillOrigoDB - take the red pill
OrigoDB - take the red pillRobert Friberg
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseSpeedment, Inc.
 
Silicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSilicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSpeedment, Inc.
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5Jon Galloway
 

Semelhante a Asp.net MVC training session (20)

Dot Net Online training in uk and usa
Dot Net Online training in uk and usaDot Net Online training in uk and usa
Dot Net Online training in uk and usa
 
Dotnet Online Training
Dotnet Online TrainingDotnet Online Training
Dotnet Online Training
 
ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015ASP.NET MVC 5 - EF 6 - VS2015
ASP.NET MVC 5 - EF 6 - VS2015
 
Asp.net
Asp.netAsp.net
Asp.net
 
Net online training
Net online trainingNet online training
Net online training
 
Metaworks4 intro
Metaworks4 introMetaworks4 intro
Metaworks4 intro
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Cert05 70-487 - developing microsoft azure and web services
Cert05   70-487 - developing microsoft azure and web servicesCert05   70-487 - developing microsoft azure and web services
Cert05 70-487 - developing microsoft azure and web services
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8
 
Cloud architecture patterns and pratices
Cloud architecture patterns and praticesCloud architecture patterns and pratices
Cloud architecture patterns and pratices
 
OrigoDB - take the red pill
OrigoDB - take the red pillOrigoDB - take the red pill
OrigoDB - take the red pill
 
How to generate customized java 8 code from your database
How to generate customized java 8 code from your databaseHow to generate customized java 8 code from your database
How to generate customized java 8 code from your database
 
Silicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your databaseSilicon Valley JUG - How to generate customized java 8 code from your database
Silicon Valley JUG - How to generate customized java 8 code from your database
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5
 

Último

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 

Último (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 

Asp.net MVC training session

  • 1.
  • 2. • A design Pattern (Methodology) • Invented by Smalltalk programmer (Trygve Reenskaug 1979). • Separation of Concerns / Single Responsibility Principle • More easily testable
  • 3. M Model V View C Controller • Representation of domain data • Business Logic • Persistence mechanisms • User Interface • The representation of Model • An intermediary between Model and View • Application’s Brain (Handle user requests, bind Data, return views)
  • 4. Ok C Controller M Model V View CreateInvoice (fact) Create invoice (data) fact = new Invoice () LatestInvoices () return view ("Last-Invoices", ListFact[]) ListFact[] HTML
  • 5. • Part of ASP.NET • Not an upgrade or replacement for Web Forms ASP.NET Webforms MVC Webpages
  • 6. • No server controls • No ViewState • No Code Behind • Full control over html • Unit Testing
  • 7. • Separation of application tasks (No code Behind) • Flexibility and Extensibility • Friendly URLs (Routing) • Scalability and Performance • Supports existing ASP.NET features (Authentication, Membership, roles, output caching,…) • Natural integration with Ajax
  • 8.
  • 9. • View Engines o Aspx o Razor • Layout • Partial View • Section • HtmlHelper, AjaxHelper
  • 10. • ActionLink @Html.ActionLink(“Modifier", “Edit“, new {Id=3}) <a href="/Product/Edit/6">Modifier</a> • Form Elements (Form, TextBox, Hidden,….) @Html.TextBox(“Nom") <input id=" Nom " type="text" value="" name=" Nom ">
  • 11. • DropDownList var db = new NorthwindDataContext(); IEnumerable<SelectListItem> items = db.Categories .Select(c => new SelectListItem { Value = c.CategoryID.ToString(), Text = c.CategoryName }); ViewBag.Categories = items; @Html.DropDownList("CategoryID", (IEnumerable<SelectListItem>) ViewBag.Categories)
  • 12. • Ajax ActionLink @Ajax.ActionLink("Get Time", "GetTime", new AjaxOptions () { UpdateTargetId="divTorefresh", HttpMethod="GET" }) <a href="/Home/GetTime" data-ajax-update="#divTorefresh" data-ajax-mode="after" data-ajax-method="GET" data- ajax="true">Get Time</a>
  • 13.
  • 14. • Action Results • Filters • Caching
  • 15. • ViewResult • PartialViewResult • JsonResult • JavaScriptResult • ContentResult • FileResult • RedirectResult
  • 16. • Authorization filters • Action filters • Result filters • Exception filters
  • 17. [OutputCache(Duration=3600)] Public ActionResult GetListCountries() { // Logic to get countries list } [OutputCache(Duration=3600, VaryByParam = "countryId")] Public ActionResult GetListRegions(int countryId) { // Logic to get regions list }
  • 18.
  • 20. • Required • DisplayName • Range • DataType • StringLength
  • 21.
  • 22. • Open source package manager for the .NET Framework • Provide the ability to produce and consume packages
  • 23.
  • 24. • Bundling & Minification • Web Api • Template Mobile • Asynchronous • RealTime avec SignalR
  • 25. Improve JavaScript and CSS files loading • Minimize the Number of requests (Bundle in one File) • Reduce the size of files (remove spaces, enters and comments) Fully customizable and extensible
  • 26.
  • 27.
  • 28.
  • 29. • Entity Framework • Database First • Model First • Code First
  • 30. • Object-relational mapping (ORM) Framework • Gives an automated mechanism for Data Access • Manipulate Data as Object • Reduce hard coded Query • Have inheritance relationships between entities • Performing basic CRUD(Create, Read, Update, Delete)
  • 31.
  • 32. • Existing DataBase • Generate .Edmx From DataBase • Use ObjectContext & DBContext • Use T4 template (POCO)
  • 33. • Empty Edmx Model • Design th DB Schema • Generate DataBase From Model
  • 34. • Create Domain Models (Class) • Generate DataBase From Domain Models • Full Control Over Code • No Autogenerated code
  • 35.
  • 36. • User Authentification • Authorization • Cross-site request forgery • Cross-site Scripting
  • 37. • Forms Authentification • Cookies • Windows Authentification • Windows Session • Via IIS • OAuth • Facebook, google, Hotmail, twitter, etc.
  • 38. • Role-based Authorization • [Authorize(Roles = "Admin, Super User")] • [Authorize(Users = "Betty, Johnny")]
  • 39. • Malicious attack (Cross Domain) • Using Forms • Session hijacking
  • 40. • Malicious attack Using Script Injection • Inject Code Inside Pages
  • 41.
  • 42. • Design pattern • Removal of hard-coded dependencies • Giving an object its instance variables (Dynamically)