Appendix C. Glossary of Terms

   

with ruder terms, such as my wit affords, and over-joy of heart doth minister.

”William Shakespeare, Henry VI , pt. 2, 1.1

Define, define, well- educated infant .

”William Shakespeare, Love's Labour's Lost , 1.2

This section describes key terms associated with the Java programming language, object-oriented development, and programming in general. It is intended as reference material for use as you are getting started. Where appropriate, I have made distinctions with respect to ColdFusion terminology.

Numeric
100% Pure Java

A guide developed by Sun Microsystems to ensure that applications written in Java conform to a strict specification. The guide covers not only the writing of programs, but also their marketing. No application can use this trademark unless it meets all of the requirements as prescribed by Sun.



A
Abstract

A keyword used in the Java programming language to specify a class that cannot be instantiated itself, or a method without implementation.



Abstract class

A class that cannot itself be instantiated. Subclasses may inherit from an abstract class; that is, extend it.



Abstract method

An abstract method has no implementation. The presence of an abstract method renders the class abstract.



Abstract Window Toolkit

(AWT) Package of graphical user interface classes implemented in native platform component versions. AWT classes allow for the creation of buttons , frames , event handlers, and text in application interfaces. AWT's popularity has ebbed recently in favor of the newer Swing.



API

Application programming interface. The speci-fication that dictates how a programmer must write to access the state and behavior of objects and classes.



Applet

A ( generally small) program written in Java and capable of executing in a Web browser or other devices that support the applet model. Applets aided in Java's early popularity as a language, because they allow programs to be dynamically downloaded and securely executed. Applets are simply Java classes that extend java.applet . Applets can be viewed from the command line with appletviewer, part of the standard JDK. Alternatively, applets can be viewed in a Web page by referencing the applet with either the <object> or <applet> tags, both part of standard HTML.



Argument

An argument is an item of data passed to a method. An argument may be an expression, a variable, or a literal. Many functions in ColdFusion are passed arguments.



Array

An ordered set of data items, all of which must be of the same type. Each item in the array can be referenced by its integer position. Java arrays start at 0, not 1 as in ColdFusion.



ASCII

American Standard Code for Information Interchange. An ASCII code is the 7-bit numerical representation of a character, which many different computing platforms can understand.



B
Bean

A reusable Java software component. Beans are standard Java classes that conform to certain design and naming conventions.



Binary operator

An operator with two arguments.



Bit

Contracted form of "binary digit," the smallest unit of information in a computer. A bit is capable of holding one of two possible values: on or off, commonly represented as true or false, or 0 or 1.



Bitwise operator

An operator that manipulates individual bits within a byte, generally by comparison or by shifting the bits to the left or right.



Block

Any Java code between curly braces; for instance: { int i = 0; }



Boolean

Named for English mathematician George Boole, refers to an expression or variable that may have only a true or false value. boolean is a primitive Java type.



Bounding box

The smallest rectangle enclosing a geometric shape; used in GUI programming.



break

A keyword in Java, break is used to resume program execution at the statement immediately following the current statement. In this regard, it functions like the break keyword in <cfscript> . If a label is in use, break returns to the label.



Byte

Eight bits. Byte is also a type in the Java programming language. A byte is treated by Java as a signed integer.



Bytecode

Generated by the Java compiler and executed by the Java interpreter, bytecode is machine-independent . Byte code can then be converted to native machine instructions on the fly by a JIT (Just-In-Time) compiler. .class files consist of bytecodes, serving as input to the Java Virtual Machine.



C
case

A keyword in the Java programming language, used within a "switch" block to define a set of statements to be executed in the event that the specified case value matches the switch value.



Cast

To explicitly convert one data type to another; for example, { double d = 2.3; d= (int) d; }



catch

A keyword in the Java programming language used to declare a block of statements to be executed in the event that an exception occurs in a preceeding "try" block.



char

A keyword used to declare a variable of type char , used to represent Unicode characters . char s are considered 16-bit integer primitives. Java allows simple conversion between char and other primitive integers.



Class

In object-oriented programming, defines how a particular type of object can be implemented. A class defines instance and class variables and methods , specifies the interface the class implements, and defines the immediate superclass of the class (which it extends). In Java, all behavior within a program is defined by classes, and all classes inherit from the class Object . The java.lang.Class class reveals the runtime type of any object.



Class file

A .class file is created when Java source code is compiled. The name of the file will match the name of the class. For instance, the file Shirt.java , which defines the Shirt class, will produce a bytecode file named Shirt.class .



