Programming Environments - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Programming Environments

Description:

Classic Compilation. Compiler translates source code to machine-level object code. ... Classic Compiled. Interpreted. 2-Level. Translation Methods. Whole File, ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 19
Provided by: dld9
Category:

less

Transcript and Presenter's Notes

Title: Programming Environments


1
Programming Environments
2
Outline
  • Error types
  • Language Types
  • Translation Approaches

3
Types of Errors
  • Syntax Error
  • Incorrect use of languages defined set of key
    terms and operators
  • Compiler or interpreter usually catches
  • Run-time Error
  • Found when running
  • Logic Errors
  • Compiler typically doesnt catch

4
Programming Language Types
  • Procedural
  • Object-Oriented
  • Markup
  • Scripting
  • Event-Driven

5
Procedural Languages
  • Have Starting and Ending Points
  • Series of instructions essentially executed in a
    linear fashion
  • E.g., Pascal, C

6
Object-Oriented
  • Objects support inheritance
  • Reduces development costs
  • Object listen to and respond to messages
  • Objects Have
  • Attributes fields
  • Methods Operations

7
Markup Languages
  • Formatting rules associated with specific code.
  • E.g., HTML

8
Scripting Languages
  • Instructions recorded in scripts
  • Scripts require a host application that
    interprets and executes each line a script during
    execution
  • E.g., Java Script

9
Event-Driven
  • Attach code to Objects
  • Application is triggered by events

10
The Need to Translate
  • We write in high-level languages
  • Programming Source Code
  • Scripting language
  • Machines run Low-level language
  • Requires translation
  • Traditional Compilers are specific to CPU type
    (architecture)

11
Classic Compilation
  • Compiler translates source code to machine-level
    object code.
  • Translate once, run many
  • Outcome machine language instructions in the
    form of .EXE and .dlls
  • Fast because machine runs machine code and
    doesnt have to translate at run time.

12
Interpreted
  • Interpreter converts code to machine language
    line-by-line just before execution.
  • Translate every time
  • Slower because it must translate for every use

13
Translation Methods
2-Level
High-level
Compiler
Classic Compiled
Interpreted
Intermediatelevel
JVM or CLR
Machine level
14
Translation Methods
15
Java 2-Level Approach
Inter-mediatelevel
Java Code
bytecode
Compiler
High-level
Mac JVM
PC JVM
JVMs are in the computers browser
Machine code
Machine code
16
Creation and Use of Java Applets
17
Comparison of Java and Java Script
18
Evaluation of Scripts and Applets
  • Client Application Web Browser with interpreter
    or JVM
  • Advantages
  • Easy updates on server
  • Scripts and Applets distributed from server to
    client at run-time
  • Platform independence
  • Disadvantages
  • Slower performance, Internet bandwidth constrains
    performance, applets not permitted through some
    firewalls
Write a Comment
User Comments (0)
About PowerShow.com