Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Summary

Interfaces, contracts, methods, operations, entities, objects, and tables, oh my! The OSID Specification defines its own language solely in reference to itself. Developers will look at it from the OSID Language Binding perspective. Others will import concepts from what they have worked with in databases, web services, or MVC-based platforms. The result is a mash of terms that matters once in a while.

The OSID Perspective

You can look at the OSID Specification schema for its specification terminology. It defines:

  • osid: a bunch of interfaces an enumerations
  • enumeration: a list of values
  • interface: a bunch of method definitions
  • method: something that is invoked with parameters, returns a value or an error
  • parameter: defines what may be supplied to a method as an argument, can be an interface, enumeration, or a language primitive
  • return: defines what may be returned from a method, if anything, can be an interface, enumeration, or a language primitive
  • language primitive: boolean, byte, cardinal. decimal integer, object. string, timestamp
  • error: an error from a method such as OPERATION_FAILED or ILLEGAL_STATE
  • compliance: a compliance statement for a method - mandatory or optional

The Java Perspective

  • package: a bunch of interfaces, classes, enums, annotations, and other sub-packages
  • enums: constants and methods
  • interface: a bunch of method definitions
  • class: a pile of attributes that include methods and may implement one or more interfaces
  • object: an instance of a single class
  • method: something that is invoked with parameters, returns a value or throws an exception
  • parameter: defines the type supplied to a method as an argument, can be a class, interface, enum, or a primitive
  • return: defines the type of return value, can be a class, interface, enum, primitive, or void
  • primitive: boolean, byte, char, double, float, int, long, short
  • exception: an event that occurs during the execution of a program that disrupts the normal flow of instructions such as SecurityException or NullPointerException 

The OSID Specification is transformed into the OSID Java Binding. The resulting merge creates the following OSID terminology in Java:

  • osid: a Java packages and its sub-packages
  • package: a bunch of interfaces and enums
  • enums: constants and methods
  • interface: a bunch of method definitions
  • method: something that is invoked with parameters, returns a value or throws an exception
  • parameter: defines the type supplied to a method as an argument, can be an interface, enum, or a primitive
  • return: defines the type of return value, can be an interface, enum, primitive, or void
  • primitive: boolean, byte, or long
  • exception: an error from a method such as such as OperationFailedException or IllegalStateException 

Concepts like classes and objects disappear. Others like parameter and primitive have a narrower connotation than what a Java developer would be accustomed. And the definition of "osid" gets fuzzier.

Terminology Issues

These are a list of terms that often get tossed around. Mixing terminology across frameworks will always cause confusion. When a term is in direct conflict with the OSID Specification or its few basic concepts, it's a good idea to lose it and adapt. This can be difficult when trying to learn something by comparing it to another thing you already know.

Others terms are more conceptual in nature and we tend to use them informally.

(tick)  terminology compatible with OSIDs

(warning)  shaky terminology

(error)  terminology incompatible with the OSIDs

(warning) API

OSIDs are consumed by OSID Consumers in software. They are Application Programming Interfaces.

However, OSIDs are designed around integration points and abstracted to promote interoperability in software by moving configuration and control from consumers to providers. Many APIs are to utility libraries that allow their applications to more easily command what the library will do, such as storing data in a HashSet, building a DOM tree, when to send data over the wire. So, not all APIs make good service contracts (in fact few are designed with this intent).

(warning) Attributes & Data Fields

Service entities, such as OsidObjects, are expressed using interfaces.  What is presented to an OSID Consumer is the means for accessing information at that point in time. OSID Providers can provide real time information through its methods.

An OSID Provider may likely employ data objects to satisfy the contract of an OsidObject. An OSID Consumer sees this through the window of the interface. The OSID Consumer may do whatever it likes with this information, including referring to them as simple data elements. However it can be an impediment when trying to understand the nature and applications of these interfaces whose implementation may require an underlying OSID Provider rather than a pull from a database table, for example. 

(tick) Boundary

Boundary can be a cool word but is a bit slippery.  In the OSIDs, it may also refer the line between an OSID Consumer and an OSID Provider, i.e. "The details of the Asset are opaque through the OSID boundary." 

Many listeners will assume it means the scope of a service, i.e. "There's a service boundary between authentication and authorization." However,  jumping laterally between two OSIDs also implies a vertical movement between an OSID Provider. This interpretation would not be wrong but it may fail to clarify exactly what is meant. 

(tick) Contract

The term contract is often used in service designs to distinguish an interface from a message structure or DTO. The message structure and DTO are considered data while the contract defines the operations on that data. OSIDs define the agreement between service consumers and service providers. In the OSID world, most everything in the specification can be considered a contract,  i.e. "The AgentList is a contract."

(error) DTO (DAO, Bean, Domain Object)

A Data Transfer Object is used to transfer bags of data values. However, OSIDs are interfaces into OSID Providers. OSID Providers may be dynamic and DTOs are static. 

Most DTOs are bi-directional. The same object is often used for retrieval and update with setters and getters. OSIDs define different interfaces for these operations making most interfaces, except for OsidPrimitives, uni-directional. 

However, OsidObjects are not domain or business objects either. Their interfaces define methods to access information and relations. Actions are defined in OsidSessions. This is much more like a DAO/DTO model than a pure object oriented model as it allows for better defined integration points. The absence of setters in the OsidObject interfaces, the inability to send an OsidObject into an OSID Provider, and the extensible OsidRecord mechanism make these analogies ripe for confusion.

(warning) Endpoint

In the web service world, an endpoint is essentially a URI that identifies a service provider and to which data will be serialized. In the OSID world, there are no URIs and serialization is handled by an OSID Consumer or OSID Provider. 

However, the concept of service endpoints can be brought into the OSIDs. The first identifier is the implementation name of an OSID Provider given to OsidRuntimeManager to get an OsidManager. This can be considered the first service endpoint. Or perhaps an OsidProxyManager was requested instead. This can be considered an alternate service endpoint. In OSIDs, to get a service endpoint means to get an interface.

From there, OsidSessions are requested. Each OsidSession can also be considered endpoints. Then so can OsidLists and OsidObjects. 

Because OSIDs abstract away issues of serialization and protocol, we are just left with interface definitions that are utilized directly in software. The SOA concepts of endpoint and contract still apply but without the web services part.  SOA - WS = OSIDs

(tick) Entity

(error) Message Structure

(warning) Operations

(warning) Relation

(tick) Service

The term "service" doesn't have any formal definition in the OSID Specification. It's tossed around because this is a Service Design Methodology. 

(warning) Standard




 

 

  • No labels