Latest News

New Summer Look :)










Programming with Java

  What is Programming?

What programs can I build with java?

Java's History

Java's Versions

Java's Genealogy

Some Context... A Brief Review of Software History

Java Versus C++

Using the JDK tools

First program : Hello World
 

 

Programming

 

A program is a sequence of instructions. A recipe, a musical score, and a knitting pattern are all programs
P Grogono, Programming in Pascal

The way to deal with an impossible task is to chop it down into a number of merely very difficult tasks, and break each one of them into a group of horribly hard tasks, and each one of them into tricky jobs, and each one of them...
(Terry Pratchet, Truckers)

 

Java: Basic Types of Programs

Applets:
- Execute on HTML Browsers
- Have severe security restrictions

GUI Applications:
- Are Interpreted and Executed
- Use AWT or JFC GUI widgets
- Must have a standard entry point (main)

Console Applications:
- Simple Standard Text Console
- Must have a standard entry point (main)

Servlets:
- Execute on the server as scripts
- need a servlet engine to run

Midlets:
- Programs that run on mobiles

Java's History

- C language was evolved as a portable operating system language

-Dennis Ritchie (at Bell labs) developed it from B (which came from BCPL)

- Originally ran on a DEC PDP-11 computer in 1972
- C++ is an object-oriented extension to C developed by Bjarne Stroustroup early 80's

- Sun had an internal corporate research project, Green, in 1991, to develop intelligent consumer devices

- Project lead to the language Oak (James Gosling) based on C/C++

- Oak about to be cancelled when WWW came along

- Sun saw renamed Oak to Java and saw potential for use on the web

- Java formally announced in May '95

- Since then, Java generated huge interest

Java's Versions

-1995, alpha definitions

-1996, Java 1.0 to 1.0.2

-1997, Java 1.1 (Now in 1.1.8)

-1998, Java 1.2.betas then Java 2

-1999, Java 1.2 and 1.3

-2002, Java 2 Platform ver 1.4

-2004, Java 2 SE 5.0 + Many additional APIs…


Java's Genealogy

Java Versus C++

 

Similarities

- Terminology

-Syntax ( Comments, Operators, Statements )

-Datatypes

Differences

- Memory Management

- Full OO vs Hybrid

- Programmer Protection

- Execution Speed

- Exception Handling

- Threading Model

Some Context... A Brief Review of Software History

Era Dates Sub-Periods Introduced
Goals aimed
Problems faced
Lessons learned
Mastering the Machine
1956 to 1968 Batch
Punch cards and magnetic tapes, Compilers
To exploit hardware in an optimal way
Extensive compile time, synchronising source and object code High level languages can perform well
Interactive
Non-volatile random-access storage, Software tools To reduce the clerical aspects of coding, to eliminate the need for modifying object code Code and fix approach and spaghetti code Maintain programs at the source code, rather than at the object code level
Mastering the process 1968 to 1982 Process Birth of independent Software Industry, Waterfall model of development To reduce development risks and to improve quality and productivity
Planning Development activities Quality assurance has to address the entire development process
Formal Formal, design and specification languages, Verifiers and checker tools To increase the trustworthiness of software and to improve productivity by achieving automation Communicating formal specifications with user base, Usability Analysts and designers have to communicate with non-professional users through common language
Mastering complexity 1983 to Now Structured
PCs, CRTs, Devices, GUIs,Case tools Maintain programs in the design level
Synchronising design with code, Scalability, complexity, maintenance, reusability
Processes and data do not automatically preserve their interrelationship
Object Oriented Internet, Software Patterns, UML, Frameworks To reuse at design and implementation level, modularisation, encapsulation, portability
Design and Implementation views have inherent differences
Increased demands on testing and software understanding, slow and iterative development process

[1] : Ref: Endres A., History of Software Engineering, Seminar 9635, Schloß Dagstuhl, Conference title: A Synopsis of Software Engineering History - the Industrial Perspective, August 26-30, 1996

Using the JDK Tooks

 

appletviewer

javac (Compiler)

java (Interpreter)

javadoc (Doc.gen.)

javap (Dissassembler)

jdb (Debugger)

run applets

javac HelloWorld.java .java->.class

java HelloWorld executes .class

java html

class-> info

debug .class

The First Java Program

import java.lang.*;

public class HelloWorld {

   public static void main(String argv[] ) {
      System.out.println("Hello World!!!");
   }
}

 


previous, contents, next




