UWEC Web Publishers Users Group - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

UWEC Web Publishers Users Group

Description:

Full power of Java. Security. Cons: Large download size. Browser plug-in required. Applets ... The main benefits are that it is free and open source ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 34
Provided by: DanielES1
Category:

less

Transcript and Presenter's Notes

Title: UWEC Web Publishers Users Group


1
UWECWeb PublishersUsers Group
  • An Overview of Web Scripting

2
Goals of this Talk
  • Teach you how to program
  • Define and categorize web scripting approaches to
    enable effective communication with web scripting
    professionals
  • Use as many acronyms as possible!

3
Why Script?
  • Turns static pages into dynamic pages
  • Enhanced graphical interface
  • Customized responses to user input
  • Update of pages from databases

4
Which Scripting Technology?
  • So you have decided that you want dynamic web
    pages, the next step is to pick a scripting
    technology
  • To name a few major players
  • ASP, JSP, PHP, Servlet, JavaScript, VBScript,
    Applet, SSI, ColdFusion, Perl(CGI/Mod), Flash

5
Web Architecture Review
Web Server
Browser
HTTP
DB Server
Client
Server
6
Client-side Scripting
  • HTML and scripts are both downloaded to the
    browser
  • Scripts run inside browser, interactively
    changing the web page
  • Example www.uwec.edu

7
Server-side Scripting
  • Scripts are run on the server, producing plain
    HTML
  • Dynamically generated HTML is downloaded to
    browser
  • Example jonah.cs.uwec.edu/CS245/stevende/cdlist.h
    tm

8
Comparison
9
Client-side Technologies
  • There are two main types of client scripting
  • Scripts that are tightly integrated with the
    other HTML elements on the screen
  • Scripts that run independently from the other
    HTML elements and tend to run as separate
    programs in a subsection of the browser window

10
DHTML
  • Stands for Dynamic HTML
  • DHTML is not scripting language
  • It is a term used when one makes a page that uses
    HTML, Stylesheets, and a scripting language
  • Often JavaScript is used as the scripting language

11
JavaScript
  • JavaScript is a scripting language based on the
    syntax of Java (Sun Microsystems)
  • But it is much simpler to code and learn than
    Java (not fully object-oriented)
  • Functions (little scripts) are placed within
    tags near the top of the page
  • These functions are then attached to various
    event that can occur to HTML elements on a web
    page (i.e. it is tightly integrated)
  • Example when the mouse is placed over a
    particular HTML element, such as a link

12
JavaScript
13
JavaScript
  • JavaScript is used mostly to
  • Provide enhanced GUIs
  • Button rollovers
  • Dropdown menus
  • Perform form field validation
  • Making sure all required data is filled in a form
    before it is sent to the server for processing

14
JavaScript
  • JavaScript is restricted from accessing the local
    file system for security purposes
  • Data can only be saved in cookies
  • Cookies are small pieces of information that are
    stored in a special location dictated by the
    browser
  • Enforces file system security
  • Provides a place to store minimal data

15
VBScript
  • Stands for Visual Basic Script
  • Based on the syntax of Visual Basic (Microsoft)
  • Similar in many ways to JavaScript
  • JavaScript is much more popular as a client-side
    scripting language
  • Used more as a server-side scripting language in
    the ASP framework

16
Applets
  • Applets are actual Java programs that are run
    within the web browser
  • The compiled Java Applet (machine readable, not
    human readable) is downloaded as a separate file
    from the HTML tags
  • Pros
  • Full power of Java
  • Security
  • Cons
  • Large download size
  • Browser plug-in required

17
Applets
  • Code is started with an tag in the HTML
    file
  • Start the applet program in a section of the
    larger browser window
  • Example http//www.sapello.com/slidepuzzle/
  • Applets dont interact with other web page
    elements

18
Flash / Shockwave
  • More animation control technologies than pure
    scripting (Macromedia)
  • Scripting is involved under the hood
  • Similar in style to Applets in terms of running
    independently from other web page elements
  • Becoming more popular
  • Example nickjr.com

