January 2009
Sun Mon Tue Wed Thu Fri Sat
       

Tue, 29 Jul 2003

Why Web Services Matter

COM(+)

CORBA

EJB

Web Services

Words of Wisdom

"This notion of a specific contract is crucial to COM and to component software in general. Without "ironclad" contracts, it would be impossible to interchange components."

Distinguish between the public interface of a module, which can change as long as it's a within-team usage, and the published interface, which must be immutable and adhere to the contract.

"reuse [is] undervalued and insufficiently rewarded by the sponsoring organizations."

"Services are grouped into coherent, contractual units called ''interfaces''."

"By focusing on the notion of a contract, the service perspective introduces an important distinction between the specification of a component (what it does) and its implementation and executable forms (how it does it). This distinction is fundamental to the management of dependencies between components and begins to address the important requirement to be able to replace a component with minimal impact on the consumer, often referred to as "plug-and-play". "

Create detailed, well-defined interfaces. Java supports the interface explicitly.

Design-by-contract

When evolving the Component API from release to release, do not break existing Clients. API changes must not invalidate formerly legal client code.

Prevention steps for clients (callers)

  1. Make method preconditions as strong as possible
  2. Make method postconditions as weak as possible.
  3. Ensure correct field invariants.
  4. Settle on and do not change class/interface "gender"
  5. Prefer creating a new interface to changing an existing one, even if the change does not break compatibility.
  6. Define checked exception semantics carefully.
  7. Publish (outside the team) APIs parsimoniously.
Evolutionary Changes
  1. Deprecate and Forward
  2. Create a new package
  3. Any new methods that add/remove params, overload and call the old methods.
Communicating Changes
  1. Clarify how APIs work when the spec is imprecise
  2. Fix Broken Windows
  3. Fix '''only''' Broken Windows
  4. Note incompatible changes in the Release Notes

Component Infrastructure

Articles

Evolving Java APIs

Component Technologies

COM

CORBA

EJB

XPCOM

permanent link