Title: Introduction to Active Server Pages
1Introduction to Active Server Pages
- Presented by,
- Jeff Randolph
- STC-Berkeley
- February 12, 2003
2Objectives
- What is ASP?
- Compare and contrast ASP with standard HTML
- Compare ASP to client-side and server-side
scripting languages - Identify how ASP fits into the major current
Microsoft language, installed code base, and
technology scheme
3Objectives (continued)
- Tools you need to create ASP applications
- Reference tools
- Myths of ASP
- Some Major Sites Using ASP
- Sample ASP in action
- Conclusions and Q A
4What is ASP?
- Active Server Pages
- A series of objects and components that are
executed on the web server - Uses a suite of technologies that allows
dynamically-generated content - Control of how content is generated from the
server to the browsers
5HTML Page Execution
You Request an HTML Pagewww.ocstc.org/resumes.htm
Server finds and downloads the page
Browser displays the page
6ASP Page Execution
7ASP Compared to Other Scripting Languages
- ASP and /PHP/Perl/CGI execution are roughly
equivalent in execution sequence - Compared to VBScript, ASP does not have to worry
about browser incompatibility - Compared to JavaScript, dont have to worry about
browser versions or disabling - Compared to Java, dont have to worry about
whether JRE (or MVM) is installed
8ASP and XML
- ASP can control the XML experience from beginning
to end - Controls the output for conflicting browsers
- Generate XML data
- Logically connect XML and standalone databases
- Control data output formatting that XML or HTML
cannot control - Sample Application Later
9ASP and XML
- For more information
- My XML, Your Browser, by Charlie Heinemann,
Microsoft Corporation. http//msdn.microsoft.com/l
ibrary/en-us/dnexxml/html/xml011199.asp - ASP Technology and the XML DOM, by Alan McBee,
Microsoft Corporation. http//msdn.microsoft.com/l
ibrary/default.asp?url/library/en-us/dnexxml/html
/xml092099.asp
10ASP in the Microsoft Language Family
Visual Basic
VBScript
ASP
- But theres more to ASP than just code...
11ASP in the Microsoft Language Family
- Some characterize ASP as more or less
server-side VBScript - Arguments supporting this statement
- Arguments against this statement
12ASP in the Microsoft Language Family
- ASP can also interact with other Microsoft
languages or applications - Execute SQL commands
- Open and close databases
- Create and Modify database tables
- Control applications or COM objects written or
compiled in other languages (VB, C, Java) - Extract content from Excel or Word
- Control an XML document
13ASP Object Model
- ASP itself is not Object-Oriented. ASP can use
objects but cannot define new objects - Composed of
- 5 objects
- 5 components
14ASP Objects
- Request
- Response
- Server
- Application
- Session
15ASP Components
- Scripting Objects Component
- ADO (ActiveX Data Objects) Component
- Ad Rotator Component
- Browser Capabilities Component
- Content Linking Component
16ASP Object Model
Server
Request
ASP.DLL(if it finds ltgt, invokes Scripting
Objects Component)
YOU
Response
Application
Session
17What Does ASP Look Like in Action?
18What Does ASP Look Like in Action?
ltpgtAnalytical Ultracentrifugation Workshop (May
21-23, 2001) and Symposium (May 24, 2001) at the
National Analytical Ultracentrifugation Facility,
Storrs, Conn. For additional informationlt/pgt
ltulgt ltligtlta href"http//www.ucc.uconn.ed
u/wwwbiotc/99wkshp.html" target"_blank"gt
National Analytical Ultracentrifugation
Facilitylt/agtlt/ligt ltligtlta
href"naufworkshop.asp"gtAnalytical
Ultracentrifugation Workshop and Symposium
Description and Registration (PDF
Format)lt/agtlt/ligt lt/ulgt
19What Does ASP Look Like in Action?
- What the real code looks like
lt If Today lt CDate("5/25/01") Then gt
ltpgtAnalytical Ultracentrifugation Workshop (May
21-23, 2001) and Symposium (May 24, 2001) at the
National Analytical Ultracentrifugation Facility,
Storrs, Conn. For additional informationlt/pgt
ltulgtltligtlta href"http//www.ucc.uconn.edu/wwwbiot
c/99wkshp.html" target"_blank"gtNational
Analytical Ultracentrifugation Facilitylt/agtlt/ligt
ltligtlta href"naufworkshop.asp"gtAnalytical
Ultracentrifugation Workshop and Symposium
Description and Registration (PDF
Format)lt/agtlt/ligt lt/ulgt lt End If gt
Coloring from Microsoft FrontPage
20Tools You Need to Create ASP Applications
- Web Server that Supports ASP
- Microsoft Internet Information Server (IIS)Web
services of Windows NT Server 4.0 and Windows
2000 Server - Microsoft Personal Web Server (PWS) Creates a
fully functional subset of IIS 4.0 that can run
on all other Windows OS - PWS is an add-on for Windows NT, 95/98/Me
- Built-in to Windows 2000/XP PROFESSIONAL
- Fundamental knowledge of Visual Basic
21Microsoft Personal Web Server
http//www.microsoft.com/ntserver/nts/downloads/re
commended/NT4OptPk/default.asp
22Tools You Need to Create ASP Applications
- If you are working with database
storage/retrieval - Knowledge of Access, SQL Server, etc. (to create
databases and tables) - Knowledge of SQL commands (or at least how to use
Access to generate SQL statements) - Knowledge of the VB style of data handling
- Authoring tool(s)
23ASP Application Development Tools
- Personal Preferences
- Microsoft FrontPage
- Allaire HomeSite
- Other Tools
- Microsoft Access
- Visual Basic
- Microsoft Visual InterDev
- Visual Studio .NET
- Other Non-Microsoft Tools (never used them)
24ASP Reference Tools
- Microsoft Web Site (www.microsoft.com)
- Knowledge Base for different Microsoft products
and Web developer issues - Search Capability for programming language
keywords and their syntax - Online versions of Reference Books
- MSDN (Microsoft Developer Network) Web site for
subscribers and/or owners of VStudio - MSDN Subscription on CD or DVD
25ASP Reference ToolsMicrosoft Site Search
26ASP Reference ToolsMicrosoft Site Search
27ASP Reference ToolsMicrosoft Site Search
28ASP Reference Tools
- ASP Reference Books
- ASP Developers Guide, by Greg BuczekISBN
0-07-212274-3 - Beginning Active Server Pages, by Francis et
alISBN 1-861001-34-7 - Professional Active Server Pages, by Francis et
alISBN 1-861001-26-6
Online version of this book is on the Microsoft
Web sitehttp//www.microsoft.com/TechNet/iis/book
s.asp
29ASP Reference Tools
- ASP Reference Books (continued)
- Using Active Server Pages, by Scot JohnsonISBN
0-7897-1389-6 - VBScript
- VBScript Unleashed, by Petrousos, Schongar et
alISBN 1-57521-124-6
30Major Sites Using ASP
- Microsoftwww.microsoft.com
- NASDAQwww.nasdaq.com
- Beckman Coulterwww.beckmancoulter.com
- PC-Mac Connectionwww.pcconnection.com
- Ticketmasterwww.ticketmaster.com
- State Farm and Allstate Ins. Companieswww.statefa
rm.com / www.allstate.com
31ASP Page vs.ASP Application
- An ASP page
- Needs the .ASP file extension to indicate to the
server that there is code the server must
interpret - A series of commands on one page
- An ASP application is a series of pages that are
linked together through code and the content
linking component to function as a logical unit
32ASP Page vs.ASP Application
- How the information is handled
- Main communication device between pages and the
server is by Forms - Information can be transmitted or transferred
from page to page in an application by - Submitting a form
- Sending a URL-encoded string www/ocstc.org/meet
ingadmin/edit.asp?ID5 - Storing data as a variable
33Myths/Criticisms of ASP
- ASP is Microsoft/Windows centric
- ASP doesnt work with Netscape
- ASP pages are not recognized by Search Engines
- ASP is slow because its interpreted (or
because its Microsoft) - ASP doesnt work with client-side scripting
languages, especially JavaScript
34Criticism of ASPMicrosoft/Windows Centric
35Criticisms of ASPNetscape
36Criticisms of ASPSearch Engines
37ASP is slow
- ObjectWatch NewsletterJ2EE versus .NET--The
Latest Benchmarkhttp//www.objectwatch.com/issue_
42.htm - Conclusion ASP/.NET technology
- Hardware/Software infrastructure is LESS
- Development time is SHORTER
- Development cost is LESS
- Administrative cost is LESS
- Application performance is FASTER and can absorb
HIGHER TRAFFIC
38ASP Doesnt Work with Client-Side Scripting
- JavaScript commands will be processed first, then
ASP - ASP can be used in conjunction with JavaScript
especially when verifying form data and where
JavaScript verification can be difficult to
program - You can use ASP to assign values back into
JavaScript code
39ASP Samples
- ASP Pages
- Chapter Contacts
- OCSTC Home Page
- ASP Applications
- Chapter Meetings
- Job Information
- ASP and XML
- XML assignment
40Conclusion ASP and the Technical Communicator
- ASP is another tool in your arsenal to control
information - ASP tests your self-esteem
- ASP may lead you to the dark side programming
- Future of ASP What Lies BeneathMicrosoft
FrameWork.NET, a successor to Visual Studio
compiled ASP
41Questions?
42NOT The End
- Presentation Linkhttp//www.ocstc.org/meeting_arc
hive.asp - Sample XML/ASP application
- ASP Position Paperhttp//www.ocstc.org/Jeff_XMLWo
rk/XMLandASP.pdf - Output Pagehttp//www.ocstc.org/Jeff_XMLWork/defa
ult.asp - XML Data Pagehttp//www.ocstc.org/Jeff_XMLWork/pr
oducts.asp
43A Final Thought1...
- Consider thisPrivate Sub Madness () Call
MethodEnd Sub - Translation?Theres a Method in the Madness
44A Final Thought2...
- In the world of the Web, you have to choose
between an organization W3C that wants to tell
you how to design your pages and an organization
Microsoft that wants you to design sites their
way. I pray you have the wisdom to choose
wisely.Vincent Flanders