Package Names. The Java community has adopted several
conventions for package and class names that should be followed.
Package names should begin with the domain name of the company
in reverse order. For example, code developed by General Dynamics
is contained in packages beginning with "com.gd.openwings"
because General Dynamics' corporate webpage is found at gd.com.
Note that companies often have their own policies regarding insertion
of business unit names in package designations.
Component Names. Component names should be meaningful
and descriptive. For example, all of the components that make
up the Hello World demos have "HelloWorld" in their
names. The Openwings convention is to name a component the same
as their installable image (jar file). Using "HelloWorld"
as an example again, the component that provides the HelloWorld
service is named HelloWorldProvider_im. The "_im" suffix
stands for "image".
Don't put hyphens in your component names. The install service
uses hyphens as a reserved character in this release of Openwings.
Class Names. Likewise, class names should be meaningful,
descriptive and should reflect the name of the component. For
instance, the class that provides the HelloWorld service is named
HelloWorldProvider. Using the convention in the Java community,
each word in a class name should have its first letter capitalized,
with all other letters of the word in lower case (for example:
ClassLoader). The exception is abbreviations, where every letter
should be capitalized (for example: URLClassLoader).
Interface Names. Service Interfaces should have a meaningful
name. All method declarations within a Service Interface should
contain method names and parameter names that are descriptive
of the intentional uses of those methods. Interfaces should be
separated from implementations in their own packages.
Installable Jar File Names. In Openwings, there exists
a close relationship between the installable image jar file name
and the component name. Should the name of the component be different
than the installable jar file, the Openwings Install Service will
change the component name in the InstallableComponentDescriptor
to be that of the jar file name, without the ".jar".
Connector Names. The connector name is automatically named
after the interface name. For instance, the
name OpenJMSServer is used to indicate the server side of
a JMS (Java Messaging Service) connection.
UI Names. The name of a user interface should be closely
linked to the component name it is associated with. For example,
component ImageUI_im supports the user interface that makes up
the Image demo.
Policy Names. If you are generating your own policy (an
XML file) for your component, it is recommended that the policy
name is named after the interface.
For example, if your interface were named SampleComponentOne,
the name of your policy should be SampleComponentOnePolicy.xml.
Next: Component
Service APIs