Application Programming - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Application Programming

Description:

Emphasis on the abstraction of the computation (the metaphor), rather than the machine ... Significant translation requirements, supported by a compiler or ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 18
Provided by: daveei
Category:

less

Transcript and Presenter's Notes

Title: Application Programming


1
Application Programming
  • From the operating systems perspective,
    everything that is not the OS is application.
  • From the programmers perspective, there are a
    number of components that function as
    infrastructure effectively extensions of the
    OS...
  • Editors
  • Compilers
  • Database Management Systems
  • Everything (including the OS) has to be written
    in some language

2
Programming Language Concepts
  • A programming language is a restricted form of
    expression with a concise grammar and an
    unambiguous semantics
  • The full grammar can be printed on a few pages
  • Pascal 2
  • Java 13
  • Ada 16

3
Programming Language Concepts
  • A grammar sample for integers and real numbers
  • ltdigitgt 0 1 2 3 4 5
    6 7 8 9
  • ltdig seqgt ltdigitgt ltdigitgt ltdig seqgt
  • ltintegergt ltdig seqgt
  • ltreal numbergt ltdig seqgt . ltdig seqgt

4
Programming Language Concepts
  • The semantics explains the meaning of the
    language constructs
  • Pascal 32 pages
  • Java 423 pages
  • Most of the verbage involves explaining in
    English something that take only a few lines
    using formal techniques (denotational semantics)

5
Language Scope Coverage
  • Computational Model
  • A metaphor shielding the specific machine details
  • Data Types and Operations
  • Structure and manipulation of values
  • Simple characters, integers, etc.
  • Complex arrays, records, lists, etc.

6
Language Scope Coverage
  • Abstraction Facilities
  • Formation of larger scale units from smaller
    units
  • Procedures, functions, etc.
  • Classes, packages, etc.

7
Language Scope Coverage
  • Checking Enforcement
  • Compile-time
  • Missing syntax (grammar)
  • Variable mismatches (semantics)
  • Run-time
  • Divide-by-Zero
  • Uninitialized variables

8
Language Levels
  • Machine Language
  • Directly executable by the CPU
  • 00000010101111001010
  • 00000010111111001000
  • 00000011001110101000
  • Clusters of bits are routed to the control unit,
    arithmetic unit, etc.

9
Language Levels
  • Assembly Language
  • A symbolic variant of machine language
  • LOAD I
  • ADD J
  • STORE K
  • Various segments of bit patterns are replaced
    with symbols
  • 00000010 -gt LOAD
  • 00000011 -gt STORE

10
Language Levels
  • High(er) Level Languages
  • Emphasis on the abstraction of the computation
    (the metaphor), rather than the machine
  • K I J
  • Significant translation requirements, supported
    by a compiler or interpreter

11
Commmon Languages
  • FORTRAN
  • Numerical calculation, little or no support for
    text, graphics
  • COBOL
  • Business data processing
  • Repetitive calculation over large amounts of data

12
Commmon Languages
  • C
  • Low/high level language originally designed for
    systems programming
  • Support for address arithmetic
  • Java
  • Object-oriented language closely tied to a
    virtual machine definition, allowing execution of
    the same program on many machines
  • Direct support for threads multiple execution
    points in a single program

13
Programs and Models
  • A model is a simplified representation, focussing
    on some features and neglecting others
  • Rarely complete
  • Dissimilar from that it represents in some manner
  • Can represent imaginary or hypothetical concepts

14
Model Characteristics
  • Elements represent external, frequently more
    complex things
  • Elements exhibit consistent behavior
  • Elements can be grouped into different categories
    based upon common behavior
  • Actions external to a model element cause
    behavior of that model element

15
Java Lingo (really Object Lingo)
  • Objects model elements in Java programs
  • Classes Objects sharing common behavior
  • Instance (of a class) an object belonging to
    that class
  • Reference any phrase that is used to refer to an
    object
  • Message a request for some desired behavior from
    an object
  • Method the definition (within a class) of some
    form of behavior

16
The Bottom Line...
  • Programming in Java amounts to nothing more or
    less than writing the definitions of classes and
    using those classes to create objects.

17
The Application Life Cycle
Write a Comment
User Comments (0)
About PowerShow.com