Language Basics
Application
A Java class with a main method, a standard requirement for a runnable Java application. An application module represents a task within a single transaction.
Using only tier-independent interfaces and classes will keep your application independent of deployment configuration.
Business Components
- Entity (tables, views, data sources) objects are developed from the bottom up.
- View objects are developed from the top down. View objects can get their attributes from more than one entity (table or other view) object. View links describe master-detail relationships.
- Application modules are task-specifc, containing only those views required by the task at hand.
Constructor (method)
A guaranteed initialization method, called upon object creation (e.g. new objectName() ). A Constructor name always equals the class name. Storage is allocated upon object creation. Constructor arguments (parameters) specify how to create (initialize i.e. define) the object. Constructors return nothing.
newClassType newClassName = new super/base-class-Type
Container
a new Java object (analogous to a collection). An iterator is a subset of container elements … for processing.
Garbage Collector
releases memory, when an object is no longer in use; this capability depends upon all objects being inherited from a single root class, Object, and initialized via the new keyword. Java has no C++-like destructor. Because Java can make C/C++ calls via native methods, which can allocate memory without using the new keyword, a finalize() method (rarely used) is available for such memory cleanup.
Hierachy
The Java files hierarchy is:
- Workspace
- Project
- Package
- Application
Import (keyword)
A mechanism for keeping name spaces unique.
JSP – Java Server Pages
It is very important that all your JSP pages refer to the same application module Id. The application module, that your JSP page accesses, determines the session information and passivation behavior (the state of the saved application module instance).
Method
Java methods are functions.
Package
A class library unit (name space), made available for use in a Java program via the import keyword. By convention and to keep package names unique on the Internet, a package name is preceded by a reversed domain name e.g.
com.myDomain.packageName
Project
An application may consist of multiple projects. Projects may be made analogous to tiers in the architecture.
Setting Project | Properties allows defining J2SE/J2EE version, libraries and paths.
Serialization
Serialization involves saving the current state of an object to a stream and restoring an equivalent object from that stream. The stream functions as an object container. Contents include a partial representation of the object's internal structure, including variable types, names and values. The container may be transient (RAM-based) or persistent (disk-based).
Scope access specifiers
Only one public class is allowed per compilation unit. All classes in a Package have access to a friendly class; but that friendly class is still private to other Packages.
System Navigator
Oracle’s JDeveloper System Navigator is the source files interaction tool.
Workspace
Contains multiple projects
Object Orientation
Encapsulation
Inheritance
Polymorphism (many names)
Implemented by varying (overloading) the function/method call parameters. Thus, the same function/method name can be used to perform varying functions.
J2SE (Java 2 Standard Edition)
J2EE (Java 2 Enterprise Edition)
WAR files for web modules
Deploying J2EE web modules, that include Java Servlets and JavaServer Pages (JSP), requires packaging the application and associated files into a WebARchive (WAR) file. A WAR file is in the same format as a JavaARchive (JAR) file. You also need to create an eXtensisible Markup Language (XML) deployment descriptor (WEB-INF/web.xml) file.
Acronyms
Acronym |
Definition |
Explanation |
.jpr |
Java Project |
lists project contents & settings |
.jws |
Java WorkSpace |
|
Struts |
|
a Model-View-Controller implementation that uses servlets and JavaServer Pages (JSP). |
UDDI |
Universal Description Discovery and Integration |
a registry |
WAR |
Web Archive |
file |
WSDL |
Web Service Definition Language |
defines available services |