Class method

A method invoked without reference to any specific object. This method affects the class, but not a particular instance of a class (an object). Class methods are specified using the keyword static . The java.lang.Math class, for instance, defines only static (class) methods.



Class path

An environmental variable that holds the location of class libraries used by the Java Virtual Machine.



Class variable

A variable defined at the class level, not any specific instance of a class (an object). Class variables are specified within the class definition using the keyword static .



Codebase

Used within the code attribute of the <applet> tag to specify the location (URL of the directory) of the main applet class file.



Comment

Explanatory text ignored by the compiler. Java comments are the same as standard SQL and CFScript comments that ColdFusion developers should be familiar with: // specifies a single-line comment, /* marks the beginning of a multiline comment, and */ marks the end.



Compiler

A program that translates source code in a .java file into the bytecode of a .class file. The compiler is part of the JDK; it is executed at the command line with the command javac .



Constructor

A special method used only for the creation of objects. Constructors have the same name as their class, and they are invoked using the new keyword. A Java class may have zero or more constructor methods. If no constructor is specified, the superclass constructor is invoked. If more than one constructor is specified, each must have a unique argument list.



Container

An item that provides lifecycle management, security, deployment, and runtime services to components . Additionally, every different container type provides its own services. Container types are applet, application client, EJB, JSP, servlet, and Web.



Context attribute

An object bound with a servlet's context.



continue

A Java keyword used within loops that causes execution to resume at the end of the current loop. In this regard, it functions like the continue keyword in <cfscript> . If a label is used, execution resumes at the label.



Core class

A public class that is a standard member of the Java platform. A core class is therefore available on any operating system in which the Java platform runs.



D
Declaration

A statement that establishes an identifier and associates attributes with it. It may or may not reserve memory space (for data declarations) or provide the implementation (for method declarations).



default

A Java keyword used after all case conditions within a switch block to indicate the set of statements to execute in the default case (that is, if the switch value does not match any of the explicit case values).



Deployment descriptor

An XML file describing how an application should be deployed. It includes specific instructions for the deployment tool regarding container options and required configuration. web.xml , used within Web applications for JSPs and servlets, is one such file.



Distributed application

An application composed of two or more distinct components, running in separate runtimes , often on different platforms.



do

A keyword used to declare a loop that iterates a set of statements. It functions similarly to a "do" loop in ColdFusion script.



DOM

Document Object Model; a W3C specification for representing a document as a tree of objects with interfaces for traversing the tree. It must be repre-sentable as XML.



double , double precision

double is a Java keyword used to define a variable of type double . A double precision variable is an IEEE standard 64-bit floating-point primitive capable of representing numbers in the range 1.8 x 10 308 to 4.9 x 10 -324 approximately.



DTD

Document Type Definition. A .dtd file de-scribes the structure and properties of one or more XML documents.



E
else

A Java keyword used to specify a block of statements to be executed in the event that the condition of a previous if or else if statement evaluates to false .



Encapsulation

Forming the data and behavior within an object so that the implementation and structure are hidden. In this way, encapsulation allows objects to be interacted with as black boxes that provide services within an application. Code encapsulation increases portability and ease of use of code.



Error class

Java.lang.Error is a subclass of Throwable . It is the parent of all Java error classes. An error is a state from which a program cannot recover.



Exception

An exception is a programmatic state that prevents the program from executing normally. An exception can often be "handled" ”that is, anticipated and caught by the program.



Exception handler

A block of code that consists of statements that react to an exception of a certain type. Java uses throwable , try , and catch in a manner syntactically similar to how ColdFusion implements these keywords. Exception handling in Java, however, also incorporates the finally keyword.



Extends

One class extends another by adding functionality in the form of additional fields or methods or by overriding its methods. The extending class is referred to as a subclass of the extended class.



F
Field

A data member of a class; that is, a variable defining a certain characteristic of a class.



final

A keyword in Java, final indicates an entity that cannot be changed or derived from after having been established. A final class cannot be subclassed. A final method cannot be overridden. A final variable can have no value other than that with which it was initialized .



finally

A Java keyword that executes a statement block regardless of whether or not an exception was encountered in a previously defined try block.



float , Float class

A Java keyword defining a 32-bit floating-point primitive type number variable. The Float class defines a number of important constants such as NaN (Not a Number), MAX_VALUE , and POSITIVE_INFINITY .



for

A Java keyword used to declare a loop type that iterates statements until a specified condition is met. It takes the form ( statement;exit condition; increment ) and is syntactically similar to a for loop inside a <cfscript> block.



