Java – in context - ITS: Publishing Academic Web Pages

indexadjustmentInternet and Web Development

Nov 13, 2013 (3 years and 9 months ago)

57 views

Java


in context

Main Features

From Sun Microsystems ‘White
Paper’

Features:


simple


object oriented


network
-
savvy


interpreted


robust


secure


architecture neutral


portable


high
-
performance


multithreaded


dynamic

The language itself


Java does not allow pointers


Java is strongly typed


Java completely object
-
oriented


Java prevents programmer from accessing a
non
-
initialized variable

The Verifier


When Java byte code arrives for execution
the Verifier checks it to ensure that it is safe


No dangerous pointers


Access to private variables and methods
valid


Methods invoked with correct type
parameters


No illegal data conversions are done

The class loader


The class loader carefully distinguishes
between different packages and particularly
between local built and classes and any
others (it’s not nice to try to fool Java)

The Java Virtual Machine (JVM)


Once code is checked, byte code is not
directly executed on the machine but is
interpreted

Arrays


Subscripts must be within bounds

Garbage Collection


When an object in a Java program is no
longer needed, the system automatically
releases the memory that was allocated to it.


That memory can then be reused if needed

The filing system


Java applet can control that applet’s access
to files by specifying an option to the
browser.


The user can decide (for example) to read
but not write to a local file (default applets
can not read/write to users files unless given
permission)

Summary


Java provides several mechanisms for
protection


The language and the compiler


e.g.
absence of pointers


Verification of byte code


The class loader


The filing system and network access

Thin clients


PCs connected to others rather than all stand alone


PC does not need its own hard disk and filing
system software.


Organizations have hundreds of PCs (cost a
factor) to upgrade hardware and software. Time
spent to install software, file back ups etc.


Thin client eliminates all these costs.


Java strongly supports networking


and Java
compilers can be downloaded

Microsoft vs. the world


Text gives a very concise history of
Windows O.S. and the Intel Corp.


The U.S. government lawsuit now seems to
have been settled. (individual states have
not yet signed off)


C# Microsoft OO language based on C++

Versions of Java


1. Standard


2. Enterprise


3. Micro


(Personal Java for PDAs etc.)

Java capabilities


Enhancements to Java through the addition
of new libraries


Java Libraries: (small language powered by)


Java Language and Utilities


Java Electronic Commerce Framework


Java Security


Java Media Framework


Java Collections Framework


Java 3D

Internationalization


Different languages have different character sets


Dates and times (UK day/month/yr


US
month/day/yr)


Currency Different currency symbols


Java classes which help


Unicode character
standard


1. Classes ‘locale’ an area with its own language
classes do the appropriate formatting of currency,
date and time


2. Unicode 16
-
bit (used for file I/O)

Databases


JDBC



Databases are big business


Aside from word processing, spreadsheets
and email the database can be regarded as
the most vital software component of a
business


Java Database Connectivity (JDBC)


JDBC allows access to SQL
-
compatible
databases

RMI


Remote Method
Invocation


With the tremendous increase in Internet use. The
idea of interacting with programs on other
machines is mainstream. In the corporate
computing area as well, networks are the norm.


A possible arrangement for the drawing example
in the text each PC (or server) would have a local
program to handle drawings and one on the server
to broadcast new input. (known as RMI user
invokes methods on the server)

Java Beans


‘a reusable software component that can be
manipulated visually in a builder tool’


The software into which a bean is to be
placed is written in such a way as to allow
the bean to be incorporated.


To incorporate the bean into an application,
a special bean development environment


(BDK Beans Development Kit) from Sun

Java servlets



Web interaction is enabled by programs on a
server computer interacting with software
(browser typical) on a client computer.


Benefits:


Each use of the Web page results in data being
sent to server, the servlet produces a thread


Servlet run in sandbox (safe and secure)


Platform independent (if allowed)

Javascript


Scripting language


No language features common with Java


Concepts similar to Java

Conclusion


trends in computer
industry


Tremendous growth of Internet


Importance of Web interaction


Use of intranets (within a corporation


example)


Reduction in cost of networking


Fusion of computer and telecommunications


Incorporation (embedding) of computers within
consumer products


Multimedia

Conclusions
-

continued


Vital need for secure computing across the
networks


Fight against Microsoft dominance
(Windows O.S.) and Intel (PCs).