51
Chapter 10 Application Development

Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Chapter 10

Application Development

Page 2: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Chapter Goals Describe the application development process and the

role of methodologies, models and tools Compare and contrast programming language

generations Explain the function and operation of program

translation software, including assemblers, compilers and interpreters

Describe link editing and contrast static and dynamic linking

Describe integrated application development software, including programmer’s work-benches and CASE tools

Page 3: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Software Development Process of translating user needs

into CPU instructions This is a complex process that

requires significant effort and resources

Software is the most costly component of IS

Page 4: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Software Development

Page 5: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Systems Development Life Cycle

Page 6: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

SDLC Phases Systems requirement model –

provides the detail needed to develop a specific system to meet user needs

Design model – provides an architectural blueprint for system implementation

Page 7: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Development of programming languages

Page 8: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Programming Languages

Page 9: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Programming languages Language used to instruct a

computer to perform a task Programming language development

has tried to Make the language easier to

understand Develop a language that takes less time

(requires fewer instructions) to complete a task

Page 10: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Programming languages cont. Variety of programming languages Link to Google programming

languages page http://directory.google.com

/Top/Computers/Programming/Languages/

Page 11: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Development of languages First Generation – binary CPU

instructions First programmers wrote code as

sequences binary digits Tedious and error prone As software grew in complexity this

became unpractical

Page 12: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Languages cont. Second generation language – assembly

languages (simple machine) Mnemonic represents CPU instruction Mnemonic can also represent location in

memory (variable) Mnemonic can also represent a program

instruction memory address (label)

Page 13: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Assembler Code from 2GL (Assembly code) is

translated into binary instructions by Assembler

Translates each mnemonic into its corresponding binary digit sequence

Programmer still required to write one assembly instruction per CPU instruction

2GL is for a specific CPU (i.e. processor)

Page 14: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Machine independence Programs written in 2GL (assembler)

only work for a specific CPU Companies spend a long time

developing custom systems These systems continue to evolve

over time New modules added Systems updated and maintained over

time

Page 15: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Machine independence cont. When company buys a new

computer (i.e. new CPU) what happens to the old software?

Still a problem, still a lot of mainframe systems running (COBOL) due to difficulty of porting to a new computer

Page 16: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

3G languages 3GLs address the issue of machine

independence Code is standardized (ANSI, etc.) Special software called a compiler

takes standard code and translates it to a specific CPU Each CPU needs to have its own

version of the compiler

Page 17: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

3GLs FORTRAN, COBOL, BASIC,PL/1, Pascal

and C 3GL code is translated (compiled)

into assembly code, then into binary code

First languages to exploit machine independence – 3GL code is the same regardless of the CPU that executes it

Page 18: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Languages cont. Third generation language – allows

programmers to specify many CPU instructions per program instruction or statement

This one-to-many (1:N) relationship is called instruction explosion

Page 19: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Instruction explosion One line of code – Cobol, Pascal, C –

are translated into many lines of CPU instructions

Makes programmer more productive CPU code is more efficient

Compiler (software that generates CPU instructions) can optimize CPU instructions

Page 20: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

4GLs Addressed the following limitations

of 3GL Higher instruction explosion Ability to develop GUI Ability to interact with database

Most 4GL were proprietary packages

VB and SQL are still in use

Page 21: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Object Oriented Languages OOP is an attempt to address

problems of software maintenance and re-use

Data and programs are viewed as integrated parts called objects

Objects communicate using methods Client – server model Prominent examples: C++, Java

Page 22: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

OOP systems models

Page 23: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Language standardization American National Standards Institute

(ANSI) and International Standards Organization (ISO) set standards for programming languages (C, C++, COBOL) Advantage: guarantee portability between

platforms, promotes machine independence Disadvantage: slow to improve and develop

Page 24: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Creating executable code Modern programming languages

use a syntax more suited to human understanding

Computer requires instructions made out of 0s and 1s

Page 25: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Creating .exes cont. Software applications have

become quite complex Hundreds if not thousands of

programmers contribute part of the solution

