Presentation is loading. Please wait.

Presentation is loading. Please wait.

eCommerce Technologies Syntax & Procedures for Markup MIS 4453 -- Spring 2004 Instructors: Kelly Fish, Ph.D. John Seydel, Ph.D.

Similar presentations


Presentation on theme: "eCommerce Technologies Syntax & Procedures for Markup MIS 4453 -- Spring 2004 Instructors: Kelly Fish, Ph.D. John Seydel, Ph.D."— Presentation transcript:

1

2 eCommerce Technologies Syntax & Procedures for Markup MIS 4453 -- Spring 2004 Instructors: Kelly Fish, Ph.D. John Seydel, Ph.D.

3 Student Objectives Summarize basic syntax for HTML elements Standard elements Empty elements Use HTML markup to create and modify tables Create forms and form elements using HTML markup Use ASP markup to create simple server side scripts Form handlers Server-side includes Database connectivity Summarize the four primary ASP objects

4 Recall Our Technologies for eCommerce Keep in mind, the purpose is to use the right technologies to support the firm’s business plan In general, the technologies with which we’re be working can be classified as Web tools (e.g., FrontPage, Flash) Client technologies (web browsers, in particular) Database technologies (e.g., Access) Web languages (e.g., XHTML)languages Server technologies (e.g., IIS, ASP)...

5 Server Technologies Provide access to files Just delivering web pages (no processing)  Static HTML  Dynamic HTML Interactive processing (pages created on demand)  Data from databases  Data from client Web server: Internet Information Services (IIS) Technologies for interactive processing PHP (scripting similar to C programming) CGI (scripting typically using Perl) Various: CFML, JSP,... ASP (scripting via VBScript usually but not always) Let’s take a quick look at how IIS works with ASP

6 Where We’re Headed: Shopping Cart Demonstration Refer to aitp.astate.edu/suzy/exercises/cyberworldaitp.astate.edu/suzy/exercises/cyberworld Note the application, storefront and back office: Catalog page – displays limited database contents  Choose any item, and  Details page displays Details page  Return to catalog, or  Cart page Cart page (provided by PayPal)  Return to catalog. or  Checkout Order processing (provided by PayPal)  Back office chores handled  Includes login (same idea as Chapter 11)

7 CyberWorld: Storefront Portion Involves Catalog page Details page Catalog page features Opening database (all records; recordset) VBScript loop Pulling data from database Employing ASP code within markup Details page features Opening database and selecting specific record Refer to source code handout

8 CyberWorld: Back Office Access to info Manual processing of orders User authentication Management metrics (eMetrics) Updates to info Inventory Customer data Accounting systems Management metrics Various levels of automation Facilitated by PayPal (something we’ll deal with later)

9 Now, More on Markup Recall two types of elements: Standard elements Empty elements

10 A Quick Review of XHTML Elements A web document is a collection of XHTML elements Note that XHTML is essentially HTML XML compliant Reformulation of HTML, but with stricter rules Two types of elements Standard Empty Each element Has  Opening tag and closing tag is standard  Self closing tag if otherwise May have attributes specified Also: XHTML entities

11 Standard XHTML Document... title goes here...... scripts, style rules, meta elements, etc....... this is where content and markup goes...

12 XML Syntax for Standard Elements Either... content... Or <tag attr1=“xxx” attr2=“yyy” attr3=“zzz”... >... content... Why the difference? More readable code (for us, not the computer)

13 Examples of Standard Elements Paragraphs, headings, divisions Hyperlinks Lists Tables Forms Objects Display markup

14 Syntax for Empty Elements Either Or <tag attr1=“xxx” attr2=“yyy” attr3=“zzz”... /> Notice: no content; attributes provide full specification

15 Examples of Empty Elements Images and embedded objects Form input controls (e.g., text boxes) Breaks, horizontal rules, etc. Meta tags

16 Some Important XHTML Body Elements Hyperlinks: Objects:, or Lists:, Tables:,, Text blocks:, Display:, or, or, Forms:,,, Style rules: Miscellaneous:,

