Upload
jordan-hicks
View
233
Download
1
Tags:
Embed Size (px)
Citation preview
Chapter 15Program Development and Programming Languages
Explain the six steps in the program development life cycle
Describe top-down program design
Explain structured program design and the three basic
control structures
Explain the differences among the categories of programming
languages
Describe the object-oriented approach to program
development
Identify programming languages commonly used
today
Identify the uses of application generators, macros, and RAD
tools
Describe various Web page development tools, including
HTML, DHTML, XML, and WML
Identify uses of multimedia authoring packages
Chapter 15 Objectives
Next
p.15.2
programming language
A set of words, symbols, and codes that enables a
programmer to communicate instructions
to a computer
What is a Computer Program?
What is a computer program? A set of instructions that
directs a computer to perform tasks
Computer programmers
• use program development tools that generate these instructions automatically
• use a programming language to write these instructions themselvesp.15.2
Next
The Program Development Life CycleWhat is the
program development life cycle (PDLC)?
A set of steps programmers use to build computer programs
p.15.22 Fig. 15-1
Next
The Program Development Life CycleHow is program development related to system
development?
Program development is an ongoing process within system development
p.15.3 Fig. 15-2
Next
The Program Development Life CycleWhat initiates the PDLC?
During the analysis phase of the system development life cycle (SDLC), the development team recommends how to handle software needs
If the company recommends in-house development, programmers begin the PDLC as part of the implementation phase
p.15.3 Fig. 15-2
Next
The Program Development Life CycleWhat is the program specification package?
A detailed set of requirements for a system created by the systems analyst during the design phase of the SDLC
Identifies the input, output, processing, and data requirements of each program and the relationships among programs
The scope of the program specification package largely determines how many programmers work on the program developmentp.15.3
Next
programming team
A group of programmers who
develop the programs
Click to view video
Step 1 – Analyze Problem
What is involved in analyzing the problem? Analyze the problem
the program(s) should solve so you can begin to develop an appropriate solution
In most cases, the solution requires more than one program
Three major tasks
p.15.4
Next
Review the program specifications
package
Meet with the systems analyst and
users
Identify each program’s input, output, and
processing components
Step 1 – Analyze Problem
Package contains a variety of deliverables that identify input, output, design and data requirements
By thoroughly reviewing the package, the programmer understands the nature and requirements of each programp.15. 4
Next
charts
diagrams
reports
screen and report layout charts
systems flowcharts
structured English
decision tables and decision trees
data dictionary
Why does the programmer review the program specification package?
Step 1 – Analyze Problem
What is an IPO chart? Also called a defining diagram Identifies a program’s inputs, its outputs, and the
processing steps required to transform the inputs into the outputs
p.15.4 Fig. 15-3
Next
structured design
Tasks 2 and 3
Determines how to build the programs based on the
requirements
Step 2 – Design Programs
Three tasks
• grouping each program’s activities into modules
• devising a solution algorithm for each module
• testing the solution algorithms
p.15.5
Next
top-down design
Task 1
Focuses on what the program should do
What is involved in designing programs?
Step 2 – Design Programs
Breaks down the original set of program specifications into smaller, more manageable sections
p.15.5
Next
Click to view Web Linkthen click Top-Down Design
Identify the the major functions of a program, called the main routine or
the main module
Decompose (break down) the main routine into smaller sections called subroutines
Analyze each subroutine to determine if it can be decomposed further
Continue decomposing subroutines until each one performs a single function
A section of a program that performs a single function is a module
What is top-down design?
Step 2 – Design Programs
What is a hierarchy chart? Also called a structure chart or top-down chart Used to show program modules graphically
p.15. 6Fig. 15-4
Next
Step 2 – Design Programs
What is structured design? A technique that builds all
program logic from a combination of three basic control structures
A control structure is a design that determines the logical order of program instructions
• also called a construct Each module typically
contains more than one control structure
p.15.6
Next
Click to view Web Linkthen click Structured Design
sequence control
structure
selection control
structure
repetition control
structure
Step 2 – Design Programs
What is a sequence control structure? Shows one or
more actions following each other in order
Actions
• inputs
• processes
• outputs
p.15.7 Fig. 15-5
Next
Step 2 – Design Programs
What is a selection control structure? Tells the
program which action to take, based on a certain condition
Two common types of selection control structures
p.15.7
Next
if-then-else control structure
case control structure
Step 2 – Design Programs
What is an if-then-else control structure? Allows a program to evaluate the condition and yields
one of two possibilities: true or false If the result of the condition is true, the program
performs one action
If the result is false, the program performs a different (or possibly no) action
p.15.7 Fig. 15-6
Next
Step 2 – Design Programs
What is a case control structure? A condition can yield one of three or more
possibilities
p.15.7 Fig. 15-7
Next
Step 2 – Design Programs
What is a repetition control structure? Also called the
iteration control structure or a loop
Used when a program performs one or more actions repeatedly as long as a certain condition is met
Two forms
p.15.8
Next
do-while control
structure
do-until control
structure
Step 2 – Design Programs
What is a do-while control structure? Repeats one or more
times as long as a condition is true• Tests a condition at the
beginning of the loop• If the result is true, the
program executes the action(s) inside the loop
• Program loops back and tests the condition again
• Looping continues until the condition becomes false
p.15.8 Fig. 15-8
Next
Step 2 – Design Programs
What is a do-until control structure? Tests the condition
at the the end of the loop
The action(s) will always execute at least once
Continues looping until the condition is true, and then stops
p.15.8 Fig. 15-9
Next
Step 2 – Design Programs
The program, each of its modules, and each of its control structures must have• No dead code• No infinite
loops• One entry
point• One exit point
p.15.8
Next
dead code
Any code, or program instruction, that a program never executes
infinite loop
A set of instructions that repeats continuously
entry point
The location where a program, a module, or a control structure begins
exit point
The location where it ends
What are the guidelines of a proper program?
Step 2 – Design Programs
How are entry and exit points shown?
Program modules often have control structures nested inside one another
Each control structure should have one entry point and one exit point
p.15.9 Fig. 15-10
Next
Step 2 – Design Programs
What is a solution algorithm? Also called program
logic A graphical or written
description of the step-by-step procedures in a module
To help develop a solution algorithm, programmers use design tools
p.15.9
Next
program flowchart
Nassi-Schneiderman
charts
pseudocode
Step 2 – Design Programs
What is a program flowchart? Graphically shows
the logic in a solution algorithm
Follows a set of standards published by the American National Standards Institute (ANSI) in the early 1960s
p.15.9 Fig. 15-11
Next
Step 2 – Design Programs
How is a program flowchart drawn? Most
symbols connect with solid lines showing the direction of the program
Dotted lines connect comment symbols
Next
comment symbol or annotation symbol
Explains or clarifies logicp.15.10 Fig. 15-12
Step 2 – Design Programs
What is flowcharting software? Used to
develop flowcharts
Makes it easy to modify and update flowcharts
p.15.10 Fig. 15-13
Next
Click to view Web Linkthen click Flowcharting Software
Step 2 – Design Programs
What is a Nassi-Schneiderman (N-S) chart? Graphically shows the logic in a solution algorithm Sometimes called structured flowcharts
p.15.11 Fig. 15-14
Next
Step 2 – Design Programs
What is pseudocode? Uses a condensed
form of English to convey program logic
Also uses indentation to identify the three basic control structures
p.15.12 Fig. 15-15
Next
Step 2 – Design Programs
What is a quality review? The programmer
checks the logic for correctness and attempts to uncover logic errors
Two techniques for reviewing a solution algorithm• desk check• structured
walkthrough
p.1512
Next
logic error
A flaw in the design that causes
inaccurate results
5. Repeating Steps 3 and 4 for each set of test data
4. Comparing the expected result from Step 2 to the actual result from Step 3
3. Stepping through the solution algorithm using one set of test data and writing down the actual result obtained (output) using the solution algorithm
Step 2 – Design Programs
The use of test data to step though a program’s logic
Test data is sample data that mimics data the program might process once it is in production
Involves five steps
p.15.12
Next
2. Determining the expected result (output) for each set of data, without using the solution algorithm
1. Developing sets of test data (inputs)
What is a desk check?
Detecting errors and making
improvements early in the PDLC
reduces the overall time and cost of
program development
Step 2 – Design Programs
What is a structured walkthrough? A more formal technique
for checking the solution algorithm
The programmer explains the logic of the algorithm while members of the programming team step through the program logic
Purpose is to identify errors in the program logic and check for possible improvements in program design
p.15.12
Next
Step 3 – Code Programs
What is involved in coding programs? Two steps
• translating the solution algorithm into a programming language
• entering the programming language code into the computer
Each of the many programming languages has a particular syntax
p.15.13
Next
syntax
The set of grammar and rules that
specifies how to write instructions for a solution algorithm
Step 3 – Code Programs
How are programs documented? A programmer should take time to document the program code
thoroughly Comments or remarks are included in a program as documentation Global comments explain the program’s purpose and identify the
program name, its author, and the date written Internal comments explain the purpose of the code statements
within the program
p.15.13 Fig. 15-16
Next
global comments
global comments
internal commentsinternal
comments
syntax errors
Occur when the code violates the syntax, or grammar, of the programming
language
Usually discovered the first time a program code is executed on the
computer
Step 4 – Test Programs
What is involved in testing programs? Goal is to ensure
the program runs correctly and is error free
Two typical types of errors
• syntax errors
• logic errors
p.15.13
Next
logic errors
Flaw in the design that generates inaccurate results
Systems analyst develops test data including both valid and invalid input
data
Step 4 – Test Programs
What is a run time error? A program failure
occurring while a program is being executed
Programmers use test data to deliberately cause a run time error in order to test the program
p.15.13
Next
Step 4 – Test Programs
What is debugging? The process of
locating and correcting the syntax and logic errors in a program
Errors themselves are the bugs
The first bug was said to be a moth lodged in a computer's electronic components
p.15.14 Fig. 15-17
Next
Step 4 – Test Programs
What is a debug utility? Also called a
debugger Allows you to
identify syntax errors and to find logic errors
You can examine program values while the program runs in slow motion
p.15.14
Next
millennium bug
Also called the Y2K bug
Took effect when the computer date rolled
over to January 1, 2000
Non Y2K compliant computers read the
date as 01/01/00
Step 5 – Formalize Solution
What is involved in formalizing a solution? The programmer performs two
activities• review the program code
– look for any dead code and remove it
– run the program one final time to verify it still works
• review all the documentation – ensures all
documentation is complete and accurate
– includes a number of types of documentation
p.15.15
Next
hierarchy chart
solution algorithm in the form of a program
flowchart, and N-S chart, or pseudocode
test data
program code listings that contain global and
internal comments
Step 6 – Maintain Programs
What is involved in maintaining programs? Two activities
• correcting errors• adding enhancements
– involves modifying existing programs to improve their functionality
When a program is implemented, or placed into production, users interact with the programs• programs process actual, or
live, transactions• users identify errors and
enhancements
p.15.15
Next
When users identify errors or enhancements, they typically
notify the systems analyst
The systems analyst contacts and meets with a
programmer
They begin to analyze the problem or enhancement,
which is Step 1 of the PDLC
Programming Languages and Program Development ToolsWhat are programming languages and program
development tools?
p.15.16
Next
programming language
A set of words, symbols, and codes that enables a
programmer to communicate a solution
algorithm to the computer
program development tool
Consists of user-friendly software products
designed to assist both programmers and
nontechnical users with the creation of information
system solutions
machine languages
Categories of Programming LanguagesWhat are the categories of programming
languages?
p.15.16
Next
Click to view video
Click to viewanimation
assembly languages
third-generation languages
fourth-generation languages
fifth-generation languages
Five major categories of programming languages
machine and assembly languages are low-level
Categories of Programming LanguagesWhat are low- and high-level programming
languages?
p.15.16
Next
machine-dependent language
Only runs on one particular computer
low-level language
A programming language that is machine dependent
third-generation, fourth-generation, and fifth-generation
languages are high-level
machine-independent language
Can run on many different types of computers and
operating systems
high-level language
A language that is machine independent
Languages are classified as either low level or high level
Categories of Programming LanguagesWhat is machine
language? The first generation of
programming languages The only language the
computer directly understands
Uses a series of binary digits (1s and 0s) or a combination of numbers and letters that represent binary digits
Binary digits correspond to the on and off electrical states of a computer
p.15.16 Fig. 15-18
Next
Click to viewanimation
Categories of Programming LanguagesWhat is assembly
language? The second generation of
programming languages A programmer writes
instructions using symbolic instruction codes
Next
symbolic instruction codes
Also called mnemonics
Meaningful abbreviations and codesp.15.16 Fig. 15-19
macro
Generates multiple machine language instructions for a single assembly language
instruction
Saves the programmer time during program development
Categories of Programming Languages
p.15.17
Next
symbolic address
A meaningful name that identifies a storage location
Assembler
Converts the assembly language source program into machine language so
that the computer can understand it
Source program
The program that contains the assembly language code
What are features of assembly languages?
Categories of Programming LanguagesWhat is a third generation language (3GL)?
Uses a series of English-like words to write instructions A procedural language
• requires the program instructions tell the computer what to accomplish and how to do it
p.15.18 Fig. 15-20
Next
Click to viewanimation
source program
The 3GL code
Categories of Programming LanguagesWhat is a compiler?
Converts the entire source program into machine language before executing it
The compiler checks the source program’s syntax
Makes sure the program properly defines the data it will use in calculations or comparisons
Produces a program listing which contains the source code and a list of any syntax errors
Translates an entire program before executing it
p.15.18 Fig. 15-20
Next
object code
Also called an object program
The machine language version that results from compiling the 3GL
Categories of Programming LanguagesWhat is an interpreter?
Reads a code statement Converts it to one or more machine language
instructions Executes those machine language instructions Translates and executes one program code statement at
a time Does not
produce an object program
p.15.18 Fig. 15-21
Next
Categories of Programming LanguagesWhat is a fourth-generation language (4GL)?
Uses English-like statements
The syntax is closer to human language than that of a 3GL
A nonprocedural language• programmer only
specifies what the program should accomplish without explaining how
• many 4GLs work with a database and its project dictionaryp.15.19 Fig. 15-22
Next
Categories of Programming Languages
p.15.19
Next
SQL
A query language enabling users and
programmers to retrieve data from database tables
report writer
Also called a report generator
Software that allows you to design a report on the screen, retrieve data into
the report design, and then display or print the
report
Builds a 4GL query that enables you to access
the data
What are some examples of 4GLs?
Categories of Programming LanguagesWhat is a fifth-generation language (5GL)?
p.15.20 Fig. 15-25
Next
One that provides a visual or graphical interface for creating the source code
Often converts the source code to machine language using a 3GL or 4GL compiler
Object-oriented and Web development tools sometimes use a 5GL such as Visual Basic
Object-Oriented Program DevelopmentWhat is the object-oriented (OO) approach?
The programmer can package the data and the program (or procedure) into a single unit, called an object
When the structure of an object changes, any program that accesses the object automatically accesses the change
p.15.20
Next
object
An item that can contain both data and the procedures that read or manipulate that data
method or operation
The procedure in the object that contains activities that read or manipulate the data
attributes or variables
The data elements
encapsulation or information hiding
The concept of packaging methods and attributes into a single object
Object-Oriented Program DevelopmentWhat is a class?
A larger category of objects Each object in a class shares methods and attributes
that are part of the original object A generalization
hierarchy shows relationships between classes of an object
p.15.20 Fig. 15-23
Next
Object-Oriented Program DevelopmentWhat are some terms related to classes?
Each class can have one or more subclasses The higher-level class is called a superclass Inheritance is the concept of lower levels inheriting
methods and attributes of higher levels
An object instance is a specific occurrence of an object or object class
A message tells an object what to dop.15.20 Fig. 15-23
Next
Object-Oriented Program DevelopmentWhat is the Object Management Group (OMG)?
An international organization that establishes guidelines and specifications for OO application development
Has adopted UML and CORBA as standards
p.15.21
Next
UML (Unified Modeling Language)
Contains the standard notation for analysis,
design, and documentation for the OO approach
CORBA (Common Object Request Broker Architecture)
Defines how objects in separate programs on a
network can communicate with each other
Object-Oriented Program DevelopmentWhat is object-oriented programming
(OOP) language? A language that uses the
OO approach An OOP is event driven
• checks for and responds to a set of events
C++ is a complete object-oriented language
p.15.21
Next
Click to view Web Linkthen click Object-Oriented Programming Languages
event
The OOP term for message
Programming Languages
What are the most widely used programming languages?
Hundreds of programming languages exist
A few are used widely enough to be recognized as standards
Most are high-level languages
p.15.22
Next
BASIC
Visual Basic
COBOL
C
C++
RPG
Programming Languages
How can you compute gross pay? Figures on the
following slides show program code in several programming languages
The code solves a simple payroll problem – computing the gross pay for an employee
p.15.22
Next
1. Multiply the regular time hours worked by the hourly rate of pay to obtain the regular time pay
Regular pay = regular hours x hourly rate of pay
2. Multiply the overtime hours by 1.5 times the hourly rate of pay to obtain the overtime pay
Overtime pay = overtime hours x 1.5 x hourly rate of pay
3. Add the regular time pay and the overtime pay together
Gross pay = regular time pay + overtime pay
Programming Languages
What is BASIC? Beginner's All-purpose Symbolic Instruction Code Developed by John Kemeny and Thomas Kurtz in the mid-
1960s at Dartmouth College Designed for use as a simple, interactive problem-solving
language
p.15.22 Fig. 15-24
Next
Programming Languages
What is Visual Basic? A Windows-based application that assists programmers
in developing other event-driven Windows-based applications
Developed by Microsoft Corporation in the early 1990s
p.15.22 Fig. 15-25
Next
Click to view Web Linkthen click Visual Basic
Step 1: Programmer designs user interface. Regular Time Hours Worked, Overtime Hours Worked, and Hourly Pay Rate are text boxes, in which the user enters data. COMPUTE and CLEAR are command buttons. All other objects are labels.
Step 2: Programmer assigns properties to each object on the form. Objects include text boxes, command buttons, labels, and the form itself.
Step 3: Programmer writes code and assigns it to the COMPUTE button.
Programming Languages
How is a Visual Basic application created?
p.15.23 Fig. 15-25
Next
Step 4: Programmer tests the application. Gross pay displays after COMPUTE button is clicked.
Programming Languages
What is COBOL? COmmon Business-Oriented Language Developed out of a joint effort between the United States
government, businesses, and major universities in the early 1960s Naval officer Grace Hopper was a prime developer of the COBOL
language One of the
more widely used procedural programming languages for business applications
p.15.24 Fig. 15-26
Next
Technology Trailblazer
Grace Hopper Programmed the Mark I
‘computer engine’ to find the angles to aim naval guns in varying weather conditions
Helped build and program several other early computers
Credited with finding the first computer ‘bug’
Developed the first compiler Created the FLOW-MATIC
programming language that laid the foundation for COBOLp.15.24
Next
Click to view Web Linkthen click Grace Hopper
Programming Languages
What is C? Developed in the early 1970s by Dennis Ritchie at Bell
Laboratories Originally designed for writing system software A powerful language that requires professional programming
skills
p.15.25 Fig. 15-27
Next
Technology Trailblazer
Dennis Ritchie Developed C at Bell
Labs in the early 1970s
Tweaked an earlier programming language, B, to make it portable
C became extremely popular outside of Bell Labs after 1980
Awarded the National Medal of Technology in 1999
p.15.25
Next
Click to view Web Linkthen click Dennis Ritchie
Programming Languages
What is C++? Developed in the 1980s by Bjarne
Sroustrup at Bell Laboratories An object-oriented programming
language An extension of the C programming
language Includes all the elements of the C
language plus has additional features for working with objects, classes, events, and other object-oriented concepts
p.15.25
Next
Click to view Web Linkthen click C++
C#
A newer programming language that
combines features of C and C++
Best suited for development of
Web applications
Programming Languages
What is RPG? Report Program Generator Introduced by IBM in the early 1960s to assist
businesses in generating reports
Businesses also use RPG for complex computations and file updating
A nonprocedural language
p.15.26 Fig. 15-28
Next
Programming Languages
What are some other programming languages?
p.15.26 Fig. 15-29
Next
RAD tools: Visual Basic, Delphi, and PowerBuilder
Program Development Tools
What are program development tools? User-friendly software
products designed to help both program developers and nontechnical users create solutions to information requirements
Empower nontechnical users by giving them the ability to write simple programs on their own
Allows programmers and IT professionals to focus development efforts on larger projects
p.15.27
Next
macros
application generators
Program Development Tools
What is an application generator?
Sometimes called a program generator A program that allows you to build an
application without writing the extensive code required by a 3GL
Developer works with menu-driven tools that have graphical user interfaces
Typically includes a report writer, form, and menu generatorp.15.27
Next
menu generator
Allows the developer to create a menu, or
list of choices, for the application options
Program Development Tools
What are report writers and forms? A report writer allows
you to design a report on the screen, retrieve data into the report design, and then display or print the report
A form is a window on the screen that provides areas for entering or changing data in a database
p.15.27 Fig. 15-30
Next
Program Development Tools
What is a macro? A series of statements that
instructs an application how to complete a task
Can automate routine, repetitive, or difficult tasks in an application such as word processing, spreadsheet, or database programs
You usually create a macro in one of two ways
• record the macro
• write the macrop.15.28
Next
macro recorder
Used to automate a routine or
repetitive task
Records all actions until
turned off
VBA macro used to automate an
auto loan computation
VBA macro used to automate an
auto loan computation
Program Development Tools
What is Visual Basic for Applications (VBA)? Used to write your
own macros Macros use the
three basic structured programming constructs (sequence, selection, and iteration) within modules
Also use objects, classes, and other object-oriented concepts
p.15.28 Fig. 15-31
Next
Macro dialog
box
Macro dialog
box
Loan Data button
Loan Data button
Macro dialog box in Excel window guiding the user through the data
entry process
Macro dialog box in Excel window guiding the user through the data
entry process
Program Development Tools
What is rapid application development (RAD)? The concept of developing
software throughout the system development process
A common technique is prototyping• a prototype is a working
model of the proposed system
RAD tools are used to develop easy-to-maintain, component-based applications• component is another term
for object• three popular RAD toolsp.15.29
Next
Click to view Web Linkthen click Rapid Application Development
Visual Basic
Delphi
PowerBuilder
Program Development Tools
What are Visual Basic and Delphi? Visual basic
• A Windows-based application that assists programmers in developing other event-driven Windows-based applications
• One of the first programming environments to provide a visual programming environment (VPE)
Delphi• Offers a drag-and-drop VPE• Provides full object-oriented
capabilities
p.15.29
Next
visual programming environment (VPE)
Allows developers to drag-and-drop objects
to build programs
Program Development Tools
What is PowerBuilder? Uses a
proprietary object-oriented language for its application development
Language is called PowerScript
Can create powerful applications
p.15.30 Fig. 15-32
Next
Company on the Cutting Edge
p.15.30
Next
Click to view Web Linkthen click Sybase
Developer of PowerBuilder Enterprise, Powersoft, PowerStudio, and Adaptive Component Architecture
Selected as the company with Best Customer Support in the computer industry by InfoWorld readers
Products help developers efficiently create Internet applications and client/server programs
Web Page Program Development
A Web page is a linked document that can contain text, graphics, video, and audio posted on the World Wide Web
Web page authors, the designers of Web pages, use a variety of techniques to develop Web pagesp.15.31
Next
HTML
Scripts, Applets, Servlets, and
ActiveX ControlsJava, JavaScript,
VBScript, and Perl
Dynamic HTML
XHTML, XML, and WML
Web page authoring software
What is involved in developing Web pages?
<B><B><HR><HR>
<P><P>
Web Page Program Development
p.15.31
Next
tags or markups
Codes that specify links to other documents and
indicate how the Web page displays when viewed on the Web
Web page
A file that contains both text and HTML
tags
A special formatting language that programmers use to create Web pages
View Web pages written with HTML in a Web browser
Not actually a programming language• a language with specific
syntax rules for defining the placement and format of text, graphics, video, and audio on a Web page
What is hypertext markup language (HTML)?
Web Page Program Development
How does HTML code look?
HTML code can be written using any
text editor or entered into any standard word
processing software package
Save the code as an ASCII file with an .htm or .html
extensionp.15.31 Fig. 15-33
Next
Web Page Program Development
How does HTML relate to a Web page? Web page
created from part of the Web code shown in Figure 15-33
p.15.31 Fig. 15-34
Next
Web Page Program Development
How are dynamic elements added to a Web page? Small programs
called scripts, applets, servlets, and ActiveX controls are used to add dynamic content and interactive elements• short
programs that run inside of another program
p.15.32
Next
scriptAn interpreted program that runs on
the client
appletAlso usually runs on the client,
but it is compiled
servletAn applet that runs on the server
ActiveX controlA small program that runs on your
computer, instead of the server
Uses ActiveX technology, a set of object-oriented technologies by Microsoft
Web Page Program Development
What are some special effects that can be added with scripts, applets, servlets, and ActiveX controls? Add multimedia effects
• animated graphics• scrolling messages• calendars• advertisements
Include interactive capabilities• cookies• shopping carts• games• counters• image maps• processing forms
p.15.32
Next
counter
Tracks the number of visitors to a Web site
image map
A graphical image that points to a URL
When you click a certain part of the graphical image, your Web browser sends the coordinates of the clicked location to the Web server, which in turn locates the corresponding URL
Web Page Program Development
What is a processing form?
Collects data from visitors to a Web site, who fill in blank fields and then click a button that sends the information
Activates with a script or applet
p.15.32 Fig. 15-35
Next
Web Page Program Development
What is the common gateway interface (CGI)?
The communications standard that defines how a Web server communicates with outside sources
The program that manages the sending and receiving across the CGI is a CGI script, or CGI program
p.15.33
Next
Click to view Web Linkthen click CGI Programs
You can download CGI programs from the Web, purchase them, or write your
own
Web serverStep 2: Webmaster creates a link between CGI program and Web page. When a user displays the Web page, the CGI program automatically starts.
Step 3: When a user submits a request, it is sent to the CGI program. The CGI program contacts the database and requests information for the user. In this case, it looks for a movie titled Secret Garden.
Step 1: Programmer stores CGI program in a special folder on the Web server, such as /cgi-bin.
Step 4: The CGI program receives information from the database, assembles it in an HTML format, and sends it to the user’s Web browser.
Web Page Program Development
How does a CGI program work?
p.15.33 Fig. 15-36
Next
Web Page Program Development
What is a scripting language? An interpreted
language that typically is easy to learn and use
Often used to write CGI scripts
p.15.34
Next
Java
JavaScript
VBScript
Perl
Web Page Program Development
What is Java? Developed by Sun
Microsystems A compiled object-oriented
programming language used to write stand-alone applications, as well as applets and servlets
Source code is compiled into bytecode, instead of object code, which is executed by a Java interpreter
p.15.34
Next
Click to view Web Linkthen click Java
JavaBeans or Beans
Code segments used to create a Java application
Platform independent
How does a sample of Java code look?
p.15.34 Fig. 15-37
Next
Click to view video
Java applet code
resulting screen
Web Page Program Development
Web Page Program Development
What is JavaScript? An interpreted language that
allows the programmer to add dynamic content and interactive elements to a Web page
JavaScript code is inserted directly into an HTML document
Much simpler than Java To run JavaScript, your browser
must support it• Netscape supports it• Internet Explorer supports a
subset called JScript
p.15.35
Next
The result of a joint venture between Sun
Microsystems and Netscape
Communications Corporation
open language
Anyone can use it without purchasing
a license
Web Page Program Development
How does a sample of JavaScript code look?
p.15.35 Fig. 15-38
Next
Click to view Web Linkthen click javaScript
JavaScript code
Pop-up window
made with JavaScript
code
Web Page Program Development
p.15.36
Next
VBScript (Visual Basic Scripting Edition)
A subset of the Visual Basic language
Allows you to add intelligence and interactivity to Web pages
You embed VBScript code directly into an HTML document
Perl (Practical Extraction and Report Language)
First developed by Larry Wall at NASA’s Jet Propulsion Laboratory
Originally a procedural language similar to C, but now is an interpreted scripting language
What are other scripting languages?
Web Page Program Development
What is dynamic HTML (DHTML)? A newer
type of HTML
Allows you to include more graphical interest and interactivity
p.15.36 Fig. 15-39
Next
Click to view Web Linkthen click Dynamic HTML
When you point to the Recreational Vehicles
link, image to the right is a camper and text
discusses communication from
your RV
When you point to the Recreational Vehicles
link, image to the right is a camper and text
discusses communication from
your RV
When you point to the Rural Regions link,
image to the right is a farmer and text
discusses calling from the farm
When you point to the Rural Regions link,
image to the right is a farmer and text
discusses calling from the farm
Web Page Program Development
What are features of DHTML? DHTML works by using the document object model,
style sheets, and scripting languages
p.15.37
Next
cascading style sheets (CSS)
Contain the formats for how a particular object should display in a Web
browser
document object model (DOM)
Defines every item on a Web page as an
object
Allows you to change properties, such as
color or size, of any or all of these objects on
the Web page
Web Page Program Development
What are XHTML, XML, and WML?
p.15.37
Next
Click to view Web Linkthen click WML
XHTML (eXtensible HTML)
Includes features of HTML and XML
XML (eXtensible Markup Language)
Allows Web page developers to create customized tags, as
well as use predefined tags
Uses XSL (eXtensible Stylesheet
Language) as its style sheet
specification
WML (wireless markup language)
Allows Web page developers to design pages
specifically for microbrowsers
A subset of XML
Uses the wireless application
protocol (WAP)
Web Page Program Development
What is Web page authoring software?
Sometimes called an HTML editor
Allows you to create sophisticated Web pages that include graphical images, video, audio, animation, and other special effects
Generates HTML tags from your Web page design
p.15.38
Next
Adobe GoLive
Lotus FastSite
Macromedia Dreamweaver
Macromedia Flash
Microsoft FrontPage
Multimedia Program Development
What is multimedia authoring software? Also called
authorware Allows you to
combine text, graphics, animation, audio, and video into an interactive presentation
p.15.38
Next
Toolbook
Authorware
Director
Multimedia Program Development
How is multimedia authoring software used? Computer-based
training (CBT) or computer-aided instruction (CAI)
CBT software is called courseware
Web-based training (WBT)
Distance learning, distance education, or online learning
p.15.38 Fig. 15-40
Next
Multimedia Program Development
What is ToolBook? From click2learn.com, Inc. Has a graphical user interface Uses an
object-oriented approach
Can convent multimedia applications into HTML and Java
p.15.40 Fig. 15-41
Next
Multimedia Program Development
What is Authorware?
p.15.40
Next
Software developed by Macromedia
Multimedia authoring software package
Provides the tools developers need to build interactive multimedia training and educational programs
Powerful authoring environment for development of interactive multimedia
magazines
catalogs
reference titles for CD-ROMs and DVD-ROMs
applications for kiosks
Multimedia Program Development
What is Director?
p.15.40 Fig. 15-40
Next
Also from Macromedia
A popular multimedia authoring program with powerful features
Allows you to create highly interactive multimedia applications
Includes Lingo, a built-in object-oriented scripting language
An application created using Director
Standards
Portability
Suitability
Interface
4. Portability to other systems
3. Suitability of the language to the application
2. Interface with other programs
Selecting a Programming Language or Program Development Tool
p.15.40
Next
1. Standards of the organization
What factors should be considered in selecting a programming language?
Company on the Cutting Edge
Macromedia
Software used by more than 1 million professional Web developers to author, produce, deliver, and analyze Web content
Dreamweaver is the leading platform in 70 percent of the market
Flash Player is the most widely Web-distributed software in history
Nearly 20 million users have registered their copies of Shockwave
p.15.41
Next
Click to view Web Linkthen click Macromedia
Summary of Program Development and Programming Languages
What is a computer program? The program development life cycle Step 1 – Analyze problem Step 2 – Design programs Step 3 – Code programs Step 4 – Test programs Step 5 – Formalize solution Step 6 – Maintain programs Programming languages and program development tools
Summary of Program Development and Programming Languages (cont.)
Categories of programming languages Object-oriented program development Programming languages Program development tools Web page program development Multimedia program development Selecting a programming language or program development tool
Chapter 15 Complete