Docstoc

Shelly Cashman Series Discovering Computers 2002 (PowerPoint download)

Document Sample
Shelly Cashman Series Discovering Computers 2002 (PowerPoint download) Powered By Docstoc
					Chapter 15
Program
Development and
Programming
Languages
                                       Chapter 15 Objectives

                                            Describe the object-oriented
           Explain the six steps in the        approach to program
         program development life cycle            development

          Describe top-down program             Identify programming
                    design                   languages commonly used
                                                         today
          Explain structured program       Identify the uses of application
          design and the three basic        generators, macros, and RAD
              control structures                         tools
         Explain the differences among      Describe various Web page
         the categories of programming     development tools, including
                   languages               HTML, DHTML, XML, and WML

                                            Identify uses of multimedia
                                               authoring packages

 Next

p.15.2
                                   What is a Computer
                                   Program?
         What is a computer program?
            A set of instructions that
             directs a computer to
             perform tasks
            Computer programmers
                                           programming language
              • use program
                development tools that     A set of words, symbols,
                                           and codes that enables a
                generate these                  programmer to
                instructions              communicate instructions
                automatically                    to a computer
              • use a programming
                language to write these
 Next

p.15.2
                instructions themselves
                          The Program
                          Development Life Cycle
    What is the
    program
    development
    life cycle
    (PDLC)?
        A set of steps
         programmers
         use to build
         computer
         programs


 Next

p.15.22 Fig. 15-1
                                   The Program
                                   Development Life Cycle
        How is program development related to system
        development?
            Program development is an ongoing process within
             system development




 Next

p.15.3 Fig. 15-2
                                      The Program
                                      Development Life Cycle
        What 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

 Next

p.15.3 Fig. 15-2
                                 The Program
                                 Development Life Cycle
   What 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         programming team
         Identifies the input, output,        A group of
           processing, and data             programmers who
           requirements of each program        develop the
           and the relationships among          programs
           programs
         The scope of the program
Click to
           specification package largely
view video determines how many
 Next
           programmers work on the
p.15.3
           program development
                                    Step 1 – Analyze Problem

         What is involved in analyzing the problem?
            Analyze the problem
             the program(s)             Review the program
             should solve so you          specifications
             can begin to develop            package
             an appropriate
             solution
            In most cases, the             Meet with the
             solution requires           systems analyst and
                                               users
             more than one
             program
            Three major tasks
                                        Identify each program’s
                                           input, output, and
 Next
                                        processing components
p.15.4
                                       Step 1 – Analyze Problem

          Why does the programmer review the program
          specification package?
             Package                                    systems
              contains a                               flowcharts
                                     charts
              variety of
              deliverables that
              identify input,                              structured
              output, design and        diagrams            English
              data requirements
             By thoroughly
              reviewing the
                                                       decision tables and
              package, the                reports
              programmer                                 decision trees
              understands the
              nature and
 Next         requirements of      screen and report          data
p.15. 4
              each program           layout charts         dictionary
                                         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




 Next

p.15.4 Fig. 15-3
                                  Step 2 – Design Programs

         What is involved in designing programs?
            Three tasks
              • grouping each          top-down design
                program’s
                                             Task 1
                activities into
                modules           Focuses on what the program
                                           should do
              • devising a
                solution
                algorithm for
                each module           structured design

              • testing the              Tasks 2 and 3
                solution          Determines how to build the
 Next           algorithms          programs based on the
p.15.5                                  requirements
                                   Step 2 – Design Programs

         What is top-down design?
            Breaks down the
                                  Identify the the major functions of a
             original set of      program, called the main routine or
             program                        the main module
             specifications
                               Decompose (break down) the main routine
             into smaller,
                                into smaller sections called subroutines
             more
             manageable         Analyze each subroutine to determine if
             sections               it can be decomposed further

                               Continue decomposing subroutines until
                                 each one performs a single function
Click to view Web Link
then click Top-Down Design
 Next
                                A section of a program that performs a
