MICRO PLANNING FOR 60 MIN
Stimulati
ng
question; General
Alpha Evocation
Summary 5 objective;
Recap2 ; 2
Breathing;
;2
;3
Mindmap 1
;5
Specific
Discussion Objective
;5 (1,2); 15
Formative
Assessme Formative
Specific
nt; 5 Assessme
Objective
nt; 5
(3); 10
Java Programming
Specific Objective
1. Identify the needs of object oriented programming. [T]
2. Exemplify the concepts of buzz words of java programming.
[T]
3. Compare procedural approach and object oriented
approach. [T]
CONTENTS
•Java’s Lineage
•The Birth of Modern Programming: C
•The Need for C++
•The Stage Is Set for Java
•Why Java Is Important to the Internet
•Java Applets and Applications
•Security
•Portability
•Java’s Magic: The Bytecode
•The Java Buzzwords
•Simple
•Object-Oriented
•Robust
•Multithreaded
•Architecture-Neutral
•Interpreted and High Performance
•Distributed
•Dynamic
Java’s family
o Java is related to C++, which is a direct descendent of C.
o From C, Java derives its syntax.
o Many of Java’s object-oriented features were influenced by C++.
The Birth of Modern Programming: C
o Invented and first implemented by Dennis Ritchie running the UNIX OS
o C was started with an older language called BCPL (Basic Combined Programming
Language), developed by Martin Richards.
o BCPL influenced a language called B, invented by Ken Thompson, which led to the
development of C in the 1970s.
o For many years, C was the one supplied with the UNIX operating system and
described in the C Programming Language by Brian Kernighan and Dennis Ritchie
(Prentice-Hall, 1978).
o C was formally standardized in December 1989, when the American National
Standards Institute (ANSI) standard for C was adopted.
Ken Thompson Martin Richards Dennis Ritchie
James Gosling
Need for C++
o The first widespread language was, of course, FORTRAN.
o The 1960s gave birth to structured programming.
o This is the method of programming championed by languages such as C.
o Once a project reaches a certain size, its complexity exceeds what a programmer can
manage.
o To solve this problem, a new way to program was invented, called object-oriented
programming (OOP).
o OOP is a programming methodology that helps organize complex programs through
the use of inheritance, encapsulation, and polymorphism.
oC++ allows this barrier to be broken, and helps the programmer comprehend and
manage larger programs.
oWithin a few years, the World Wide Web and the Internet reached critical mass.
Creation of Java
o Java was conceived by James Gosling, Patrick Naughton, Chris Warth,
Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. in 1991.
o It took 18 months to develop the first working version.
o This language was initially called “Oak” but was renamed “Java” in
1995.
o Java was not the Internet! Instead, the primary motivation was the
need for a platform-independent
Brief History of Java
o In 1990, Sun Microsystems began an internal project known as the Green Project
to work on a new technology.
o In 1992, the Green Project was roll off and its interest directed toward building
highly interactive devices for the cable TV industry. This failed to materialize.
o In 1994, a small web browser called HotJava was written. Oak was renamed to Java
after learning that Oak had already been trademarked.
o In 1995, Java was first publicly released.
o In 1996, Java Development Kit (JDK) 1.0 was released.
o In 2002, JDK 1.4 (codename Merlin) was released, the most widely used version.
o In 2004, JDK 5.0 (codename Tiger) was released, the latest version.
James Gosling
• James Gosling is generally credited as the inventor of the Java programming
language
• He was the first designer of Java and implemented its original compiler and
virtual machine
• He is currently the Chief Technical Officer of Sun Microsystems
What is Java?
• A multi-platform, network-centric, object-oriented programming language
• Multi-platform
• It can run on almost any computer platform
• Network-centric
• Designed with network in mind – “the network is the computer”
• Designed for building applications for the Internet
• Object-oriented
• It incorporates object-oriented programming model
Java Platform Editions
• A Java Platform is the set of APIs, class libraries, and other programs used in
developing Java programs for specific applications
There are 3 Java Platform Editions
1. Java 2 Platform, Standard Edition (J2SE)
• Core Java Platform targeting applications running on workstations
2. Java 2 Platform, Enterprise Edition (J2EE)
• Component-based approach to developing distributed, multi-tier enterprise
applications
3. Java 2 Platform, Micro Edition (J2ME)
• Targeted at small, stand-alone or connectable consumer and embedded devices
Why Java Is Important to the Internet
• In a network, two very broad categories of objects are transmitted between
the server and your personal computer: passive information and dynamic,
active programs.
• When you read your e-mail, you are viewing passive data.
• Even when you download a program, the program’s code is still only passive
data until you execute it.
• However, a second type of object can be transmitted to your computer: a
dynamic, self-executing program.
• Such a program is an active agent on the client computer, yet is initiated by
the server.
Java Applets and Applications
• Java can be used to create two types of programs: applications and applets.
• An application is a program that runs on your computer, under the
operating system of that computer.
• An applet is an application designed to be transmitted over the Internet and
executed by a Java-compatible Web browser.
• An applet is actually a tiny Java program, dynamically downloaded across
the network, just like an image, sound file, or video clip.
• The important difference is that an applet is an intelligent program, not just
an animation or media file.
The Bytecode
• Bytecode is a highly optimized set of instructions designed to be executed by
the Java run-time system, which is called the Java Virtual Machine (JVM).
• That is, in its standard form, the JVM is an interpreter for bytecode.
• Translating a Java program into byte code helps makes it much easier to run
a program in a wide variety of environments.
The Java Buzzwords
Simple
• Java designers removed a number of available features in c and c++.
• These features are mostly ones that led to poor programming practices or
were rarely used
• The most complex and confusing parts of c and c++ are Pointers, Memory
Management and Virtual Base classes these are excluded from java .
• Java does not use header files and it eliminates the c preprocessor
• In java no need of Structures, unions
• Java eliminates multiple inheritance features of c++
• Java automatically handles the referencing and de referencing of objects.
• Java has garbage collector , which helps to write efficient programming.
Object-Oriented
• Java organizes a program as a set of components called objects
• It has 3 features of OOPs.
- Encapsulation - Inheritance - Polymorphism
Distributed
• Java provides high-level support for Networking
• Java applications can open and access objects across the net via URLs
• Java RMI API allows to invoke methods of remote java objects
• Java provides traditional low level networking support, including data grams
and stream-based connection through sockets.
Secure
• Java provides many digital signatures, encrypted algorithms like
- DSA(Digital Signature Algorithm) - RSA
Architecture-Neutral
• Java Compiler generates architecture neutral file format, so the compiled code is
executable on many platforms.
Portable
• In Java binary data is stored in Fixed format .
• Strings are stored in Standard Unicode format
Dynamic
• Java programs carry with them substantial amounts of run-time type information
that is used to verify and resolve accesses to objects at run time.
Multi Threaded
• Java is multi threaded language, it provides support for multiple threads of
execution that can handle different tasks
Robust
• The multiplatform environment of the Web places extraordinary demands on a
program, because the program must execute reliably in a variety of systems.
Interpreted and High Performance
• This code can be interpreted on any system that provides a Java Virtual Machine.
Mind Map