SlideShare a Scribd company logo
1 of 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?

More Related Content

What's hot

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
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvcifnu bima
 
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
 
Sense/Net 6.0 product
Sense/Net 6.0 productSense/Net 6.0 product
Sense/Net 6.0 productSense/Net Inc.
 
DevOps lagos meetup
DevOps lagos meetupDevOps lagos meetup
DevOps lagos meetupEwere Diagboya
 
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
 

What's hot (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
 

Similar to 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
 
Asp.netmvc handson
Asp.netmvc handsonAsp.netmvc handson
Asp.netmvc handsonPrashant Kumar
 
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
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - IntroductionSudhakar Sharma
 
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
 

Similar to 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
 

More from 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
 
Doctoral Defense
Doctoral DefenseDoctoral Defense
Doctoral DefenseIan 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
 
Curriculum Mapping
Curriculum MappingCurriculum Mapping
Curriculum MappingIan Carnaghan
 
Information Culture Wrapup
Information Culture WrapupInformation Culture Wrapup
Information Culture WrapupIan Carnaghan
 
Future Careers
Future CareersFuture Careers
Future CareersIan Carnaghan
 
Motion Graphics
Motion GraphicsMotion Graphics
Motion GraphicsIan Carnaghan
 
History of Online Education
History of Online EducationHistory of Online Education
History of Online EducationIan Carnaghan
 

More from 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
 

Recently uploaded

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 

Recently uploaded (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

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?