G
Garbage collection

The process by which the JVM frees memory resources that are no longer being referenced by the program. Programmers therefore never have to explicitly free objects, as other languages without this feature require.



GUI

Graphical user interface. In Java, these com-ponents are created using AWT and Swing.



H
Hexadecimal

Base 16 numbering system in which 0-9 and A-F represent the numbers 0 through 15. Java hexadecimals are prefixed with 0x.



I
Identifier

An item within a Java program.



implements

A Java keyword used to specify one or more interfaces implemented by the class. It is used in the class declaration; multiple interfaces are separated by commas.



import

A Java keyword used to set package or individual class names to be referenced without these prefixes in a source code file. Only java.lang is imported automatically.



Inheritance

The concept in object-oriented pro-gramming that a class automatically contains the variables and methods defined in the parent class. The parent class is also referred to as the superclass, in which case the class inheriting from it is refered to as the subclass.



Initialization parameter

A variable that intializes a servlet's context.



Instance

An object of a given class; that is, a particular instance of the class. An object is created using the new keyword.



Instance method

A function that operates on the currect object. Instance methods are distinct from static methods, which operate at the class level.



Instance variable

A data item associated with a particular class. Each time an object of the class is created, a new copy of an instance variable is created. Instance variables therefore stand in contrast to class level (static) variables.



instanceof

A Java operator that tests whether a reference is of a particular type. It returns true if the reference passed can legally be cast to the reference type passed.



int

A Java keyword that defines a 32-bit primitive integer type in the range of -214783648 to 2147483647. int s in Java are always treated as signed.



interface

A Java keyword used to define a collection of method definitions and constants. Once defined, an interface can be implemented by other classes with the implements keyword.



Interpreter

Reads, decodes, and executes bytecode for the Java Virtual Machine.

See also [Java Virtual Machine]


J
J2 platform

A Java platform edition consists of a standard set of functionality across different markets, or optimized for different devices. Each edition of a platform is comprised of core (essential) packages and optional packages.



J2EE

Java 2 Enterprise Edition. It provides functionality targeted at enterprises for use in multi- tier , multi-server environments.



J2ME

Java 2 Micro Edition; for use with small devices, Smart Cards, set-top boxes, handhelds, and others.



J2SE

Java 2 Standard Edition; for general-purpose application development.



JAR files

Java Archive File is a file format used to aggregate a number of files into one. It uses the same compression algorithm as .zip files, and it can subsequently be opened with .zip utilities.



Java RMI

For distributed environments; allows the methods of remote objects in a Java program to be executed from virtual machines residing on a different host.



Java Virtual Machine ( JVM )

As part of the Java Runtime Environment, the JVM is the software engine that interprets Java bytecode and executes it. Different specifications for JVMs include one for Smart Cards with only 512 bytes of RAM.



JAX

A set of Java-based APIs for handling XML data. It supports XML parsing, RPC, UDDI repositories, and more.



JDBC

Java database connectivity. It provides database-independent connectivity between Java and data-bases. The java.sql package of interfaces must be imported to use JDBC.



JDK

Java Development Kit. It is the software development environment for creating Java applications and includes a utilities package, docu-mentation, and a class library.



JFC

Java Foundation Classes. This is a graphical user interface extension that adds to AWT for advanced functionality. It includes Accessibility, Application, Java 2D, Drag & Drop, and Swing.



JIT compiler

Just-in-Time compiler. This replaces the Java bytecode interpreter and converts bytecode into native machine code on the fly as the program is run. The result is faster execution time.



JMS

Java Message Service provides APIs for enterprise messaging systems.



JNDI

Java Naming and Directory Interface; a set of APIs to interface with naming and directory services. < cfldap > would serve a similar, though more limited, purpose in ColdFusion.



JNI

Java Native Interface; standard for interaction between Java and native code.



JRE

Java Runtime Environment; the Java Virtual Machine, Java core classes, and other files. As a subset of the JDK, it enables the execution of Java programs. It is specified for end users and developers and does not include the compiler or its classes.



JSP

JavaServer Pages; technology to return dynamic content (typically HTML or XML) to a client (typically a Web browser). It is an alternative to ColdFusion that often takes longer to write, but it can also be more powerful because Java code can be written directly in a JSP. See the JSP tag reference in this book for definitions of JSP-specific terms.



JVM
See [Java Virtual Machine]
K
Keyword

Words reserved by the Java language that are therefore not available for naming variables or methods.



L
Local variable