p.15.5
                                     single function is a module
                                     Step 2 – Design Programs

        What is a hierarchy chart?
            Also called a structure chart or top-down chart
            Used to show program modules graphically




 Next

p.15. 6Fig. 15-4
                                       Step 2 – Design Programs

         What is structured design?
               A technique that builds all
                program logic from a          sequence
                combination of three           control
                basic control structures      structure
               A control structure is a
                design that determines                     selection
                the logical order of                        control
                program instructions                       structure

Click to view
Web Link
                 • also called a construct    repetition
then click     Each module typically          control
Structured
Design          contains more than one        structure
 Next
                control structure
p.15.6
                              Step 2 – Design Programs

        What is a sequence control structure?
            Shows one or
             more actions
             following each
             other in order
            Actions
              • inputs
              • processes
              • outputs


 Next

p.15.7 Fig. 15-5
                                 Step 2 – Design Programs

         What is a selection control structure?
            Tells the
             program which
             action to take,       if-then-else
             based on a          control structure
             certain condition
            Two common
             types of
             selection control                  case control
             structures                          structure



 Next

p.15.7
                                         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)
 Next
                   action
p.15.7 Fig. 15-6
                                     Step 2 – Design Programs

        What is a case control structure?
            A condition can yield one of three or more
             possibilities




 Next

p.15.7 Fig. 15-7
                                    Step 2 – Design Programs

         What is a repetition control structure?
            Also called the
             iteration control
             structure or a loop           do-while
                                            control
            Used when a
                                           structure
             program performs
             one or more
             actions repeatedly
             as long as a
             certain condition is             do-until
                                              control
             met
                                             structure
            Two forms
 Next

p.15.8
                                        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
 Next           • Looping continues until
p.15.8 Fig. 15-8  the condition becomes
                  false
                                      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


 Next

p.15.8 Fig. 15-9
                                     Step 2 – Design Programs

         What are the guidelines of a proper program?
                                            dead code
            The program,
             each of its         Any code, or program instruction,
             modules, and         that a program never executes
             each of its
             control                          infinite loop
             structures must        A set of instructions that repeats
             have                              continuously
              • No dead code
                                                  entry point
              • No infinite
                loops                  The location where a program, a
                                     module, or a control structure begins
              • One entry
                point
                                                      exit point
 Next

p.15.8
              • One exit point
                                             The location where it ends
                                 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
 Next

p.15.9 Fig. 15-10
                                      Step 2 – Design Programs

         What is a solution algorithm?
            Also called program
             logic
            A graphical or written        program flowchart
             description of the
             step-by-step
             procedures in a                    Nassi-
                                             Schneiderman
             module                             charts
            To help develop a
             solution algorithm,
             programmers use                 pseudocode
             design tools
 Next

p.15.9
                                       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
 Next

p.15.9 Fig. 15-11
                                                   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

                       comment symbol or
 Next                   annotation symbol
p.15.10 Fig. 15-12
                     Explains or clarifies logic
                                   Step 2 – Design Programs

        What is flowcharting software?
          Used to
           develop
           flowcharts
          Makes it
           easy to
           modify and
           update
           flowcharts


Click to view Web Link
then click Flowcharting Software
 Next

p.15.10 Fig. 15-13
                                     Step 2 – Design Programs

        What is a Nassi-Schneiderman (N-S) chart?
            Graphically shows the logic in a solution algorithm
            Sometimes called structured flowcharts




 Next

p.15.11 Fig. 15-14
                                  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

 Next

p.15.12 Fig. 15-15
                                Step 2 – Design Programs

         What is a quality review?
            The programmer
             checks the logic
             for correctness
             and attempts to
             uncover logic
             errors
                                        logic error
            Two techniques
             for reviewing a        A flaw in the design
             solution                    that causes
                                     inaccurate results
             algorithm
              • desk check
              • structured
 Next           walkthrough
