Wednesday 8 January 2014

JAVA : Programming Language

How Java Got Evolved?
1. Fundamental reasons for computer language development:
  • To adapt to changing environments & uses
  • To implement refinements& improvements in art of programming
2. Era before Java
  • Programming through toggling of switches on front panel
  • Assembly Language
  • FORTRAN
  • C (Structured Programming)
  • C++ (Object-Orientation for complexity management)
3. Java is no exception
  • Java = C++ - {Problem Areas}
  • Also, Java = C (Syntax) + C++ (Object-Orientation)

Scenarios that led to creation of Java

  • Variety of CPU were existing in late 80’s & embedded systems were gaining popularity
  • Developing compiler for each of them was expensive & time-consuming
  • So, a platform independent solution was needed
  • Internet also started spreading at that time
-Portability: Low-Priority Problem --> High Profile Necessity
  • In 1991, James Gosling at Sun Microsystems conceived Oak as an architecturally neutral solution for portability
  • Later, Oak was renamed to Java in 1995

Why Java is important to Internet?

  • Internet = Static Information + Dynamic Part
  • Dynamic part requires (unknown) programs from elsewhere to run on your computer
- Issues of Portability & Security
  • As a solution, Java provided Applets which are portable and secure
  • Applets are tiny Java programs which are:
- Transmitted over Internet
- Executed by Java-compatible Web Browser
- Can react to user-inputs and change dynamically

Protability & Security: Who is behind the scene?

  • Java’s Magic: Bytecode
- Bytecode is highly optimized set of instructions designed to be executed by Java 
run-time system, which is called Java Virtual Machine (JVM)

  • JVM is essentially an interpreter
  • Portability: Just provide JVM for desired platform
  • Security: JVM controls bytecode execution and prevents Applets from accessing different parts of computers and applications to generate side-effects

Features of Java

  • Portable
  • Secure
  • Simple
- Easy to learn & use effectively
- Small number of clear ways of doing a task

  • Object-Oriented
- Purely O-O
  • Robustness
- Reliable execution of code on multiple platforms
- Through: strictly-typed, auto de-allocation, exception-handling

  • Multithreaded
- Provides constructs for multithreading and auto multiprocess synchronization
  • Architecture-Neutral
- Write-one; run anywhere, anytime; forever
  • Interpreted and High Performance
- Through bytecode which is an engineered solution for interpretation
  • Distributed
- Supports TCP/IP as designed for Internet
- RMI: Unparallel level of abstraction to client-server programming

  • Dynamic
- Uses run-time type information to verify and resolve access to objects at run-time
-->Allows dynamic linking of code in safe & expedient environment manner Robustness


Myths About Java

  • Java is Internet version of C++
  • Java will replace C++
  • Java programming is simple
  • Java increases productivity
  • All software should be coded in Java

Continuing Revolution

  • Java Standard Editions (J2SE)
- 1.7 (early development)
- 1.6 (stable, current)
- 1.5 (stable)
- 1.4 (stable)
- 1.3 (obsolete)
- 1.2 (no longer actively supported)

  • Java Enterprise Editions:
- J2EE 1.4
- Java EE 5

  • Java for Micro Devices
- J2ME

References
Books:

  • Java 2 Complete Reference, 5th Ed., by Herbert Schildt
  • J2EE Unleashed by Paul Allen, SAMS Publisher
  • CodeNotes for J2EE by Gregory Brill

Websites:

www.javapassion.com
www.java.sun.com

No comments:

Post a Comment