SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Programming is Fun
With ASP.NET MVC!
Ian Carnaghan
Page  2
Programming is Fun with ASP.NET MVC
Introduction to ASP.NET
What is ASP.NET?
 ASP.NET is a development framework for
building web pages and web sites with
HTML, CSS, JavaScript and server
scripting.
 It was first released in January 2002 with
version 1.0 of the .NET Framework, and
is the successor to Microsoft's Active
Server Pages (ASP) technology.
 ASP.NET supports three different
development models:
Web Pages, MVC (Model View
Controller), and Web Forms.
Page  3
ASP.NET
Visual Studio 2012
Programming is Fun with ASP.NET MVC
The ASP.NET Framework
ASP.NET
Web
Forms
ASP.NET
MVC
ASP.NET
Web
Pages
Web Forms
View Engine
Razor View
Engine
WebMatrix
What is ASP.NET?
 Web Pages is the Simplest ASP.NET
model. Similar to PHP and classic ASP
with built-in templates and helpers for
database, video, graphics, social media
and more.
 MVC separates web applications into
different different components and
provides a lighter weight framework,
separation of concerns and DRY
approach to development.
 Webforms is the traditional ASP.NET
event driven development model. Web
pages with added server controls, server
events, and server code.
Page  4
Programming is Fun with ASP.NET MVC
IIS
SQL
Server
Entity
Framework
ASP.NET
JS &
JQuery
The Microsoft Web Platform
Internet Information Services
is the web server used by
ASP.NET applications.
EF is an Object Relational
Mapper (ORM) – the layer
that converts DB elements
such as tables and views to
objects uses in the
application.
ASP.NET MVC comes with
JavaScript libraries, jQuery
and HTML 5 support.
ASP.NET can use a range of
databases, however SQL Server
is the most popular has great
support in Visual Studio.
ASP.NET is the development
framework.
Page  5
Programming is Fun with ASP.NET MVC
Model View Controller
MVC
Model–view–controller (MVC) is a software
architecture pattern which separates the
representation of information from the user's
interaction with it. It was introduced by Trygve
Reenskaug at Xerox Parc in 1976.
 Model represents the data and business logic
such as database tables, constraints and
validations.
 View represent the screens the users access.
The view uses data from the model to provide
information to the user.
 Controller handles requests sent in by the user
and determines what actions need to be taken
by the application.
Page  6
Programming is Fun with ASP.NET MVC
Interactions Follow Natural Cycle:
1. User takes action
2. Application changes data model
3. Updated view sent to user
Different Technologies
MVC compatible with combining
other technologies into tiers
or layers.
Full Control over UI
New Razor View Engine provides
greater control and cleaner code.
No Viewstate requirement with auto-
generated code –100s Kb smaller.
Total control over requests sent
netween server and browser.
User Experience
HTML 5 Technologies, Non-Obtrusive JS,
Routing,. Maintainability
Modern coding Standards
Convention over configuration.
Similar to other popular MVC
Frameworks including Grails,
Ruby on Rails, Spring MVC,
Monorail and many others.
Maintainablility
DRY approach to programming
Testability
Since the UI is completely seperated
from the business logic, it is easier to unit
tests.
Multiple Unit testing framworks available.
Why Microsoft ASP.NET MVC?
Page  7
Programming is Fun with ASP.NET MVC
C:InetpubwwwrootWebsitePerson.aspx
http://www.website.com/Person.aspx?id=5
http://www.website.com/Person/5
Physical Location
ASP.NET Style
MVC Style
Routing
 Routing in MVC comes packages with easy to configure rules based on different circumstances.
 By default {ControllerName}/{MethodName}/(optional Id)
 Many URLs can link to the same controller via different methods
Page  8
Programming is Fun with ASP.NET MVC
Code First
 Preferred by programmers who do not want to work with designers and EDMX.
 Full control (no autogenerated code).
 Seperation from DB, regardless of technology. The ORM will handle creation.
 Manual changes to DB problematic and lost since code defines the database.
Database First
 Best choice if you already have DB designed by DBAs.
 ORM creates entities for you to use in your application.
 Manual changes to the database are possible - update model from database
Model First
 Preferred by people interested in building a site with least amount of coding.
 Use design tools – Partial loss of control on both entities and database
 Can be very productive for small easy projects.
 Manual changes to DB problematic and lost since model defines the database.
Architectural Options for Developing an Application
Page  9
Programming is Fun with ASP.NET MVC
Person Entity:
 Id (int)
 FirstName (string)
 LastName (string)
 BirthDate (datetime)