Solutions are designed to be re-usable

Page 26: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Producing an .exe Individual programmer’s work needs

to be translated into machine code Translate the source code of an

individual file into 0s and 1s All the work of many programmers

needs to be packaged together Collect and bundle different parts of

binary code into a single load module

Page 27: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

IDE Integrated development

environment is a software development tool that brings together software tools to facilitate: Translating higher order languages into

0s and 1s (binary code) Managing and combining libraries of

existing programming solutions

Page 28: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Compiler

Page 29: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Steps in development process Programmer produces a program

in a specific language Program is called source code Code is made up of

Data declarations Statements Function calls (using pre-written

library routines)

Page 30: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Steps cont. Source code (as produced by

programmer) becomes input into compiler

Compiler tests each line of code comparing it to syntax requirements of specific language

If errors exist, produces an error report After “clean compile” compiler

produces object code (assembly instructions)

Page 31: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Output of compile step Symbol table – list of variable

names associated with a memory location

Assembler instructions – mnemonic for CPU instructions

Page 32: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Symbol table

Page 33: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Steps cont. Object file (output of compile step)

becomes input into next step – link editor

Link editor combines object file with code from software libraries

Output of link step is .exe file

Page 34: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Example in C++ Example program showing compile

link and exe output Go to Visual C++

Page 35: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Link Editor Modern programming languages allow programmers

to use pre-existing routines in their code Using a function is referred to as a function call A link editor searches object code (the output of the

compile step) for references to external library function calls

When an external function call is found, the link editor searches for the corresponding executable code that implements the function

Page 36: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Link editor

Page 37: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Benefits of a link editor Allows a project to be developed among

different files (i.e. each programmer develops a separate file)

A single executable program can be constructed from multiple object code files compiled at different times

A single compiler can generate executable programs that run under multiple operating systems

Page 38: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Dynamic vs. static binding Dynamic Linking – linking is performed

during program loading or executionexample: DLLs and Visual Basic, Java

Static Linking – library and other subroutines cannot be changed once they are inserted into the executable codeexample: C++ program

Page 39: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Dynamic vs. static linking

Dynamic Linking Advantages Smaller application program files Flexibility

Static Linking Advantages Execution speed Improved reliability and predictability of

executable programs

Page 40: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Interpreters Reads a single source code instruction,

translates it into CPU instructions or a DLL call

Advantage: flexibility to incorporate new or updated code into an application program

Disadvantage: increased memory and CPU requirements during program execution

Page 41: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Visual Basic Is an interpreted language See VB example

Page 42: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Compilers vs. Interpreters

Page 43: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Java language OOL developed by Sun Originated as operating system for

interactive TVs Applied to demands of producing

code for a distributed computing environment (i.e. the Web)

Page 44: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Java web resources Java web site http://java.sun.com/ Java software http://java.sun.com/java2/ Java documentation http://

developer.java.sun.com/developer/infodocs/?frontpage-main

Java tutorials http://java.sun.com/docs/books/tutorial/

Java applet examples http://javaboutique.internet.com/javasource.html

Page 45: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Development for the Web What are the requirements for an

application development tool designed to produce applications for a distributed computing environment?

Page 46: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Requirements Seamless multi-platform capability Built in security & protection

capabilities Multi-threaded, i.e. easily break a

problem into independent sections run concurrently

How does Java address these requirements?

Page 47: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Java Requirements Multi-platform

Java virtual machine Built in security

Security restrictions for applets Multi-threaded

Built-in thread class in standard library

Page 48: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Java

Page 49: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Java example Run java example with java

console

Page 50: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Microsoft’s Answer .Net framework Supports 20 different programming

languages Supports distributed networked

applications (see presentation)

Page 51: Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare

Summary Application systems are developed by following the

steps of the systems development life cycle. (SDLC) Executable software consists entirely of CPU

instructions All programming language generations other than the

first must be translated into CPU instructions prior to execution

Compiled and interpreted programs must be linked to libraries of executable functions or methods

Application development is more efficiently supposed by integrated suites of automated tools