p.1512
                                   Step 2 – Design Programs

          What is a desk check?
          The use of test       1. Developing sets of test data (inputs)
           data to step
           though a              2. Determining the expected result
           program’s logic          (output) for each set of data, without
                                    using the solution algorithm
          Test data is
           sample data that      3. Stepping through the solution
           mimics data the          algorithm using one set of test data
           program might            and writing down the actual result
                                    obtained (output) using the solution
           process once it is
                                    algorithm
           in production
          Involves five steps   4. Comparing the expected result from
                                    Step 2 to the actual result from Step 3
 Next

p.15.12                          5. Repeating Steps 3 and 4 for each set
                                    of test data
                                   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      Detecting errors
           while members of the               and making
           programming team step         improvements early
                                              in the PDLC
           through the program logic      reduces the overall
          Purpose is to identify           time and cost of
           errors in the program logic          program
           and check for possible             development
 Next
           improvements in program
p.15.12
           design
                                   Step 3 – Code Programs

          What is involved in coding programs?
          Two steps
            • translating the solution
              algorithm into a
              programming language
            • entering the
              programming                        syntax
              language code into           The set of grammar
              the computer                    and rules that
                                          specifies how to write
          Each of the many                 instructions for a
           programming languages           solution algorithm
           has a particular syntax
 Next

p.15.13
                                       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

                                                                     global
                                                                   comments




 Next                                                               internal
p.15.13 Fig. 15-16                                                 comments
                                  Step 4 – Test Programs

          What is involved in testing programs?
          Goal is to ensure                syntax errors
           the program runs    Occur when the code violates the syntax,
           correctly and is       or grammar, of the programming
           error free                        language
          Two typical types      Usually discovered the first time a
           of errors              program code is executed on the
                                              computer
            • syntax errors
            • logic errors                    logic errors
                                   Flaw in the design that generates
                                           inaccurate results
 Next                             Systems analyst develops test data
p.15.13                          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


 Next

p.15.13
                               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
 Next

p.15.14 Fig. 15-17
                                Step 4 – Test Programs

          What is a debug utility?
          Also called a
           debugger
                                      millennium bug
          Allows you to
           identify syntax           Also called the Y2K
           errors and to find                bug
           logic errors            Took effect when the
          You can examine         computer date rolled
           program values           over to January 1,
           while the                       2000
           program runs in           Non Y2K compliant
           slow motion               computers read the
                                      date as 01/01/00

 Next

p.15.14
                                        Step 5 – Formalize
                                        Solution
          What is involved in formalizing a solution?
         The programmer performs two
          activities                                 hierarchy chart
           • review the program code
              – look for any dead code          solution algorithm in the
                and remove it                      form of a program
              – run the program one             flowchart, and N-S chart,
                final time to verify it still        or pseudocode
                works
           • review all the                             test data
             documentation
              – ensures all
                documentation is                  program code listings
                complete and accurate            that contain global and
 Next

p.15.15
              – includes a number of               internal comments
                types of documentation
                                    Step 6 – Maintain
                                    Programs
          What is involved in maintaining programs?
          Two activities
            • correcting errors
            • adding enhancements       When users identify errors or
                                        enhancements, they typically
               – involves modifying      notify the systems analyst
                 existing programs to
                 improve their
                 functionality
          When a program is                The systems analyst
           implemented, or placed         contacts and meets with a
           into production, users               programmer
           interact with the programs
            • programs process           They begin to analyze the
              actual, or live,           problem or enhancement,
 Next         transactions                 which is Step 1 of the
p.15.15     • users identify errors                PDLC
              and enhancements
                                        Programming Languages
                                        and Program Development
                                        Tools
          What are programming languages and program
          development tools?


             programming language
                                            program development tool
             A set of words, symbols,
                                             Consists of user-friendly
             and codes that enables a
                                                software products
                  programmer to
                                              designed to assist both
             communicate a solution
                                                 programmers and
            algorithm to the computer
                                             nontechnical users with
                                            the creation of information
                                                 system solutions
 Next

p.15.16
                                        Categories of
                                        Programming Languages
          What are the categories of programming
          languages?
             Five major categories of programming languages


                                                  assembly languages
               machine languages

