1. Web Development
using
Visual Studio 2012 & ASP.NET MVC
Adil Ahmed Mughal
2. Speaker => Adil Ahmed Mughal
Affiliations:
Contact Information:
adil.mughal@live.com
@adilamughal
http://www.adilmughal.com
3. What to Expect Today?
• What you must already know?
– Object Oriented Programming Language such as Java, C++, C#
– Previous hands on .NET and Visual Studio
– Basic familiarity with web development (HTML, CSS, JavaScript)
• What you will learn?
– Understanding of how web works under the hood
– A glance look at Model-View-Controller
– Demonstration of sample build using ASP.NET MVC & Visual Studio
2012
4. Agenda
1. Web Fundamentals
– HTTP Transactions
– Static & Dynamic Web Pages
– Role Web Server - IIS
2. Beginning ASP.NET MVC
– Overview of MVC
– MVC Request Lifecycle
– Exploring Model, View, Controller (File -> New Project)
– Demo sample
6. HTTP Transactions
The browser generates a HTTP
Request e.g.
GET http://www.adilmughal.com
HTTP Request
HTTP Response
The server process the request and
sends the HTTP Response
containing HTML/JS/CSS for
browser to render
10. Static vs. Dynamic Pages
Static Pages Dynamic Pages
• Unchanging Content • Dynamic content
• Pre-written HTML defines web • Utilizes server side languages
pages such as PHP, ASP.NET, JSP etc.
• Send exactly the same response • May generate different HTML
to every request for each request
11. Role of Web Server
• Role of Web Server
– A piece of software that run on a physical or virtual
machine, which designed to serve web content over
the internet
– Typically it monitors port 80 for incoming HTTP
Requests
– On the Microsoft platform, IIS is the watchdog
intercepting HTTP requests
14. Pre-Requisite
• Microsoft Web Platform Installer is one stop shop to get
complete ecosystem of web tools to get started
– Server, Frameworks, Database, Tools etc.
– Get the installer from http://www.microsoft.com/web/platform/
• Once you install Web Platform Installer, download the
following to get started
– Visual Studio 2012 Web Express (includes ASP.NET MVC 4)
– Windows Azure SDK (optional, required for deployment on Azure)
16. ASP.NET MVC
• Web application development framework by
Microsoft to easily create dynamic websites
• Built on top of CLR allowing programmer to write
ASP.NET code using any .NET Languages (such as
C#, VB.NET etc.)
• ASP.NET supports various development models:
– Web Pages, MVC (Model View Controller), and Web
Forms.
18. Life Cycle of MVC Request
Browser URL Routing Controller Model View
HTTP
Request
new
Invoke
Invoke action method
Lookup view
Render (viewData)
HTML
24. Web Development Adil Ahmed Mughal
using adil.mughal@live.com
Visual Studio 2012 & @adilamughal
ASP.NET MVC http://www.adilmughal.com
Thank YOU for your time and
attention!