1. Introduction


Agenda - Day One

  • 9:00-11:00am -- IBM Presentation
  • 11:00-11:15am -- VisualAge for Java Demo
  • 11:15am-noon -- Course Introduction
  • noon-1:00pm -- Lunch
  • 1:00-3:00pm -- LAB -- Introduction to VisualAge
  • 3:00-4:00pm -- AWT Review & Interface Design
  • 4:00-5:00pm -- LAB -- AWT Review

Java Can Help!

  • Java is Portable, Secure and Robust!
  • Applications can be easily distributed!
  • Online demos on WWW!

Portability

  • You need only one version of your software to serve a broad market.
  • The Internet, in effect, becomes one giant, dynamic library.
  • You are no longer limited by your particular computer platform.
  • Three features make Java programs portable:
    • Java language.
    • Java libraries.
    • Java byte code.

Portability: Java Language

  • One language specification
  • No "implementation-defined" behavior as in C++
  • Same source will compile anywhere

Portability: Java Library

  • Java Development Kit (JDK)
    • Same API on all JDK-supporting platforms
    • Native details hidden
    • GUI abstracted

Portability: Java Byte Code

  • Like "machine language" for imaginary machine
  • Interpreter written for each platform
  • Same bytecode runs everywhere
  • Native compilers
    • "Just-in-time"
    • True native code for performance

Security

  • Interpreter level
    • No pointer arithmetic.
    • Garbage collection.
    • Array bounds checking.
    • No illegal data conversions.
  • Browser level (applies to applets only)
    • No local file I/O.
    • Sockets back to host only.
    • No calls to native methods.

Security (continued)

  • Caution! Bytecode can be de-compiled
  • Solution?
    • Obfuscation
      • Several free/shareware tools
    • Native Compilation
      • VisualAge will support!

Robustness

  • Security leads to robustness
    • No pointer arithmetic.
    • Garbage collection; no bad addresses.
    • Array and string bounds checking.
    • No jumping to bad method addresses.
  • Interfaces and exceptions.

Distributed Applications

  • Easy to have parts of an application of different servers
  • Easy to deliver applications to users
  • Easy to change which parts are running
  • Easy to connect to other languages on other systems with sockets

Online Demos on WWW

  • Applications can be run in web pages!
  • Potential buyers/downloaders can get a better feel than pictures
  • Can "pare-down" interface to a mockup on web page.
    • Think about this when designing interface
    • Separate GUI/Kernel
    • Plan to write dummy kernel for use as demo applet

Porting Strategies

  • Complete Rewrite to 100% Java
  • Native-code Interface (JNI)
  • Client/Server strategy using sockets
  • Third-party portability

Complete Rewrite to 100% Java

  • This is the focus of this course
  • Good time for redesign if necessary
    • User Interface
    • Kernel
  • Try to keep good separation of GUI/Kernel

Native-Code Interface

  • Java code can communicate with native code (C/C++...)
  • Allows for gradual porting
    • Fairly easy if curren app has good GUI/kernel separation
    • Port GUI first
    • Gradually port kernel
      • Not always necessary
  • Can be used for better performance until Java-to-native compilers more readily available

Client/Server using Sockets

  • Communicate between Java and another language on another platform
  • Common solution to current inter-language/platform communication
  • Requires good GUI/kernel separation

Third-Party Portability

  • Several tools available
  • Not as widespread as JDK
  • Different API than JDK

Copyright © 1996-1997 MageLang Institute. All Rights Reserved.