Context:
 People (Collection of Person)
 Using ASP.NET DbContext library
for Entity Framework
Person Model
 Index Method – Call existing
records from model to pass to a
list view
 Create Method – Provide empty
model to pass to a create view and
handle posts
 Edit Method – Call an existing
record via the model to pass to an
edit view and handle posts
 Details Page – Call an existing
record via the model to pass to a
display view
Person Controller
 Person/Index
 Person/Create
 PersonEdit
 Person/Details
Person Views
Simple CRUD (Create Read Update Delete) Application
The Object Relational Mapper enables communication between the application and database and
converts database elements into application-ready objects.
ASP.NET uses Entity Framework and a .Net Library called DbContext for this process.
DbContext enables you to query a database and group together changes that will then be written back
to the store as a unit.
Page  10
Programming is Fun with ASP.NET MVC
Simple CRUD (Create Read Update Delete) Application
Page  11
Programming is Fun with ASP.NET MVC
 Office of Population Affairs was a legacy ColdFusion
Application, which was redesigned using ASP.NET
and launched in April 2013.
 Application required versioning of records, logging,
approvals and extensive search.
 Twitter Bootstrap was used for the frontend layout
providing a responsive HTML 5 compliant design.
 Solr libraries integrated with ASP.NET via SolrNET.
 MVC 4 using Code First Entify Framework
Implementation with SQL Server and IIS.
Office of Population Affairs
Boot
strap
Apache Solr
ASP.NET MVC 4 & EF
Page  12
Programming is Fun with ASP.NET MVC
Domain Model
 Object representation of the physical database tables
 Validation and contraints are defined here and used throughout the
application
Repositories
 Heavy lifting work of performing all transactions needed from the
application layer to the database
 Mapping between Domain objects and View Model objects
Abstraction
Layer
 Interfaces the controllers can use to perform repository actions.
 Provides an additional layer of seperation – if major changes occur in
repository – the controllers are not dependent upon them.
View Models
 Subsets of the Domain Model, proving view specific information.
 Example public Organization Details only contains specific fields.
OPA Application Structure
Page  13
Programming is Fun with ASP.NET MVC
Community Health Online Resource Center
Ajax-based CDC Application
 Resource database of records
tagged in various categories.
 Full-text searching and AJAX front-
end for user interaction.
 Back-end administration for
managing resources and adding
users to maintain the database.
 Integration into CDC PIV Card
authentication via C# Active Directory
libraries.
Page  14
Programming is Fun with ASP.NET MVC
 National Diabetes Education Program
 Application will share code-base for the CHORC
 Records listing with thumbnails and integration with
NDEP API for adding resources to external cart.
 Monarch Academy web-based Curriculum Mapping.
 CM for Expeditionary Learning
 Maintainable by Administrators, Accessible by all
Teachers
 Based on Education Research
Future Projects
Page  15
Programming is Fun with ASP.NET MVC
 http://www.pluralsight.com
 Pluralsight is by and far the
best Microsoft Development
Training Site!
 ICF may pay for the yearly
subscription via Training or
Tuition Reimbursement
 Check out Julie Lerman
 http://www.apress.com/97814
30242369
 Work through the Sports
Store tutorial!
 Great indepth explanations
 Keep as good reference
guide
 http://www.hanselman.com
 Check out his other videos at
various conferences
 Subscribe to Hanselminutes
Podcasts
 Also check out .Net Rocks!
Learning Resources for ASP.NET MVC 4
* Oh and did I mention Stackoverflow!?
Page  16
Do You Have
Any Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSean McLellan
 
SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013NCCOMMS
 
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien
 
Industry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for AngularIndustry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for AngularJai Prakash Mishra
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 
CodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comCodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comChristopher Cubos
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Fabio Franzini
 
SharePoint development 2017 wrap-up
SharePoint development   2017 wrap-upSharePoint development   2017 wrap-up
SharePoint development 2017 wrap-upJoel Rodrigues
 
Power Apps Advanced Training Brochure
Power Apps Advanced Training BrochurePower Apps Advanced Training Brochure
Power Apps Advanced Training BrochureShiftConsulting
 
Parallel minds silverlight
Parallel minds silverlightParallel minds silverlight
Parallel minds silverlightparallelminder
 
SharePoint 2010 and Colligo for ECM
SharePoint 2010 and Colligo for ECMSharePoint 2010 and Colligo for ECM
SharePoint 2010 and Colligo for ECMlchapman
 
Application innovation & Developer Productivity
Application innovation & Developer ProductivityApplication innovation & Developer Productivity
Application innovation & Developer ProductivityKushan Lahiru Perera
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien
 
A Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoA Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoPRASANNAVENK
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
Training on webwroks1
Training on webwroks1Training on webwroks1
Training on webwroks1sumeettechno
 
Sybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpSybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpPrabhakar Manthena
 

Was ist angesagt? (20)

SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
 
SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013
 
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developers
 
Industry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for AngularIndustry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for Angular
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
CodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comCodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.com
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvc
 
SharePoint development 2017 wrap-up
SharePoint development   2017 wrap-upSharePoint development   2017 wrap-up
SharePoint development 2017 wrap-up
 
Power Apps Advanced Training Brochure
Power Apps Advanced Training BrochurePower Apps Advanced Training Brochure
Power Apps Advanced Training Brochure
 
Parallel minds silverlight
Parallel minds silverlightParallel minds silverlight
Parallel minds silverlight
 
SharePoint 2010 and Colligo for ECM
SharePoint 2010 and Colligo for ECMSharePoint 2010 and Colligo for ECM
SharePoint 2010 and Colligo for ECM
 
Application innovation & Developer Productivity
Application innovation & Developer ProductivityApplication innovation & Developer Productivity
Application innovation & Developer Productivity
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
 
A Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & DjangoA Gentle introduction to Web Development & Django
A Gentle introduction to Web Development & Django
 
Sense/Net 6.0 product
Sense/Net 6.0 productSense/Net 6.0 product
Sense/Net 6.0 product
 
DevOps lagos meetup
DevOps lagos meetupDevOps lagos meetup
DevOps lagos meetup
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Training on webwroks1
Training on webwroks1Training on webwroks1
Training on webwroks1
 
Sybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpSybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wp
 

Ähnlich wie Programming is Fun with ASP.NET MVC

Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkShravan A
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdflubnayasminsebl
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorialsTIB Academy
 
Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Mike Brown
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot netneha sharma
 
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 overviewSergey Seletsky
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamentalldcphuc
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayLanate Drummond
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring FrameworkEdureka!
 
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Top 10 -  ASP.NET Interview Questions And Answers 2023.pdfTop 10 -  ASP.NET Interview Questions And Answers 2023.pdf
Top 10 - ASP.NET Interview Questions And Answers 2023.pdfRuddarpratap
 
ASP.NET MVC - In the Wild
ASP.NET MVC - In the WildASP.NET MVC - In the Wild
ASP.NET MVC - In the WildBrian Boatright
 
ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC IntroductionSumit Chhabra
 
Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMahmoudOHassouna
 
Sanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev Kumar Paul
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010David McCarter
 

Ähnlich wie Programming is Fun with ASP.NET MVC (20)

Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity Framework
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdf
 
Asp.netmvc handson
Asp.netmvc handsonAsp.netmvc handson
Asp.netmvc handson
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
 
Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?
 
An overview of microsoft mvc dot net
An overview of microsoft mvc dot netAn overview of microsoft mvc dot net
An overview of microsoft mvc dot net
 
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
 
ASP.NET MVC Fundamental
ASP.NET MVC FundamentalASP.NET MVC Fundamental
ASP.NET MVC Fundamental
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring Framework
 
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
Top 10 -  ASP.NET Interview Questions And Answers 2023.pdfTop 10 -  ASP.NET Interview Questions And Answers 2023.pdf
Top 10 - ASP.NET Interview Questions And Answers 2023.pdf
 
ASP.NET MVC - In the Wild
ASP.NET MVC - In the WildASP.NET MVC - In the Wild
ASP.NET MVC - In the Wild
 
Mvc3 part1
Mvc3   part1Mvc3   part1
Mvc3 part1
 
ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC Introduction
 
Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVC
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
Sanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-Latest
 
Siva_DotNet
Siva_DotNetSiva_DotNet
Siva_DotNet
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 

Mehr von Ian Carnaghan

Standardizing Drupal Development Environments using Containers
Standardizing Drupal Development Environments using ContainersStandardizing Drupal Development Environments using Containers
Standardizing Drupal Development Environments using ContainersIan Carnaghan
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for DevelopersIan Carnaghan
 
Exploratory Eye Tracking Research with Curriculum Mapping
Exploratory Eye Tracking Research with Curriculum MappingExploratory Eye Tracking Research with Curriculum Mapping
Exploratory Eye Tracking Research with Curriculum MappingIan Carnaghan
 
Drupal at ICF International
Drupal at ICF InternationalDrupal at ICF International
Drupal at ICF InternationalIan Carnaghan
 
