The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which...
-
Upload
karen-sherman -
Category
Documents
-
view
214 -
download
0
Transcript of The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which...
The Web Architecture and ASP.NET
Slide 2
Review of the Web (1) It began with HTTP and HTML, which
delivers static Web pages to browsers which would render those pages
Browser Web Server
HTTP Request
HTTP Response(Web page)
Slide 3
Review of the Web (2) Scripting languages were created to
execute client code within the context of a browser
Browser
Web Server
HTTP Request
HTTP Response(Web page / code)
Client code (JavaScript)(VBScript)
Slide 4
Review of the Web (3) Server-side applications were created to
execute code and dynamically generate Web pages based on a particular requestBrowser Web Server
HTTP Request
HTTP Response(Web page / code)
Client code
(script)
Interpret request
Generate HTML and
script
Slide 5
Review of the Web (4) And now we have AJAX / JSON making
partial page requests
Browser
Web Server
HTTP Request
HTTP Response(Web page / code)
Client code (script)
Interpret request
Generate HTML and
script
Execute AJAX Request
Client code (Silverlight)
Slide 6
The Great Client/Server Debate Where do we process?
Client or server What get’s processed where? And the interaction between client and
server
Where does bandwidth fit into this equation? Where does processing power (and latency)
fit into this equation?
Slide 7
And all the Related Technologies jQuery – yes it works with ASP AJAX – ASP has some interesting AJAX
libraries We can (AND WILL) write our own handlers for
those AJAX requests Silverlight is a well-used client-side
framework part of RIA (http://msdn.microsoft.com/en-us/library/ee707344(v=vs.91).aspx)
Azure?
Slide 8
Current Client Technologies And what browser (and version) do
you use? Scripting details vary from browser to
browser DOM objects can vary a bit too HTML5 and CSS3 support varies but is
pretty good
Slide 9
Current Server Technologies Apache WebSphere (IBM) Oracle / Sun (doing ASP.NET, CGI and PHP) Microsoft and IIS HP and others have offerings
Largely based on Apache
In summary, there are quite a few
Slide 10
ASP.NET (History) Introduced with the .NET Framework in
2002 It made Web development look like traditional
Windows development ASP.NET 2.0 introduced in 2005 gave
developers enhanced database tools This included desktop improvements too MVC was introduced / much more later
ASP.NET 3.0 released with 2008
Slide 11
ASP.NET (History) ASP.NET 4 released with Visual Studio
2010 and version 4 of the Framework Razor was introduced along with ASP.NET
Web pages Web pages and Web Forms are different
There is an open-source movement (We will see how this pans out)
Support for HTML 5 and CSS 3 is very good
Slide 12
ASP.NET (History) Current version is Visual Studio 2013
and Framework version 4.5.1
Slide 13
ASP.NET (Architecture)
Slide 14
What is a .NET Application (1)?
It looks and works surprisingly like Java Source code (VB, C#, etc.) is compiled into
a machine independent assembly language (MSIL or IL)
The executable file is called an assembly
IL can be disassembled using the IL Disassembler (ILDASM)
Slide 15
What is a .NET Application (2)?
MSIL is translated into native executable code via the Just-in-Time (JIT) compiler It’s possible to precompile an application
using the Native Image Generator (Ngen) All .NET applications run under the control of
the Common Language Runtime (CLR) We call this managed code
Slide 16
What is a .NET Application (3)?
On the desktop, the application runs under the control of the Common Language Runtime
With Respect to Web applications, all execution is handled on the server (IIS)
http://msdn.microsoft.com/en-us/library/bb470252.aspx
Slide 17
The ASP.NET Runtime When IIS sees an .aspx file, it loads
aspnet_isapi.dll to create the Page object Application behavior is controlled by
configuration files Machine.config is the global machine
configuration file Web.config allows you to override default
configuration items Both are XML documents
Slide 18
Programming ASP.NET Conceptually it’s much like the VB
programming you are used to You create procedures in event handlers
and general procedures You declare variables
Instead of a form, the primary user interface is the WebForm
Slide 19
Current ASP Technologies ASP Web Forms
Have been around for a while and have continued to evolve
ASP.NET MVC It stands for Model-View-Controller It’s an alternative to Web Forms
ASP.NET Web Pages (Razor) A more lightweight processing model Looks a bit like PHP
Silverlight and RIA
Slide 20
ASP.NET Web Forms Provides server-side tools for site navigation
Menus, Drill-down toolbars, breadcrumbs, etc. Authentication tools Database connections Client and server executable code State management and caching Authentication and role management Deployment tools Robust development tools (Visual Studio)
Slide 21
ASP.NET Web Forms (Introduction)
Client (browser)
HTTP Server
(IIS)
ASP Worker
Process request
Generate client page (HTML)
request
response
Slide 22
Web Forms and Stateful Web Programming Remember that the Web is stateless
Web servers to not persist state from one request to the next
ASP.NET does allow stateful programming though various hidden fields and serialized data server side session objects
Much more on state management later
Slide 23
Web Forms and Event-Driven programming ASP.NET, though serialization, simulates
event-driven programming ASP.NET events differ significantly from
Windows Forms events
Slide 24
Introduction to the Web Forms Component Model Remember that .NET is an OOP environment
and ASP.NET is no exception As the developer, you create .aspx pages that
make up a Web application When executed, the .aspx page is compiled into
a custom class that inherits from System.Web.UI.Page
As the developer, you can program against this class just as you would program against any class
It all happens on the server!
Slide 25
ASP.NET MVC MVC is the acronym form Model-View-
Controller It’s a design pattern coined by the GOF
It requires version 4 of the .NET Framework
It’s an alternative to traditional ASP.NET Web forms
Slide 26
Web Matrix and Razor A “lightweight” technology to create
simple Web sites Requires version 4.0 of the .NET
Framework and a few add-ins
Slide 27
Silverlight It run on a client (browser) and
communicates with a server via RIA services Netflix?