Dynamic Web Application Development using ASP.
NET
by Andy Gravell and David Parsons
Chapter 1 Introduction to Web Applications
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Learning Objectives
Look at what web applications do Look at the evolution of the Internet and the World Wide Web Explain important Internet and Web technologies Look at web application architectures Introduce the concepts of the Web 2.0 and AJAX
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Where We Are Now
Web based companies like Yahoo and Google are as famous as Coca Cola and Virgin We expect all the organisations that we deal with to have a web presence We expect to be able to manage our money, book travel and purchase goods and services without having to step away from the computer
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
What a Web Application Does
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
E-Everything The Internet and the World Wide Web
Web applications rely on both the Internet and the World Wide Web
They are not the same thing The Internet predates the web by more than 10 years
In the late 1970s the US Advanced Research Projects Agency (ARPA) built the ARPAnet:
Originally linked a small number of research sites Same core technologies as the much bigger Internet that followed
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
The World Wide Web
The World Wide Web (WWW or W3) dates from the 1990s A hypertext based collection of multimedia information accessible via the Internet
The traffic on the information highway
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Evolution of the Web
The web began largely as an academic tool
Its main aim was to assist research
It soon became popular for leisure applications. It has since become a key element in business, not only for .COMs but as part of the IT strategy of a wide range of organisations.
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
World Wide Web Timeline
Invented by Tim Berners Lee at CERN (European organisation for nuclear research) in 1990
A distributed hypertext system for managing information at CERN (based on previous hypertext research)
1991-3: web servers begin to come online outside of CERN. WWW technology made free by CERN 1993: First publicly available graphical browser NCSA Mosaic Commercial browsers followed (Navigator, Explorer, Opera, Firefox etc)
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Internet Technologies
There are some core technologies that enable the Internet to work
TCP/IP IP Addresses The Domain Name System (DNS)
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
TCP / IP
The Internet uses a communications protocol known as TCP/IP
Transmission Control Protocol / Internet Protocol
Actually a whole set of related protocols and tools
Related protocols include SMTP (Simple Mail Transfer Protocol) Related tools include FTP (File Transfer Protocol)
10
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
IP Addresses
Computers are identified by their IP address Hardware devices known as routers glue all the different networks together
11
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
IP Addresses
Every machine on the internet has a unique IP address
A 32 bit binary number (billions of combinations, though IPv6 will have many more) The format is nnn.nnn.nnn.nnn Each of these numbers falls in the range 0 255. e.g. 127.0.0.1
These are expressed as four sets of dotted decimal numbers
Given an IP address, one machine can connect to another as if they were on the same physical network Some machines have fixed IP addresses, others are temporarily allocated an IP address from a pool when they connect
Cengage Learning 2010
12
Dynamic Web Application Development using ASP.NET
Domain Names
Most web site hosts use domain names rather than actual IP addresses The Domain Name System (DNS) enables domain names to be converted into the correct IP address
resolver programs query name servers for IP addresses
13
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
DNS Zones
The DNS consists of a number of dedicated servers (a distributed database) that maintain naming information for different zones These zones relate to type of site or country of origin
Several name servers may be involved in resolving a single name request
14
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
DNS Zones
A zone is a set of related domain names, e.g .com, .edu, etc. organised in a tree
15
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Advantages of Domain Names
Domain names are better than just using IP addresses because
Domain names are easier to remember Names reflect the identity of the owner The mapping between a domain name and an IP address can change, so the same name can migrate between different host systems
Email addresses use domain names e.g. [email protected]
Cengage Learning 2010
They are also important for email
16
Dynamic Web Application Development using ASP.NET
Important World Wide Web Technologies
HTTP (HyperText Transfer Protocol) HTML (HyperText Markup Language) URLs, URIs and URNs
17
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
HyperText Transfer Protocol (HTTP)
HTTP is a request-response protocol
Clients (usually browser software) send a request to a web server
The server handles the request and provides a response, usually in the form of an HTML page
18
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
HTTP Request Types
HTTP Requests can be:
GET, POST, HEAD, PUT, DELETE, CONNECT, OPTIONS or TRACE A GET request is used to retrieve information from the server (often contains a search query or other parameter data) A POST request is used to send data to the server (typically from an HTML form)
Usually GET or POST
19
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Clients and Web Servers
Clients
(browsers) send HTTP requests and web servers send HTTP responses
Provide HTML pages to the client
20
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
HTML
The
information on the web is mainly in the form of HTML (HyperText Markup Language) pages
HTML pages are text documents that contain special mark-up tags telling the browser what type of information they contain
<html> <head> <title>My Page</title> </head> <body>
21
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
HTML
It is up to the browser to format the page and manage its content
The same page can look different in different browsers
As well as text, these pages can contain images, sound, animation and other programs (e.g. Flash, Real Player, Adobe Acrobat etc) Browsers can use plugins to handle these special types of content
22
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
URLs
A URL is the complete location of an Internet resource, comprising:
The protocol of the request (usually http://) The servers domain name or IP address The port number (http is usually 80, https 443) The subdirectory path (if applicable) The name of the resource (though there may be a default) e.g. 404 file not found
Failed requests have specific HTTP responses
23
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Example URL
http://www.webhomecover.com:80/help/callcentres.html
protocol domain port path filename
Can be the name of a resource that generates dynamic content
24
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
URNs and URIs
A URL is a specific kind of URI (Uniform Resource Identifier) that identifies a web resource that can be downloaded Another type of URI is a URN (Uniform Resource Name), which looks like a URL but does not necessarily relate to a web resource Only used to provide a globally unique name for something
Cengage Learning 2010
25
Dynamic Web Application Development using ASP.NET
Intranets
As well as having a public presence on the internet, many companies maintain a private intranet behind a security firewall
Pages that are only available inside the company Low cost of ownership by using the standard technologies of the internet Paperless internal communication Information from corporate databases in accessible formats
Cengage Learning 2010
26
Dynamic Web Application Development using ASP.NET
Extranets
An extranet falls somewhere between the internet and an organisations intranet
Only selected outsiders, such as customers, suppliers or trading partners, are allowed access
Extranets can range from highly secure business to business (B2B) systems to selfregistration systems
Can be used, for example, to allow customers of courier companies to track their deliveries
Cengage Learning 2010
27
Dynamic Web Application Development using ASP.NET
Portals
Gateways into other applications A collection of portlets Personalised / customisable Used in the mobile internet (e.g. Vodafone Live!) See Yahoo!, iGoogle etc
28
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Layers
Conceptual layering of system components
May or may not be deployed on separate physical nodes Presentation
Business Logic
Data Management
29
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Layers in a Word Processing System
Desktop Word Processor Editing view, print preview
Single computer
Presentation Layer
Spell checking, formatting, paginating, editing Business Logic Layer Data Management Layer Documents paragraphs, words, letters, diagrams
concepts
processes
Save to file, load from file
30
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Tiers
Physical Deployment onto distributed nodes
Presentation
Application Database DB
31
Web applications are multi tier
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Tiers in a Web Based Banking System
Multiple computers (many client browsers) Presentation Tier Web based banking system Web browser view processes Multiple computers Business Logic Tier Checking accounts, transferring funds, ordering cheque books Accounts, customers, transactions, statements..
Multiple computers
Data Management Tier
concepts Create, read, update and delete information in a database
32
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
The Web 2.0
First Web 2.0 Conference 2004 The web as a software platform
Software above the level of a single device
XML, mashups, RSS Wikis, blogs, reviews
Service oriented architectures
User and contributor communities
33
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
AJAX
Asynchronous JavaScript and XML
JavaScript is a programming language that can run inside a browser We can update parts of the page dynamically by connecting to the server without replacing the current page
Rich user experience
34
Cengage Learning 2010
Dynamic Web Application Development using ASP.NET
Chapter Summary
Principal features, technologies and uses of web applications The Internet and the World Wide Web Distributed architectures that web applications use Some special types of web application Web 2.0 and AJAX
Cengage Learning 2010
35