Information Culture Wrapup
Information Culture WrapupInformation Culture Wrapup
Information Culture WrapupIan Carnaghan
 
History of Online Education
History of Online EducationHistory of Online Education
History of Online EducationIan Carnaghan
 

Mehr von Ian Carnaghan (14)

Standardizing Drupal Development Environments using Containers
Standardizing Drupal Development Environments using ContainersStandardizing Drupal Development Environments using Containers
Standardizing Drupal Development Environments using Containers
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
Doctoral Defense
Doctoral DefenseDoctoral Defense
Doctoral Defense
 
Exploratory Eye Tracking Research with Curriculum Mapping
Exploratory Eye Tracking Research with Curriculum MappingExploratory Eye Tracking Research with Curriculum Mapping
Exploratory Eye Tracking Research with Curriculum Mapping
 
Drupal at ICF International
Drupal at ICF InternationalDrupal at ICF International
Drupal at ICF International
 
Curriculum Mapping
Curriculum MappingCurriculum Mapping
Curriculum Mapping
 
Information Culture Wrapup
Information Culture WrapupInformation Culture Wrapup
Information Culture Wrapup
 
Usability
UsabilityUsability
Usability
 
Future Careers
Future CareersFuture Careers
Future Careers
 
Motion Graphics
Motion GraphicsMotion Graphics
Motion Graphics
 
Gamification
GamificationGamification
Gamification
 
Drupal
DrupalDrupal
Drupal
 
History of Online Education
History of Online EducationHistory of Online Education
History of Online Education
 
Social Media
Social MediaSocial Media
Social Media
 