Click to                            third-generation
view
animation                              languages
                                                       fifth-generation
Click to            fourth-generation                      languages
view video             languages
 Next

p.15.16
                                          Categories of
                                          Programming Languages
          What are low- and high-level programming
          languages?
             Languages are classified as either low level or high level

                    low-level language                  high-level language
                 A programming language             A language that is machine
                that is machine dependent                  independent


               machine-dependent language         machine-independent language

                Only runs on one particular          Can run on many different
                        computer                      types of computers and
                                                         operating systems

 Next
                   machine and assembly              third-generation, fourth-
p.15.16
                  languages are low-level         generation, and fifth-generation
                                                     languages are high-level
                                            Categories of
                                            Programming Languages
    What 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
Click to           binary digits
view
animation Binary digits correspond
 Next
                   to the on and off electrical
p.15.16 Fig. 15-18
                   states of a computer
                                              Categories of
                                              Programming Languages
        What is assembly
        language?
     The second generation of
      programming languages
     A programmer writes
      instructions using symbolic
      instruction codes

                       symbolic instruction
                             codes
                     Also called mnemonics
 Next                Meaningful abbreviations
p.15.16 Fig. 15-19         and codes
                                           Categories of
                                           Programming Languages
          What are features of assembly languages?

                symbolic address                     Source program

             A meaningful name that             The program that contains
           identifies a storage location       the assembly language code



                     macro
                                                      Assembler
           Generates multiple machine
                                                  Converts the assembly
           language instructions for a
                                                language source program
            single assembly language
                                                into machine language so
                    instruction
                                                  that the computer can
           Saves the programmer time                   understand it
 Next
          during program development
p.15.17
                                     Categories of
                                     Programming Languages
        What 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




Click to
view
animation
 Next

p.15.18 Fig. 15-20
                                          Categories of
                                          Programming Languages
        What is a compiler?
          Converts the entire source              source program
           program into machine                     The 3GL code
           language before executing it
          The compiler checks the
           source program’s syntax                   object code
          Makes sure the program            Also called an object program
           properly defines the data it
           will use in calculations or     The machine language version that
           comparisons                       results from compiling the 3GL
          Produces a program
           listing which contains
           the source code and a
           list of any syntax errors
          Translates an entire
           program before
 Next
           executing it
p.15.18 Fig. 15-20
                                   Categories of
                                   Programming Languages
        What 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


 Next

p.15.18 Fig. 15-21
                                        Categories of
                                        Programming Languages
    What 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
 Next
                   and its project
p.15.19 Fig. 15-22 dictionary
                                      Categories of
                                      Programming Languages
          What are some examples of 4GLs?

                                                report writer
                       SQL
                                            Also called a report
                 A query language               generator
                enabling users and
                                          Software that allows you
                  programmers to
                                          to design a report on the
                 retrieve data from
                                          screen, retrieve data into
                  database tables
                                           the report design, and
                                          then display or print the
                                                   report
                                           Builds a 4GL query that
 Next                                      enables you to access
p.15.19                                            the data
                                    Categories of
                                    Programming Languages
        What is a fifth-generation language (5GL)?
          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
 Next      Basic
p.15.20 Fig. 15-25
                                    Object-Oriented Program
                                    Development
          What is the object-oriented (OO) approach?
         The programmer                         object
          can package the
                               An item that can contain both data and the
          data and the
                              procedures that read or manipulate that data
          program (or
          procedure) into a
          single unit,                    method or operation
          called an object     The procedure in the object that contains
         When the             activities that read or manipulate the data
          structure of an
          object changes,                attributes or variables
          any program that
          accesses the                    The data elements
          object
          automatically           encapsulation or information hiding
 Next

p.15.20
          accesses the          The concept of packaging methods and
          change                     attributes into a single object
                                    Object-Oriented Program
                                    Development
        What 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



 Next

p.15.20 Fig. 15-23
                                             Object-Oriented Program
                                             Development
        What 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
 Next                an object what
