web development using asp.net mvc
DESCRIPTION
A talk for newbie web developers at AIOUTRANSCRIPT
![Page 1: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/1.jpg)
Web Development using
Visual Studio 2012 & ASP.NET MVC
Adil Ahmed Mughal
![Page 2: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/2.jpg)
Speaker => Adil Ahmed Mughal
Affiliations:
Contact Information:
@adilamughal
http://www.adilmughal.com
![Page 3: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/3.jpg)
What to Expect Today?
• What you must already know? – Object Oriented Programming Language such as Java,
C++, C# – 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
![Page 4: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/4.jpg)
Agenda
• Web Fundamentals – HTTP Transactions
– Static & Dynamic Web Pages
– Role Web Server
• Beginning ASP.NET MVC – Overview of MVC
– Exploring MVC (File -> New Project)
– ASP.NET Intrinsic objects
– Demo Site
![Page 5: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/5.jpg)
HTTP Transactions
• HTTP Request & Response
– The communication mechanism by which Web browsers talk to Web sites
– As a connection protocol, HTTP is built around several basic commands
– GET, HEAD, POST
– HTTP is Stateless Protocol
![Page 6: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/6.jpg)
Web Browser (Client)
Web Site (Server)
HTTP GET
http://www.abc.com
HTML to be rendered
by browser Response
![Page 7: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/7.jpg)
HTTP Transactions
• Sample GET Request
GET http://www.adilmughal.com HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, ... , */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; ... .NET CLR 3.0.04506.30) Host: localhost:80 Connection: Keep-Alive
![Page 8: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/8.jpg)
HTTP Transactions
• Sample Response
![Page 9: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/9.jpg)
Static vs. Dynamic Pages
• Static Pages
– The earliest web sites were built primarily using static HTML pages.
– HTML eventually evolved to be capable of much more
• Dynamic Web Pages
– The user can make requests (often through a form) for data contained in a database on the server that will be assembled on the fly
• What's the difference?
– Static pages are those that send exactly the same response to every request
– Dynamic pages can customize the response on the server to offer personalization based on cookies and information it can get from the visitor.
![Page 10: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/10.jpg)
Role of Web Server
• Role of Web Server
– A program on server that monitors port 80 for incoming HTTP Requests
– On the Microsoft platform, IIS is the watchdog intercepting HTTP requests from port 80—the normal inbound port for HTTP requests
![Page 11: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/11.jpg)
Web Browser (Client)
Web Site (Server)
HTTP GET
http://www.abc.com
HTML to be rendered
by browser Response
IIS
(Web Server)
![Page 12: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/12.jpg)
Beginning 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 three different development models: – Web Pages, MVC (Model View Controller), and Web
Forms.
![Page 13: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/13.jpg)
Overview of MVC
![Page 14: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/14.jpg)
Life Cycle of MVC Request
Browser URL Routing Controller Model View
POST
new
Invoke action Invoke method
Lookup view
Render (viewData)
HTML
![Page 15: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/15.jpg)
Exploring ASP.NET MVC
• Demo: File -> New Project
![Page 16: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/16.jpg)
DEMO
![Page 17: Web development using ASP.NET MVC](https://reader033.vdocuments.us/reader033/viewer/2022052904/557b868dd8b42aff318b57eb/html5/thumbnails/17.jpg)
Web Development using
Visual Studio 2012 & ASP.NET MVC
Thank YOU for your time and attention!
Adil Ahmed Mughal