17 Referencing Other Files Where? Hyperlinks Images (inline or background) Objects (e.g., Flash movies) And other places also, but beyond our scope Absolute referencing: resources on another server Relative referencing Preferred Need to specify relative to calling document  In same folder  In higher level folder  In lower level folder  In sibling folder

18 Rules to Follow for XML Compliance Use lowercase for tags & attributes Quote attribute values Use relative references for resources on same server Always use closing tags Nest elements properly; close in reverse order of opening Use indentation consistently and to make code readable No more than 80 characters per line of code; break long tags into multiple lines, typically one per attribute Avoid deprecated elements, e.g.,,, Use no spaces in file names Treat all URLs and other resource names as if case- sensitive

19 Development of Applications Three tier architecture: presentation, application, databasearchitecture Browser presentation layer: HTML Application server layer: ASP, VBScript, JavaScript, ColdFusion, CGI, Perl, etc. Database layer Web-enabled database software: Access, SQL Server, Oracle ADO and ODBC (enable database access through application layer)

20 ASP Programming Secure, server-side scripting Viewable with any browser Open development environment combines Scripting Pre-built objects ASP delimiters Five primary ASP objects Request Response Server Application Session

21 Request Object Purpose: to get information from the user Submits info to Web server Basic data collection functions: Form QueryString ServerVariables Cookies See overview of browser/server interactionbrowser/server

22 Response Object Purpose: to send information to the user Delivers to client browser Basic functions: Changing cookies Controlling properties of objects Controlling actions of objects See overview of browser/server interactionbrowser/server

23 Server Object Purpose: to control connections to external components Used in nearly every ASP file Supports only one property ScriptTimeout Determines maximum time an ASP file can take to complete an execution

24 Session Object Purpose: to store information about and change settings for the user’s current Web- server session Automatically created when new visitor arrives at application page Enables application to keep track of visitors Example: Session(“User”) = Request(“txtName”)... strUser = Session(“User”) Response.Write(“Hello “ & strUser & “!”)

25 Application Object Purpose: to share application-level information and control settings for the lifetime of the application Created at Web server when you create a virtual directory for the application Example: Application(“NumHits”) = Application(“NumHits”) + 1... intHits = Application(“NumHits”) Response.Write(“You are visitor #“ & intHits)

26 ActiveX Data Objects (ADO) Interface with other relational databases Use ODBC Three primary objects: Connection RecordSet Command Example: Set myConnection = Server.CreateObject(“ADODB.Connection”)... Set rsTitleList = myConnection.Execute(“SELECT * FROM Products)

27 Let’s Look at Some ASP Scripting Declarations Database First, view the database Creating connectivity Processing records from a recordset All records Selected records If time: server-side includes

28 Summary of Objectives Summarize basic syntax for HTML elements Standard elements Empty elements Use HTML markup to create and modify tables Create forms and form elements using HTML markup Use ASP markup to create simple server side scripts Form handlers Server-side includes Database connectivity Summarize the four primary ASP objects

29 Appendix

30 Computer Languages Programming languages Standalone  Procedural Traditional (e.g., COBOL) Object-oriented (e.g., Java)  Nonprocedural (e.g., SQL) Scripting languages (rely on other components)  JavaScript  VBScript  Others (e.g., Perl) Markup languages (e.g., XHTML) Stylesheet languages (e.g., CSS, XSL) Database languages (e.g., SQL)

31 What Makes ASP Files Different? At least some content is omitted from source code Replaced by script tags Files are preprocessed at server Scripts within tags are executed Result is an XHTML document Sent to browser

32 Three Tiered Internet Database Access Architecture

33 Browser/Server Interaction


Download ppt "eCommerce Technologies Syntax & Procedures for Markup MIS 4453 -- Spring 2004 Instructors: Kelly Fish, Ph.D. John Seydel, Ph.D."

Similar presentations


Ads by Google