p.15.20 Fig. 15-23   to do
                                Object-Oriented Program
                                Development
          What is the Object Management Group (OMG)?
          An international
                                    UML (Unified Modeling
           organization that             Language)
           establishes
                                    Contains the standard
           guidelines and
                                     notation for analysis,
           specifications for     design, and documentation
           OO application            for the OO approach
           development
          Has adopted UML         CORBA (Common Object
           and CORBA as           Request Broker Architecture)
           standards                Defines how objects in
                                    separate programs on a
 Next
                                   network can communicate
p.15.21
                                       with each other
                                    Object-Oriented Program
                                    Development
          What is object-oriented programming (OOP)
          language?
            A language that uses the
             OO approach
            An OOP is event driven
              • checks for and
                                                event
                responds to a set of
                events                     The OOP term for
                                               message
            C++ is a complete object-
             oriented language
Click to view Web Link
then click Object-Oriented
Programming Languages
 Next

p.15.21
                              Programming Languages

          What are the most widely used programming
          languages?
                               BASIC
          Hundreds of
           programming
           languages exist                   Visual Basic

          A few are used
           widely enough to    COBOL
           be recognized as
           standards                             C
          Most are high-
           level languages      C++

 Next
                                               RPG
p.15.22
                                   Programming Languages

          How can you compute gross pay?
         Figures on the
                             1. Multiply the regular time hours worked
          following slides
                                by the hourly rate of pay to obtain the
          show program          regular time pay
          code in several
                               Regular pay = regular hours x hourly rate of pay
          programming
          languages          2. Multiply the overtime hours by 1.5
                                times the hourly rate of pay to obtain
         The code solves       the overtime pay
          a simple payroll
                             Overtime pay = overtime hours x 1.5 x hourly rate of
          problem –                                   pay
          computing the
                             3. Add the regular time pay and the
          gross pay for an
                                overtime pay together
 Next     employee
p.15.22                         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




 Next

p.15.22 Fig. 15-24
                                   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




Click to
view Web
Link
then click
Visual
Basic
 Next

p.15.22 Fig. 15-25
                                      Programming Languages
        How is a Visual Basic application created?
             4:
             3:
             2:              tests
        Step 1: Programmer writes
        assigns user interface.pay
        designs properties to each
        the application. Gross
        code and assigns it to the
        COMPUTE button.
        object onafter Hours
        Regular Time form. Objects
        displays the COMPUTE
        Worked,text boxes,Hours
        button is clicked.
        include Overtime
        command buttons, labels,
        Worked, and Hourly Pay
        Ratethe form boxes, in
        and are text itself.
        which the user enters data.
        COMPUTE and CLEAR are
        command buttons. All
        other objects are labels.




 Next

p.15.23 Fig. 15-25
                                         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
 Next

p.15.24 Fig. 15-26
                                     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’
Click to
view Web     Developed the first compiler
Link
         
then click    Created the FLOW-MATIC
Grace
Hopper        programming language that
 Next         laid the foundation for
p.15.24       COBOL
                                     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




 Next

p.15.25 Fig. 15-27
                                     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
Click to view Web Link
then click Dennis Ritchie
 Next

p.15.25
                                  Programming Languages

          What is C++?
           Developed in the 1980s by Bjarne
            Sroustrup at Bell Laboratories
           An object-oriented programming
                                                        C#
            language
           An extension of the C programming          A newer
            language                               programming
                                                   language that
           Includes all the elements of the C   combines features
            language plus has additional            of C and C++
            features for working with objects,
                                                  Best suited for
            classes, events, and other object-
                                                 development of
            oriented concepts                    Web applications
Click to view Web Link
then click C++
 Next

p.15.25
                                     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

 Next

p.15.26 Fig. 15-28
                           Programming Languages

        What are some other programming languages?




 Next

p.15.26 Fig. 15-29
                                      Program Development
                                      Tools
          What are program development tools?
         User-friendly software
          products designed to help both
          program developers and
          nontechnical users create         application generators
          solutions to information
          requirements
         Empower nontechnical users
          by giving them the ability to
          write simple programs on their
                                                 macros
          own
         Allows programmers and IT
          professionals to focus
          development efforts on larger
          projects                         RAD tools: Visual Basic,
 Next                                      Delphi, and PowerBuilder
