|
|
|
Brief Definition and examples to the term “Loosely Coupled” |
|
Loosely
Coupled System - Coupling is the dependency between
interacting components. This dependency can be decomposed
into real dependency and artificial dependency. Real
dependency is the set of features or services that a
components consumes from other components. The real
dependency always exists and cannot be reduced.
Artificial
dependency is the set of factors that a component has
to comply with in order to consume the features or services
provided by other components. Typical artificial dependency
factors are data format dependency, platform dependency,
and API-application program interface dependency. A
ideal loosely coupled system is one in which artificial
dependency between components has been reduced to the
minimum.
|
|
Examples
For Real & Artificial Dependencies: The electric
appliances (e.g. TV, LCD-Clock, CD-player or hair-dryer)
run on power. Hence the need for the electric power
is real dependency. But most power outlets are designed
for specific voltage and have a certain type of power
outlet (i.e. socket to plug in).
For example, outlets
in the Hotel rooms in many Asian countries supply 220V
and have different type of sockets (e.g. size and shape).
Hence many appliances made in the USA might not work
in Asian, because the appliances are designed for 110V
and their plugs do not fit into the outlet (or socket)
in Asia. Hence, the appliances need to comply artificial
factors, such as, voltage range and shape of the plug.
|
|
Likewise,
monitory compensation is required to buy goods and services.
Hence monitory compensation is real dependency. However,
overseas travelers may need to convert their national
currency to the local currency (e.g. Euro in Europe,
dollars in the USA and Yen in Japan), to buy goods or
services.
Here the form of the said monitory compensation
must be in one of the acceptable form (e.g. local currency
or an international credit card), which is an artificial
dependence. Although, gold is universal monitory standard
for centuries, most shops won’t accept gold
and give you back remaining change in small gold pieces.
I wish they do that.
|
|
Service
provider usually determines factors or form of the artificial
dependency. For example, a software component vendor
may build and sell a reusable-shopping cart (e.g. An
Invoice Table or Spreadsheet) for online mall. It may
provide services, such as, add an item to the Invoice
(i.e. Shopping cart), when visitor purchases an item
from an online catalog. The Invoice needs the item’s
data (e.g. Price, Discounts, Description and/or Size),
which is a real dependency.
|
|
The
Shopping cart may define one or more data formats to
communicate the data, such as, an XML-Schema and a Data-object
(or record/structure). Then, an interacting component
(e.g. shopping item in the online-catalog) must send
its data in one of the supported formats, to properly
add the item to the shopping cart.
For
example, if the shopping-item
sends all the data pieces, but in a no-compliant
data format (e.g. a large string containing name and value pairs separated by semicolon)
the service request fails because
the shopping cart cannot properly process the data send to it. |
|
If
you wish to further explore “loosely coupled”
systems and service-oriented architecture, you may search
the web to find articles or tutorials, such as:
http://webservices.xml.com/pub/a/ws/2003/09/30/soa.html
|
|
|
|
|
|
Copy Right © 2006 Pioneer Soft, LLC. All Rights Reserved. |
|
|