B118 Web Programming PowerPoint PPT Presentation

presentation player overlay
1 / 10
About This Presentation
Transcript and Presenter's Notes

Title: B118 Web Programming


1
B118 Web Programming
  • Session 9 Client/Server Cookies
  • April 5, 2004

2
Tonights Agenda
  • Administrative
  • DHTML
  • Order Form Validation Homework Assignment
  • Client/Server Cookies
  • Intro to ASP .NET

3
Administrative
  • Technical Topic
  • Term project update
  • Microsoft Visual Studio .NET Roadshow
  • Job search tip effective networking
  • http//www.eweek.com/article2/0,3959,652978,00.asp
    (eWeek Labs Break Out of Your Shell, 10/28/02
    issue)
  • Upcoming quizzes
  • 11/12 chapters 9, 10, 11
  • 11/19 chapters 12, 13, 14
  • No quiz tonight ?

4
Administrative Technical Topic
  • Comments on the requirements
  • One page summary (HTML format) for web posting
  • Must include bibliography of your research
    sources
  • Reference to a recent, relevant news article
    (industry trade article, NY Times, Wall Street
    Journal not SJ Mercury)
  • Business focus why should your employer care/be
    concerned about this?

5
Administrative Term Project
  • Database structure
  • Microsoft Access
  • Single table for each company (Ill provide the
    design/template to you)
  • Core modules all are ASP.NET which Ill provide
  • Catalog (by product)
  • Catalog (by store)
  • Catalog (by keyword)
  • Shopping cart review
  • ASP.NET module you need to write feedback form

6
DHTML
  • Utilizes the objects, methods and properties of
    the web page (known as the document)
  • Lets to you alter the web page when its being
    served up and respond to events
  • Example code
  • color-survey-array.htm
  • National Parks slide show
  • bEssentials order form

7
Order Form Validation Homework Assignment
  • Due on 4/19 diskette printout
  • Enhancements
  • Data validation
  • Shipping sales tax calculation
  • Optional text alignment and read-only field
    protection
  • Details on course website (see course calendar)

8
Order Form Data Validation
9
Client/Server Cookies
  • Needed to maintain state
  • Keeping track of information across web pages
  • JavaScript cant share variable values across web
    pages or after the browser stops
  • Somewhat controversial because of privacy issue
    concerns
  • Used to serve as the basis for the shopping cart
    mechanism for the bEssentials project

10
Cookies - Overview
  • Small file stored on users hard drive (location
    depends on the browser)
  • Any web page can create a cookie
  • Can be read only by another web page from the
    same Internet domain (or by the local user)
  • Maximum of characters 2-4K
  • Other limits on total of characters per domain
    total of cookies

11
Cookies Technical Details
  • Access through the document object, cookie
    property (or document.cookie)
  • A string value containing five parts
  • Cookie name value
  • Cookies expiration date
  • Pathname of web page that created the cookie
  • Domain name of the server that created the cookie
  • Optional security parameter
  • Browser usually fills in the last three items

12
Cookies Sample JavaScript Code
  • Key code
  • document.cookie string value string
    value
  • document.cookie.split(field_deliminator)cookie
    _part
  • make-cookie.htm and read-cookie.htm

13
Intro to ASP .NET
  • JavaScript cant hide the source code from the
    user
  • ASP (Active Server Pages) and ASP .NET generates
    HTML code on the server using VBScript or
    JavaScript/JScript. All the user sees is the
    final HTML product
  • first.aspx, first(js).aspx, ForCounter.aspx
  • All on http//cypress.cob.sjsu.edu/b118w/wong_rona
    ld
Write a Comment
User Comments (0)
About PowerShow.com