p.15.27
                                       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 generator
                menu-driven tools that             Allows the developer
                have graphical user                 to create a menu, or
                interfaces                         list of choices, for the
                                                     application options
               Typically includes a
                report writer,
 Next
                form, and menu
p.15.27         generator
                                       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
 Next
              data in a database
p.15.27 Fig. 15-30
                                        Program Development
                                        Tools
          What is a macro?
          A series of statements that
           instructs an application
           how to complete a task             macro recorder
          Can automate routine,             Used to automate
           repetitive, or difficult tasks      a routine or
           in an application such as          repetitive task
           word processing,
                                               Records all
           spreadsheet, or database
                                               actions until
           programs                             turned off
          You usually create a macro
           in one of two ways
            • record the macro
 Next

p.15.28
            • write the macro
                                Program Development
                                Tools
        What is Visual Basic for Applications (VBA)?
          Used to write your
           own macros
          Macros use the
                                                        Loan Data
           three basic
           structured                                    button
           programming
           constructs
           (sequence,                                         Macro
           selection, and                                     dialog
           iteration) within                                   box
           modules
          Also use objects,
           classes, and other                   VBA macro used
           object-oriented                       to automate an
           concepts                                 auto loan
 Next                              Macro dialog box in Excel window
                                                    computation
p.15.28 Fig. 15-31                 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              Visual Basic
          A common technique is
              prototyping
               • a prototype is a working
                 model of the proposed
                                                 Delphi
                 system
          RAD tools are used to develop
Click to view
Web Link      easy-to-maintain, component-
then click
Rapid
              based applications
Development • component is another term
Application
                                               PowerBuilder
  Next           for object
p.15.29
               • three popular RAD tools
                                     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     visual programming
              environments to provide a         environment (VPE)
              visual programming               Allows developers to
              environment (VPE)               drag-and-drop objects
          Delphi                               to build programs
            • Offers a drag-and-drop VPE
            • Provides full object-oriented
 Next         capabilities
p.15.29
                                 Program Development
                                 Tools
        What is PowerBuilder?
             Uses a
              proprietary
              object-oriented
              language for its
              application
              development
             Language is
              called
              PowerScript
             Can create
              powerful
              applications
 Next

p.15.30 Fig. 15-32
                                      Company on the Cutting
                                      Edge

             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
Click to
view Web     Products help developers
Link
then click    efficiently create Internet
Sybase
              applications and
 Next
              client/server programs
p.15.30
                                    Web Page Program
                                    Development
          What is involved in developing Web pages?
             A Web page is a
              linked document             HTML
              that can contain                            Scripts, Applets,
              text, graphics,                              Servlets, and
              video, and audio                            ActiveX Controls
              posted on the World   Java, JavaScript,
              Wide Web              VBScript, and Perl

             Web page authors,                               Dynamic
                                                               HTML
              the designers of
                                      XHTML, XML,
              Web pages, use a
                                       and WML
              variety of
 Next         techniques to                              Web page authoring
p.15.31                                                       software
              develop Web pages
                                      Web Page Program
                                      Development
          What is hypertext markup language (HTML)?
          A special formatting
           language that                  tags or markups
           programmers use to
                                       Codes that specify links
           create Web pages
                                       to other documents and
          View Web pages written       indicate how the Web
           with HTML in a Web            page displays when
           browser                        viewed on the Web
          Not actually a
           programming language
            • a language with
                                  <HR>
              specific syntax rules                 Web page
              for defining the
              placement and format
              of text, graphics,     <B>       A file that contains
                                               both text and HTML


                                   <P>
 Next
              video, and audio on a                     tags
p.15.31
              Web page
                              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
 Next        extension
p.15.31 Fig. 15-33
                         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




 Next