A data item declared inside a code block that is inaccessible from outside the block.



Long

Wrapper class for 64-bit signed primitive long types ranging from -9223372036854775808 to 9223372036854775807.



M
Member

A method, field, or inner class declared as part of a class.



Method

A function defined within a class.



Method declaration

The method header followed by the method body. The method body consists of the block of statements inside curly braces.



Modulus

Operator represented as % in Java that returns the remainder of a division operation. It is represented in ColdFusion as MOD .



Multiple inheritance

Allowed in other languages, it refers to the practice of subclassing more than one class. In Java this is not legal.



Multithreaded

A program that executes code concurrently.



N
NaN

Not a number. A floating-point constant that represents the results of an incorrect mathematical operation, such as attempting to divide by zero. Only the isNaN() method can determine whether a result is NaN.



new

Java keyword used to create (instantiate) a new object (instance) of a class. It is also used to create a new array.



null

null represents the absence of a value. It is represented in Java by the ASCII literal null .



O
Object

In object-oriented programming, an object is the basic building block of applications. An object is a particular instance of a class. It holds data (fields) and provides methods with which to operate on that data.



OOP

Object-oriented programming.



Overloading

Using one identifier to refer to multiple items in the same scope. That is, a class may define multiple methods with the same name, provided that their parameter lists differ . This allows the class to be instantiated in different ways.



Overriding

In a subclass, creating a different implementation of a method defined in the superclass. To do this, the overriding method must have the same return type and the same signature as the method in the superclass.



P
package

A group of classes declared with the Java keyword package .



POSIX

Portable Operating System for UNIX. It is a standard that defines a small language interface between the UNIX operating system and application programs.



private

A Java keyword used to describe the access level (visibility) of a method or variable. Only other elements of the same class may access a private method or variable.



Process

A space in a virtual addressing system that contains one or more threads.



Property

Objects contain properties; that is, characteristics that can be set by the user.



protected

A Java keyword used in the variable or method declaration to signify that the method or variable can only be accessed by elements residing in the current class, its subclasses, or any class in the same package.



public

A Java keyword used in the variable or method declaration to signify that the method or variable can be accessed by elements in any other class.



R
Reference

A data element whose value is an address.



return

A Java keyword to finish the execution of a method, possibly followed by a value required by the method definition. In ColdFusion, user-defined functions employ the return keyword in a similar fashion.



RMI

Remote method invocation; a distributed object model in which methods of remote objects written in Java can be invoked from other Java Virtual Machines.



RPC

Remote procedure call; invokes a method (makes a procedure call) on an object residing at a remote host.



Runtime system

The environment wherein programs compiled for the Java Virtual Machine can run. This includes any code necessary to load programs written in Java, manage its memory, handle exceptions, and more. It also includes an implementation of the Java Virtual Machine and is often referred to as a "Java runtime."



S
Sandbox

Ensures that an untrusted application cannot gain access to system resources. In ColdFusion, a sandbox refers to the developer-specific rules set within the ColdFusion Administrator. While the concept is similar, in Java, a sandbox refers more specifically to a varied set of system components such as security managers and security measures built into both the Java language and the JVM.



SAX

Simple API for XML. An alternative to the Document Object Model, the SAX interface is an event-driven access mechanism for working with XML documents. SAX is supported by virtually every Java XML parser. To write a SAX application in Java, you need to install additional SAX classes, such as org.xml.sax.Parser .



Scope

Used to designate where an indentifier may be used. Class scope and local scope are the most commonly employed.



Servlet

A Java program that extends the javax.servlet class. Servlets extend the functionality of the Web server (as ColdFusion does).



Servlet container

A container that provides protocol services for processing requests and formatting responses.



Servlet context

A servlet's context defines how a servlet sees the Web application in which it runs. This object can log events and set and store attributes that other servlets also in the context can access.



Servlet mapping

Defines an association between a servlet and a URL pattern. When a request URL matches the pattern, the request is passed to the servlet for processing.



Session

A set of HTTP requests associated with a particular user within a distinct time span.



short

16-bit integer primitive type in the range of “32768 to 32767, always treated as signed.



Signature

A method's name, and the type and order of its parameter list.



Single precision

A floating point number capable of data precision to 32 bits.



SOAP

Simple Object Access Protocol. It incorporates a structure for data based on XML that relies on HTTP for its transport layer in order to invoke methods on objects in diverse, distributed locations on the Internet.



static

