Perfect Quote - PowerPoint PPT Presentation

About This Presentation
Title:

Perfect Quote

Description:

Safety checks 'burden' the compiler and/or the run-time. ... Periodic updating of the screen with data acquired in real-time. ( sports/stocks ticker) ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 21
Provided by: TKPr6
Learn more at: http://cecs.wright.edu
Category:
Tags: perfect | quote | real | stock | ticker | time

less

Transcript and Presenter's Notes

Title: Perfect Quote


1
Perfect Quote
  • You know you've achieved perfection in design,
  • Not when you have nothing more to add,
  • But when you have nothing more to take away.
  • - Antoine de Saint Exupery.

2
Language Design
  • One thing the language designer should not do is
    to include untried ideas of ones own. The task is
    one of consolidation, not innovation.
    - C. A.
    R. Hoare
  • In language design, the central problem is to
    organize a variety of concepts in a way which
    exhibits uniformity and generality.
    - J. C. Reynolds

3
  • Conflicting goals lead to difficult trade-offs.
  • Safety checks burden the compiler and/or the
    run-time.
  • Safety and machine independence may exclude
    efficient low-level operations.
  • Type systems restrict programming style in
    exchange for strong guarantees.

4
  • A language addition should whenever possible
    solve new problems beyond its original purpose
    --- not create new problems through its
    interaction with other mechanisms. A prudent
    language designer, having toyed with a possible
    new facility, and encountering incompatibilities
    with more important properties of the design,
    quickly retreats.
  • -- Bertrand Meyer

5
Language Specification
  • Programs
  • (dynamic) Software Machinery
  • (static) Naming Environments
  • What entities can be named?
  • How are the names organized into groups?
  • How are the names made known where ever they are
    needed?
  • Conventions are no substitute for enforced
    constraints.

6
Java Design Goals
  • A general-purpose concurrent
  • object-oriented language
  • for the Internet.

7
Top Ten Design Goals
8
Simplicity
  • Programmer Perspective
  • Automatic garbage collection.
  • Unconstrained array type.
  • Implementer Perspective
  • Only single class inheritance.
  • Restricted overloading.
  • E.g., Pascal Modula-2 Modula-3.

9
Portability
  • Hardware Independence
  • Java source Architecture Neutral Byte code
  • Operating System Independence
  • Java APIs for I/O, networking, GUI, concurrent
    programming, etc.

10
Portability
  • Architecture-neutral.
  • Size of integer, char, etc and meaning of
    floating point operations fixed by the language
    (not by an implementation).
  • All behavioral aspects of a Java program
    defined by the Java language spec.
  • Order of evaluation of operands fixed.
  • Error and Exception handling.

11
Object-Oriented Programming
  • Programming with abstract data types
  • Data Abstraction
  • Separation of Spec. and Impl.
  • Modularity
  • Logically related entities are textually close.
  • Encapsulation
  • Controlling visibility of names.
  • Code and Interface Reuse
  • Inheritance Dynamic binding

12
Java
  • Class-based language.
  • Has object types (based on classes).
  • Subclassing implies subtyping
  • but there is subtyping independent of
    subclassing.
  • Static typing

13
Reliability and Robustness
  • Strong Typing
  • every variable and every expression has a type
    known at compile-time.
  • type limits the values a variable can hold and
    the values an expression can produce at run-time.
  • Exceptions
  • signaling violation of semantic constraints.

14
Java Compiler and Interpreter
source code
javac
byte code
java
native code
mips
pentium
sparc
alpha
15
(No Transcript)
16
Interpretation and Security
  • Java programs are compiled into byte codes for a
    (hardware-independent) Java Virtual Machine, and
    is executed by an interpreter.
  • Just-In-Time compiler converts byte codes into
    native codes, for efficiency.
  • An interpreter for JVM verifies and then executes
    Java byte codes. This step incorporates Security
    Checks.

17
Evolution of Suns JDK
  • Java 1.0 Interpreter
  • Java 1.1 Interpreter JIT Compiler
  • Java 2 Hotspot
  • Profiling and Adaptive Dynamic Compilation of
    hot code
  • Method in-lining and other aggressive
    optimizations, and Decompilation
  • Improved Memory Management for long-running
    (server) programs
  • Fast Thread Synchronization

18
Concurrent Programming
  • Threads can share address space. In Java, threads
    are modeled after Hoares monitors.
  • Java is a multi-threaded system, which is very
    convenient for coding interactive or multi-media
    applications.
  • Doing I/O concurrently with reading a document.
    (downloading via browser)
  • Periodic updating of the screen with data
    acquired in real-time. (sports/stocks ticker)

19
Distributed Processing
  • HTML and WWW contributed immensely to the sharing
    of (distributed) static data.
  • CGI scripts enabled customization of responses
    based on user input (client-server).
  • A Java applet can further react to user input and
    change behavior dynamically. It can provide an
    alternative to client-server model in that it
    runs on the client machine.

20
(cont)
  • Java supports network programming.
  • Java supports mobile computing.
  • Compiled to compact, platform independent byte
    codes
  • Dynamic linking.
  • KVM
Write a Comment
User Comments (0)
About PowerShow.com