p.15.31 Fig. 15-34
                                     Web Page Program
                                     Development
          How are dynamic elements added to a Web page?
             Small programs                       script
              called scripts,       An interpreted program that runs on
              applets, servlets,                 the client
              and ActiveX
              controls are used                     applet
                                       Also usually runs on the client,
              to add dynamic
                                             but it is compiled
              content and
              interactive                          servlet
              elements                An applet that runs on the server
               • short
                 programs that                 ActiveX control
                 run inside of        A small program that runs on your
                 another               computer, instead of the server
 Next
                 program           Uses ActiveX technology, a set of object-
p.15.32
                                     oriented technologies by Microsoft
                                       Web Page Program
                                       Development
          What are some special effects that can be added
          with scripts, applets, servlets, and ActiveX
          controls?
                                                            counter
             Add multimedia effects
                                                     Tracks the number of
               • animated graphics
                                                     visitors to a Web site
               • scrolling messages
               • calendars
               • advertisements                    image map
             Include interactive       A graphical image that points to a
              capabilities                            URL
               • cookies
               • shopping carts        When you click a certain part of the
               • games                 graphical image, your Web browser
                                       sends the coordinates of the clicked
 Next          • counters
                                       location to the Web server, which in
p.15.32        • image maps            turn locates the corresponding URL
               • processing forms
                            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
 Next

p.15.32 Fig. 15-35
                                    Web Page Program
                                    Development
          What is the common gateway interface (CGI)?

             The communications
              standard that defines how
              a Web server
              communicates with            You can download
              outside sources              CGI programs from
             The program that             the Web, purchase
                                           them, or write your
              manages the sending and             own
Click to
view Web      receiving across the CGI
Link
then click
              is a CGI script, or CGI
CGI
Programs
              program
 Next

p.15.33
                                     Web Page Program
                                     Development
        How does a CGI program work?
       Step 1: Programmer
      Step 3: When a user
           4: The CGI
     Step 2: Webmaster                          Web server
       stores a request, it in a
      submitsCGI programis sent
     creates a receives
     program link
       special folder on the
      to the CGI program. The
     information from the
     between CGI
       Web server, such as
      CGI program contacts the
     database,
     program and Web
       /cgi-bin.
      database and requests
     page. When a user
     assembles it in an
      information for the user. In
     HTML format, and
     displays the Web
      this case, it looks for a
     sends it to the
     page, the CGI
      movie titled Secret Garden.
     user’s Web
     program browser.
     automatically starts.




 Next

p.15.33 Fig. 15-36
                             Web Page Program
                             Development
          What is a scripting language?
          An interpreted
           language that
           typically is     Java
           easy to learn
           and use                      JavaScript
          Often used to
           write CGI
           scripts
                             VBScript

                                                 Perl


 Next

p.15.34
                                    Web Page Program
                                    Development
          What is Java?
             Developed by Sun
              Microsystems                    JavaBeans or
             A compiled object-oriented         Beans
              programming language used      Code segments
              to write stand-alone           used to create a
              applications, as well as       Java application
              applets and servlets
                                                Platform
             Source code is compiled into    independent
              bytecode, instead of object
              code, which is executed by a
              Java interpreter
Click to view Web Link
then click Java
 Next

p.15.34
                                   Web Page Program
                                   Development
     How does
     a sample
     of Java
     code look?

         Java applet
            code
                       resulting
                        screen



Click to
view video
 Next

p.15.34 Fig. 15-37
                                   Web Page Program
                                   Development
          What is JavaScript?
          An interpreted language that     The result of a joint
           allows the programmer to        venture between Sun
           add dynamic content and          Microsystems and
           interactive elements to a             Netscape
           Web page                          Communications
          JavaScript code is inserted         Corporation
           directly into an HTML
           document
          Much simpler than Java                open language
          To run JavaScript, your             Anyone can use it
           browser must support it             without purchasing
            • Netscape supports it                  a license
 Next
            • Internet Explorer supports
p.15.35
              a subset called JScript
                          Web Page Program
                          Development
        How does a sample of JavaScript code
        look?