19
Server-side Technologies
  • Recall that for client-side scripting
  • The HTML and script are both sent to the client
  • The script is run on the client
  • And for server-side scripting
  • The script is run on the server
  • The end goal is to produce an HTML page to send
    back to the client

20
Server-side Technologies
  • There are two main types of server scripting
  • Tag-based where the developer creates an HTML
    page and then embeds the script inside special
    scripting tags
  • Code-based where the developer writes a program
    that outputs HTML

21
SSI
  • Stands for Server-Side Includes
  • SSI code modules can be plugged into a web server
    and defining sets of commands
  • Pseudo tag-based scripting is used to access
    specific commands
  • Not real tags, just specially formatted HTML
    comments
  • Example of a date last modified include
  • Old technology that doesnt scale well

22
JSP
  • Stands for JavaServer Page
  • A Sun product
  • Actual tag-based scripting
  • The current date and time is
  • Tags can be
  • Generic scriptlet or expression tags that
    contain actual Java code within the tag itself
  • Custom tags, where the code is stored in another
    place
  • Can use all the power of the Java language

23
JSP Custom Tags
24
JSP
  • Other issues that JSPs handle well are
  • Session management involves carrying information
    from one page to the next
  • Concurrency involves letting multiple users
    access a single JSP at the same time
  • Web server needs to have integrated JSP support
  • Tomcat extension to Apache
  • IBMs WebSphere Application Server (WAS)

25
ASP
  • Stands for Active Server Page
  • A Microsoft version of JSPs
  • Normal scripting language is VBScript
  • Can leverage all the com objects developed in VB
  • Web server needs to have integrated ASP support
  • Microsofts IIS

26
PHP
  • Stands for PHP Hypertext Preprocessor
  • An Open Source version of JSPs
  • Scripting language is Perl/C based
  • The main benefits are that it is free and open
    source
  • The main drawback is that it doesnt leverage off
    an existing code base (Java or VB)
  • Web server needs to have integrated PHP support
  • Apache

27
ColdFusion
  • ColdFusion is a set of products from Macromedia
  • Development environment
  • Scripting language (CFML)
  • Application/Web server
  • Yet another tag-based version of JSPs
  • Integrated rapid development is one of its pros
  • The main drawback is that it doesnt leverage off
    an existing code base (Java or VB)

28
Servlets
  • Servlets are specially setup Java programs that
    run inside the web server
  • Servlets are the first code-based server-side
    technology we have seen
  • Script is actual code that happens to produce
    HTML tags as output

29
Servlet Example
30
Servlets
  • Because Servlets are actual Java programs they
    can leverage the large Java codebase
  • Fully integrated into the web server
  • Special features to handle session management and
    concurrency
  • Can work together with JSPs
  • JSPs are used to design the front-end
  • Servlets are used to design the back-end

31
Perl
  • Perl is a UNIX scripting language originally
    designed for text parsing
  • Since a lot of web scripting is text based, Perl
    can be used as a code-based web scripting
    language
  • However, Perl is an difficult language in which
    to write maintainable code

32
Perl
  • Perl also doesnt have all the session management
    and concurrency handling mechanisms available in
    other scripting language
  • Originally Perl had to run as a separate process
    from the web server (not integrated)
  • CGI (Common Gateway Interface protocol)
  • Now there are ways to get Perl integrated into
    certain web servers
  • Mod_perl with Apache

33
Summary
  • Client-side (Enhanced GUIs)
  • Tightly integrated (Rollovers, Validation)
  • JavaScript, VBScript
  • Run as separate programs (Demos, Games)
  • Applets, Flash/Shockwave
  • Server-side (Customized responses, DB access)
  • Tag-based (Page design, Simple coding)
  • JSP, ASP, PHP, Coldfusion, SSI
  • Code-based (Back-end processing, Serious coding)
  • Servlets, Perl
Write a Comment
User Comments (0)
About PowerShow.com