Online Java Training, Programming with Java


 
My other sites

Latest News

New Summer Look :)










Programming with Java

  What is Programming?

What programs can I build with java?

Java's History

Java's Versions

Java's Genealogy

Some Context... A Brief Review of Software History

Java Versus C++

Using the JDK tools

First program : Hello World
 

 

Programming

 

A program is a sequence of instructions. A recipe, a musical score, and a knitting pattern are all programs
P Grogono, Programming in Pascal

The way to deal with an impossible task is to chop it down into a number of merely very difficult tasks, and break each one of them into a group of horribly hard tasks, and each one of them into tricky jobs, and each one of them...
(Terry Pratchet, Truckers)

 

Java: Basic Types of Programs

Applets:
- Execute on HTML Browsers
- Have severe security restrictions

GUI Applications:
- Are Interpreted and Executed
- Use AWT or JFC GUI widgets
- Must have a standard entry point (main)

Console Applications:
- Simple Standard Text Console
- Must have a standard entry point (main)

Servlets:
- Execute on the server as scripts
- need a servlet engine to run

Midlets:
- Programs that run on mobiles

Java's History

- C language was evolved as a portable operating system language

-Dennis Ritchie (at Bell labs) developed it from B (which came from BCPL)

- Originally ran on a DEC PDP-11 computer in 1972
- C++ is an object-oriented extension to C developed by Bjarne Stroustroup early 80's

- Sun had an internal corporate research project, Green, in 1991, to develop intelligent consumer devices

- Project lead to the language Oak (James Gosling) based on C/C++

- Oak about to be cancelled when WWW came along

- Sun saw renamed Oak to Java and saw potential for use on the web

- Java formally announced in May '95

- Since then, Java generated huge interest

Java's Versions

-1995, alpha definitions

-1996, Java 1.0 to 1.0.2

-1997, Java 1.1 (Now in 1.1.8)

-1998, Java 1.2.betas then Java 2

-1999, Java 1.2 and 1.3

-2002, Java 2 Platform ver 1.4

-2004, Java 2 SE 5.0 + Many additional APIs…


Java's Genealogy

Java Versus C++

 

Similarities

- Terminology

-Syntax ( Comments, Operators, Statements )

-Datatypes

Differences

- Memory Management

- Full OO vs Hybrid

- Programmer Protection

- Execution Speed

- Exception Handling

- Threading Model

Some Context... A Brief Review of Software History

Era Dates Sub-Periods Introduced
Goals aimed
Problems faced
Lessons learned
Mastering the Machine
1956 to 1968 Batch
Punch cards and magnetic tapes, Compilers
To exploit hardware in an optimal way
Extensive compile time, synchronising source and object code High level languages can perform well
Interactive
Non-volatile random-access storage, Software tools To reduce the clerical aspects of coding, to eliminate the need for modifying object code Code and fix approach and spaghetti code Maintain programs at the source code, rather than at the object code level
Mastering the process 1968 to 1982 Process Birth of independent Software Industry, Waterfall model of development To reduce development risks and to improve quality and productivity
Planning Development activities Quality assurance has to address the entire development process
Formal Formal, design and specification languages, Verifiers and checker tools To increase the trustworthiness of software and to improve productivity by achieving automation Communicating formal specifications with user base, Usability Analysts and designers have to communicate with non-professional users through common language
Mastering complexity 1983 to Now Structured
PCs, CRTs, Devices, GUIs,Case tools Maintain programs in the design level
Synchronising design with code, Scalability, complexity, maintenance, reusability
Processes and data do not automatically preserve their interrelationship
Object Oriented Internet, Software Patterns, UML, Frameworks To reuse at design and implementation level, modularisation, encapsulation, portability
Design and Implementation views have inherent differences
Increased demands on testing and software understanding, slow and iterative development process

[1] : Ref: Endres A., History of Software Engineering, Seminar 9635, Schloß Dagstuhl, Conference title: A Synopsis of Software Engineering History - the Industrial Perspective, August 26-30, 1996

Using the JDK Tooks

 

appletviewer

javac (Compiler)

java (Interpreter)

javadoc (Doc.gen.)

javap (Dissassembler)

jdb (Debugger)

run applets

javac HelloWorld.java .java->.class

java HelloWorld executes .class

java html

class-> info

debug .class

The First Java Program

import java.lang.*;

public class HelloWorld {

   public static void main(String argv[] ) {
      System.out.println("Hello World!!!");
   }
}

 


previous, contents, next