JavaScript
  code
 Pop-up
 window
made with
JavaScript
  code


Click to view Web Link
then click javaScript
 Next

p.15.35 Fig. 15-38
                                        Web Page Program
                                        Development
          What are other scripting languages?
                     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
 Next                          an interpreted scripting language
p.15.36
                                            Web Page Program
                                            Development
        What is dynamic HTML (DHTML)?
            A newer                                     When you point to the
             type of                                     Recreational Vehicles
                                                       link, image to the right is
             HTML                                          a camper and text
                                                               discusses
            Allows you                                   communication from
             to include                                         your RV
             more
             graphical
             interest and
             interactivity
                             When you point to the
                               Rural Regions link,
Click to view Web Link
                             image to the right is a
then click Dynamic HTML
                                 farmer and text
 Next
                             discusses calling from
p.15.36 Fig. 15-39
                                    the farm
                                      Web Page Program
                                      Development
          What are features of DHTML?
          DHTML works by using the document object model,
           style sheets, and scripting languages



                   document object
                    model (DOM)              cascading style sheets
                                                    (CSS)
                 Defines every item on
                  a Web page as an           Contain the formats for
                        object               how a particular object
                                             should display in a Web
                 Allows you to change               browser
                  properties, such as
                 color or size, of any or
 Next
                 all of these objects on
p.15.37
                      the Web page
                                 Web Page Program
                                 Development
          What are XHTML, XML, and WML?
                          XML (eXtensible        WML (wireless
       XHTML
                         Markup Language)       markup language)
  (eXtensible HTML)
                          Allows Web page       Allows Web page
 Includes features of
                         developers to create     developers to
   HTML and XML
                         customized tags, as      design pages
                             well as use         specifically for
                           predefined tags       microbrowsers
                             Uses XSL           A subset of XML
                            (eXtensible
                             Stylesheet         Uses the wireless
                          Language) as its         application
Click to view Web Link
                            style sheet          protocol (WAP)
then click WML
 Next                      specification
p.15.37
                                        Web Page Program
                                        Development
          What is Web page authoring software?
             Sometimes called an
              HTML editor                    Adobe GoLive
             Allows you to create
              sophisticated Web
              pages that include                       Lotus FastSite
              graphical images,
              video, audio,
                                             Macromedia
              animation, and other
                                             Dreamweaver
              special effects
             Generates HTML
              tags from your Web                     Macromedia Flash
              page design
 Next

p.15.38                              Microsoft FrontPage
                               Multimedia Program
                               Development
          What is multimedia authoring software?
          Also called
           authorware
          Allows you to          Toolbook
           combine text,
           graphics,
           animation, audio,
           and video into an      Authorware
           interactive
           presentation

                                   Director
 Next

p.15.38
                                 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
 Next
             online learning
p.15.38 Fig. 15-40
                                     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

 Next

p.15.40 Fig. 15-41
                                  Multimedia Program
                                  Development
          What is Authorware?
          Software developed by
           Macromedia                     magazines
          Multimedia authoring
           software package
                                                  catalogs
          Provides the tools
           developers need to build
           interactive multimedia
                                       reference titles for CD-
           training and educational    ROMs and DVD-ROMs
           programs
          Powerful authoring
           environment for                      applications for
                                                    kiosks
 Next      development of
p.15.40
           interactive multimedia
                                  Multimedia Program
                                  Development
        What is Director?
            Also from               An application created using Director
             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
 Next        language
p.15.40 Fig. 15-40
                                           Selecting a Programming
                                           Language or Program
                                           Development Tool
          What factors should be considered in selecting a
          programming language?
          1. Standards of the organization

                               Standards               Interface

          2. Interface with other programs


          3. Suitability of the language to
             the application                                  Portability
                             Suitability
 Next

p.15.40   4. Portability to other systems
                                            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
Click to view
                 widely Web-distributed
Web Link         software in history
then click
Macromedia
                Nearly 20 million users
 Next            have registered their
p.15.41
                 copies of Shockwave
             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

				
DOCUMENT INFO