11. Web-based Applications - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

11. Web-based Applications

Description:

Web-based apps offer many advantages: extend reach of application to ... http://host/page.asp. IIS. client. ASP. engine. HTML. 21. Visual Studio .NET. Example ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 25
Provided by: joehummelf
Category:
Tags: applications | asp | based | hosting | net | web

less

Transcript and Presenter's Notes

Title: 11. Web-based Applications


1
11. Web-based Applications
2
Objectives
  • Real-world applications are typically
    multi-tier, distributed designs involving many
    components the web server being perhaps the
    most important component in today's
    applications...
  • Web-based applications
  • IIS
  • Static vs. dynamic web apps

3
Part 1
  • Web-based applications

4
Web application
  • Web server is just another tier
  • Application now accessible over the internet
  • from any client platform!

Web Server (IIS)
obj
obj
Web Page
Browser
obj
ANY platform
Windows Server
HTML / HTTP
Business
Data Access
Data
Presentation
5
Why?
  • Web-based apps offer many advantages
  • extend reach of application to people AND
    platform
  • based on open, non-proprietary technologies

6
Types of web apps
  • Two types
  • WebForms GUI-based app displayed in browser via
    HTML
  • WebServices object-based app returning raw XML

browser
HTML
Web server
Web Page
obj
obj
custom FE
SOAP,XML
obj
other App
7
Example workshop web site
8
Behind the scenes
Web server
Browser
Web Page
9
The key to web-based programming
  • It's a client-server relationship
  • client makes request
  • server does some processing
  • client sees OUTPUT of server-side processing

10
Part 2
  • IIS

11
Internet Information Services (IIS)
  • IIS is Microsoft's Web Server
  • runs as a separate process "inetinfo.exe"
  • requires a server-like OS Windows NT, 2000, XP
    Pro, 2003
  • multi-threaded to service thousands of requests

client
IIS
client
client
Windows Server
. . .
12
Configuring IIS
  • Configured manually via
  • control panel, admin tools, Internet Information
    Services

13
A web site
  • IIS deals with web sites
  • A web site a web application
  • How IIS works
  • each web site has its own physical directory on
    hard disk
  • each web site is assigned a virtual name for that
    directory
  • users surf to web site based on virtual name
  • Example
  • web site lives in C\Inetpub\wwwroot\WebSite
  • web site's virtual name is "AAAPainting"
  • IIS maps virtual to physical

14
Creating a virtual directory
  • When in doubt, right-click -)
  • right-click on "Default Web Site", New, Virtual
    Directory

15
Part 3
  • Static vs. dynamic web sites

16
Types of web sites
  • From IIS's perspective, 2 types
  • static
  • dynamic

17
Static web sites
  • A static web site has the following
    characteristics
  • all web pages are pre-created and sitting on hard
    disk
  • web server returns pages without any processing

lttitlegtWelcome to AAA Paintinglt/titlegt lthtmlgt lth3
gtWelcome to AAA Paintinglt/h3gt ltHRgt ltolgt
ltligt ltA HREF"history.htm"gtHistory of our
companylt/Agt ltligt ltA HREF"prices.htm"gtPricinglt
/Agt ltligt ltA HREF"contact-info.htm"gtHow to
contact uslt/Agt lt/olgt ltHRgt lt/htmlgt
18
HTML
  • Static web sites are typically pure HTML
  • pages may also contain script code that runs on
    client-side

lttitlegtWelcome to AAA Paintinglt/titlegt lthtmlgt lth3
gtWelcome to AAA Paintinglt/h3gt ltHRgt ltolgt
ltligt ltA HREF"history.htm"gtHistory of our
companylt/Agt ltligt ltA HREF"prices.htm"gtPricinglt
/Agt ltligt ltA HREF"contact-info.htm"gtHow to
contact uslt/Agt lt/olgt ltHRgt lt/htmlgt
19
Dynamic web sites
  • A dynamic web site involves server-side
    processing
  • How does IIS tell the difference?
  • based on file extension of requested web page
  • Example
  • static request http//localhost/AAAPainting/defau
    lt.htm
  • dynamic request http//localhost/Workshop/default
    .asp

20
ASP
  • Active Server Pages
  • Microsoft's server-side programming technology
  • ASP based on scripting languages, interpreted
  • ASP.NET based on .NET languages, compiled,
    faster,

IIS
http//host/page.asp
ASP engine
client
HTML
21
Example
  • We want to dynamically create web page of
    attendee's
  • i.e. generate the page by reading names from a
    database

IIS
ASP Page
22
ASP page part 1, presentation
default.asp
  • ASP page HTML code

lttitlegtRWWP.NET, July 2002lt/titlegt lthtmlgt lth3gtRWW
P.NET, July 2002lt/h3gt ltHRgt List of attendees
ltolgt lt Call OutputAttendees( )
gt lt/olgt ltHRgt lt/htmlgt ltSCRIPT
LANGUAGE"VBScript" RunAt"Server"gt Sub
OutputAttendees() . . .
inlinecodeblock
23
ASP page part 2, logic
Sub OutputAttendees() Dim dbConn, rs, sql,
firstName, lastName sql "Select From
Attendees" Set dbConn CreateObject("ADODB.C
onnection") Set rs CreateObject("ADODB.Reco
rdSet") dbConn.Open("ProviderMicrosoft.Jet.
OLEDB.4.0" _ "Data
SourceC\Inetpub\wwwroot\Workshop\Attendees.mdb")
rs.ActiveConnection dbConn rs.Source
sql rs.Open Do While Not rs.EOF
firstName rs("FirstName") lastName
rs("LastName") Response.Write("ltligt "
firstName " " lastName)
rs.MoveNext() Loop rs.Close
dbConn.Close End Sub lt/SCRIPTgt
24
Summary
  • Web-based applications are commonplace
  • Web-based applications are often mission-critical
  • Two types
  • WebForms form-based
  • Web Services object-based
Write a Comment
User Comments (0)
About PowerShow.com