A Java keyword used to define a variable or method as residing at the class level. Therefore, static variables refer to variables for which there is only one copy, regardless of how many instances of the class there are. By the same token, class methods are invoked by the class, not a specific instance of the class. Class methods may only operate on class variables.



Static field

Another term for a class-level variable.



Static method

Another term for a class-level method.



Stream

Data read as a sequence (stream) of bytes from a sender to a receiver. The java.io package (for input/output) defines two abstract classes to send and receive data streams: InputStream and OutputStream .



String literal

A sequence of characters contained within double quotes.



Subclass

A class that directly or indirectly extends another class. All Java classes are subclasses of Object.



super

Java keyword used to refer to parent class constructors, methods, or variables.



Superclass

A class from which a given class is derived. All Java classes have the superclass Object.



Swing

A set of advanced GUI components that run uniformly on any native platform that supports the Java virtual machine. It was created as an optional add-on for Java 1.1, and Swing components became part of the standard extensions in Java 2.



switch

Java keyword used to evaluate a variable that can match a value within a case statement in order to execute the statements therein. It works much as it does in ColdFusion.



synchronized

A Java keyword that guarantees that at most one thread at a time executes the code in its purview.



T
this

A Java keyword that can represent an instance of the current class. It can be used to access class level variables and methods.



Thread

A basic unit of program execution. One process may have multiple threads running concurrently, each of which performs a different, related function. Once a thread has completed its job, it is destroyed or suspended . The java.-lang.Thread class defines the behavior of a single thread of control inside the Java Virtual Machine.



throw

A Java keyword that allows the programmer to specify that a given class can throw an exception. It must have an associated throwable object.



Throwable

The java.lang.Throwable class is the parent of every Java error and exception class.



throws

A Java keyword used in method declarations that specify which exceptions are passed into the next higher level of the program.



transient

A modifier that indicates that a field is not part of the persistent state of the object and should not be serialized with the object.



try

A statement that specifies a block of code as one in which an exception may occur. One or more catch clauses, which perform some exception handling, must follow the try statement.



Type

An object's interface. A distinction is created between class and type in OOP when an interface is separated from its implementation.



U
UDDI

Unverisal Description, Discovery and Integration. This project provides a public XML-based registry for businesses to register their Web services.



Unary

Operators affecting a single operand. For instance, the + and “ are used to indicate the positive or negative value of an integer.



Unicode

A 16-bit character set defined by the ISO 10646. All Java source code is written in Unicode, which eases global use. Arabic, Chinese, and Japanese are examples of languages that require 16 bits to represent characters. ColdFusion uses an 8-bit standard character set. It is possible to represent 16-bit data in ColdFusion, but it requires some effort.



URL

A Uniform Resource Locator in Java is represented by the java.net.URL class. Using this class generates an InputStream to read the remote resource. It is used when you might use <cfhttp> to read a Web page.



V
Vector

Defined as java.util.Vector , a vector class object holds an extensible array of Object references.



Virtual Machine

The Java Virtual Machine is the interpreter for Java bytecodes, consisting of a bytecode instruction set, a set of registers, a stack, a heap, and an area for storing methods.



Visibility

The level of access granted to other classes. For instance, the protected keyword can be used to define variables and methods that can be accessed by methods of classes in the same package or by methods of classes derived from that class.



void

Java keyword used to indicate that a given method does not return a value. Such methods are run by the Java interpreter one by one until the end of the method is reached, at which point the method returns implicitly.



volatile

A modifier that indicates that a field can be accessed by unsynchronized threads.



W
Web services

A Web service is a self-contained application that can be described, published, and subscribed to over a network. Web services enable application-to-application interaction without the overhead of human intervention.



while

A kind of loop common to Java and ColdFusion wherein the expression inside the while is evaluated; if the expression evaluates to true , the body of the loop is executed and tested again. This process continues until the expression evaluates to false .



Widening conversion

Name for the conversion that occurs when a value of one type is converted to a wider type; that is, a type that has a larger range of possible values. Widening coversions are performed automatically by Java when, for instance, you assign an int literal to a double variable.



Wrapper

Applied to Java classes in the java.lang package that correspond to the eight primitive variable types (boolean, byte, character, integer, etc.). These classes perform three functions: utility functions, constants, and object encapsulation of primitive values. Wrappers are objects that encapsulate and delegate to other objects in order to modify their behavior.



Writer

The java.io.Writer class is the abstract base class used by classes to write data in a 16-bit character stream.



WSDL

Web Services Description Language. An XML-based language used to describe a Web service, and specify how it can be communicated with.




   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net