Kürzlich hochgeladen

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Kürzlich hochgeladen (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Programming is Fun with ASP.NET MVC

  • 1. Programming is Fun With ASP.NET MVC! Ian Carnaghan
  • 2. Page  2 Programming is Fun with ASP.NET MVC Introduction to ASP.NET What is ASP.NET?  ASP.NET is a development framework for building web pages and web sites with HTML, CSS, JavaScript and server scripting.  It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology.  ASP.NET supports three different development models: Web Pages, MVC (Model View Controller), and Web Forms.
  • 3. Page  3 ASP.NET Visual Studio 2012 Programming is Fun with ASP.NET MVC The ASP.NET Framework ASP.NET Web Forms ASP.NET MVC ASP.NET Web Pages Web Forms View Engine Razor View Engine WebMatrix What is ASP.NET?  Web Pages is the Simplest ASP.NET model. Similar to PHP and classic ASP with built-in templates and helpers for database, video, graphics, social media and more.  MVC separates web applications into different different components and provides a lighter weight framework, separation of concerns and DRY approach to development.  Webforms is the traditional ASP.NET event driven development model. Web pages with added server controls, server events, and server code.
  • 4. Page  4 Programming is Fun with ASP.NET MVC IIS SQL Server Entity Framework ASP.NET JS & JQuery The Microsoft Web Platform Internet Information Services is the web server used by ASP.NET applications. EF is an Object Relational Mapper (ORM) – the layer that converts DB elements such as tables and views to objects uses in the application. ASP.NET MVC comes with JavaScript libraries, jQuery and HTML 5 support. ASP.NET can use a range of databases, however SQL Server is the most popular has great support in Visual Studio. ASP.NET is the development framework.
  • 5. Page  5 Programming is Fun with ASP.NET MVC Model View Controller MVC Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user's interaction with it. It was introduced by Trygve Reenskaug at Xerox Parc in 1976.  Model represents the data and business logic such as database tables, constraints and validations.  View represent the screens the users access. The view uses data from the model to provide information to the user.  Controller handles requests sent in by the user and determines what actions need to be taken by the application.
  • 6. Page  6 Programming is Fun with ASP.NET MVC Interactions Follow Natural Cycle: 1. User takes action 2. Application changes data model 3. Updated view sent to user Different Technologies MVC compatible with combining other technologies into tiers or layers. Full Control over UI New Razor View Engine provides greater control and cleaner code. No Viewstate requirement with auto- generated code –100s Kb smaller. Total control over requests sent netween server and browser. User Experience HTML 5 Technologies, Non-Obtrusive JS, Routing,. Maintainability Modern coding Standards Convention over configuration. Similar to other popular MVC Frameworks including Grails, Ruby on Rails, Spring MVC, Monorail and many others. Maintainablility DRY approach to programming Testability Since the UI is completely seperated from the business logic, it is easier to unit tests. Multiple Unit testing framworks available. Why Microsoft ASP.NET MVC?
  • 7. Page  7 Programming is Fun with ASP.NET MVC C:InetpubwwwrootWebsitePerson.aspx http://www.website.com/Person.aspx?id=5 http://www.website.com/Person/5 Physical Location ASP.NET Style MVC Style Routing  Routing in MVC comes packages with easy to configure rules based on different circumstances.  By default {ControllerName}/{MethodName}/(optional Id)  Many URLs can link to the same controller via different methods
  • 8. Page  8 Programming is Fun with ASP.NET MVC Code First  Preferred by programmers who do not want to work with designers and EDMX.  Full control (no autogenerated code).  Seperation from DB, regardless of technology. The ORM will handle creation.  Manual changes to DB problematic and lost since code defines the database. Database First  Best choice if you already have DB designed by DBAs.  ORM creates entities for you to use in your application.  Manual changes to the database are possible - update model from database Model First  Preferred by people interested in building a site with least amount of coding.  Use design tools – Partial loss of control on both entities and database  Can be very productive for small easy projects.  Manual changes to DB problematic and lost since model defines the database. Architectural Options for Developing an Application
  • 9. Page  9 Programming is Fun with ASP.NET MVC Person Entity:  Id (int)  FirstName (string)  LastName (string)  BirthDate (datetime) Context:  People (Collection of Person)  Using ASP.NET DbContext library for Entity Framework Person Model  Index Method – Call existing records from model to pass to a list view  Create Method – Provide empty model to pass to a create view and handle posts  Edit Method – Call an existing record via the model to pass to an edit view and handle posts  Details Page – Call an existing record via the model to pass to a display view Person Controller  Person/Index  Person/Create  PersonEdit  Person/Details Person Views Simple CRUD (Create Read Update Delete) Application The Object Relational Mapper enables communication between the application and database and converts database elements into application-ready objects. ASP.NET uses Entity Framework and a .Net Library called DbContext for this process. DbContext enables you to query a database and group together changes that will then be written back to the store as a unit.
  • 10. Page  10 Programming is Fun with ASP.NET MVC Simple CRUD (Create Read Update Delete) Application
  • 11. Page  11 Programming is Fun with ASP.NET MVC  Office of Population Affairs was a legacy ColdFusion Application, which was redesigned using ASP.NET and launched in April 2013.  Application required versioning of records, logging, approvals and extensive search.  Twitter Bootstrap was used for the frontend layout providing a responsive HTML 5 compliant design.  Solr libraries integrated with ASP.NET via SolrNET.  MVC 4 using Code First Entify Framework Implementation with SQL Server and IIS. Office of Population Affairs Boot strap Apache Solr ASP.NET MVC 4 & EF
  • 12. Page  12 Programming is Fun with ASP.NET MVC Domain Model  Object representation of the physical database tables  Validation and contraints are defined here and used throughout the application Repositories  Heavy lifting work of performing all transactions needed from the application layer to the database  Mapping between Domain objects and View Model objects Abstraction Layer  Interfaces the controllers can use to perform repository actions.  Provides an additional layer of seperation – if major changes occur in repository – the controllers are not dependent upon them. View Models  Subsets of the Domain Model, proving view specific information.  Example public Organization Details only contains specific fields. OPA Application Structure
  • 13. Page  13 Programming is Fun with ASP.NET MVC Community Health Online Resource Center Ajax-based CDC Application  Resource database of records tagged in various categories.  Full-text searching and AJAX front- end for user interaction.  Back-end administration for managing resources and adding users to maintain the database.  Integration into CDC PIV Card authentication via C# Active Directory libraries.
  • 14. Page  14 Programming is Fun with ASP.NET MVC  National Diabetes Education Program  Application will share code-base for the CHORC  Records listing with thumbnails and integration with NDEP API for adding resources to external cart.  Monarch Academy web-based Curriculum Mapping.  CM for Expeditionary Learning  Maintainable by Administrators, Accessible by all Teachers  Based on Education Research Future Projects
  • 15. Page  15 Programming is Fun with ASP.NET MVC  http://www.pluralsight.com  Pluralsight is by and far the best Microsoft Development Training Site!  ICF may pay for the yearly subscription via Training or Tuition Reimbursement  Check out Julie Lerman  http://www.apress.com/97814 30242369  Work through the Sports Store tutorial!  Great indepth explanations  Keep as good reference guide  http://www.hanselman.com  Check out his other videos at various conferences  Subscribe to Hanselminutes Podcasts  Also check out .Net Rocks! Learning Resources for ASP.NET MVC 4 * Oh and did I mention Stackoverflow!?
  • 16. Page  16 Do You Have Any Questions?