Part II Software

computerharpyΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 8 μήνες)

71 εμφανίσεις

1

Part II Software



When developing software there are several particularities to be aware of:


Java is widespread used because of the platform independence of the compiled code.


Pervasive devices usually process executables and data directly from the location in
RAM or ROM where they are stored persistently (“
Execute in place
”).


Since processing power and memory is limited, applications must be programmed
efficiently.


Often operating system and applications are not upgradable within the device’s
lifetime.


Applications on pervasive devices are usually not rebooted, and can therefore run
nearly forever. It requires a very stable operating system and applications with very
careful memory management to meet these requirements.


On top of these operating systems, middleware components provide an
abstraction of operating system specific dependencies.

2


Software Layers on a Device

Hardware

Operating System

User

Interface


GUI

TTS

Speech

Recognition

Basic

Components


Database

Access

Security

Communication

Components

Messaging

Protocol

Support

Service

Discovery

Industry

Specific

Components

TV API

Phone API

Smart Card Access

Device Platform

Application

3

6. Java



The Java programming language is intended for the development of platform independent
software.


“Write once, run anywhere”. How Java works

4

6.1 Language Characteristics



An important achievement of Java is that the language is kept very simple and the code is
well readable.


Java has been designed as a secure language.


The byte
-
code is verified by the virtual machine ensuring that no illegal code is included.


The code could be signed, which means that cryptographic algorithms are applied to ensure that
the code originates from someone the user trusts.


The Java program runs in a memory area of the system which is controlled by the virtual
machine (“
sandbox
”). The program is allowed to perform any operation within the sandbox, but
has only limited access to any system resource outside. For example unauthorized code cannot
read or write any data on the system.


Java programs can be distinguished as follows:


Applications

are stand
-
alone programs.


Applets

are mini
-
program running within a browser.


Servlets

are also related to web sites. While applets run on the client side, servlets are executed
by the Web server.

5


JavaBeans
are Java components which developers can integrate into their applications, applets
or servelets.


6.2 Java Class Libraries



Java Core Packages

Package

Contents

java.applet

Classes for creating applets running within web browsers.

java.awt

Classes for creating graphical user interfaces.

java.beans

Classes for JavaBeans development.

java.io

Classes for system input and output, accessing a file system, and using persistent object
(serialization).

java.lang

Fundamental Java classes and classes for obtaining reflective information about classes and
objects.

java.math

Classes used within mathematical algorithms.

6

java.net

High level support for networking.

java.rmi

Classes supporting Remote Method Invocation (RMI).

java.security

Classes for the Java security framework, including certificate management, RSA, and DSA
interface.

java.text

Classes for handling text, dates, and numbers (e.g. String)

java.util

Manifold miscellaneous classes, such as collections framework, event model,
internationalization, string tokenizing, data compression, and many more.


Optional Java Packages

package

Contents

javax.naming

Classes for accessing naming and directory services.

javax.sound

Classes for the processing of audio data.

javax.swing

Classes for a more powerful and platform independent user interface than java.awt.

org.omg.CORBA

Provides the Corba API, including an Object Request Broker and IDL support.

7

6.3 Java Editions



Standard Edition

(J2SE)


Java 2 Software Development Kit (SDK) is a product from Sun, which implement that
specification.


Java 2 Enterprise Edition

(J2EE)


offers additional features on top of the Standard Edition, such as servlets, JavaServer Pages,
JDBC, Java Message Service, Java Naming, and Directory Interface, Java Transaction, Java
Mail, XML, CORBA, and Enterprise Java Beans.


Micro Edition


The
Java 2 Micro Edition

(J2ME) has been introduced to meet the limitations and peculiarities
of Pervasive Computing devices.


J2ME introduces profiles, which specify language subsets for different group of devices.


Java Card


The Java Card is the smallest and most limited version of the Java family.


Third party Java


Independent from Sun, several companies offer manifold Java APIs, for example JavaBeans
libraries.

8


The Flavors of Java within the Java 2 Family

9

6.4 Micro Edition



Choosing subsets of the Java language particular for a specific device class is the basic
concept of J2ME. Each subset is called a profile.


Mobile Information Device Profile

(MIDP) defines the Java functionality and APIs,
which fit the screen size and memory constraints of PDAs.


Each profile is based on one of two
Configurations
:


Connected Device Configuration

(CDC) is intended for devices which have at least 512
kilobytes of memory available to run Java and have a high bandwidth network connection.


Connected Limited Device Configuration

(CLDC) is intended for devices with only 128
kilobytes of memory for running Java and with limitations in the user interface, network
bandwidth, and power supply.


6.5 PersonalJava and EmbeddedJava



The PersonalJava Application Environment focuses on smart phones, set
-
top boxes,
game consoles, PDAs, and other resource constrained network
-
connectable consumer
devices.

10


PersonalJava is scalable, modular, and configurable.


It is also possible to compile the Java byte code of a PersonalJava application into
executable code, which can be placed directly into the ROM of a device.


The EmbeddedJava Application Environment targets very small devices with very strict
memory limitations, such as industrial controllers, pagers, telecommunication switches,
or low
-
end phones.


6.6 Development Tools for Java



Visual Café from Symantec, Jbuilder from Borland, Microsoft’s Visual Studio J++, and
IBM’s Visual Age.


Visual Age for Java supports the visual programming method: Software components like
JavaBeans can be assembled in a visual composition editor almost intuitively to complex
applications.