Database Reference
In-Depth Information
whether it's appropriate or not. Some industry-specific forums and advisory boards quite
often produce rather vague frameworks and business process specifications that are in fact
not more than business heat maps. Following them too directly can easily result in such
hybrid services with unclear abstraction levels.
Data granularity is the next level of granularity we should take into consideration when
applying the abstraction principle. Processing one single order line or a complete bunch of
orders received in one message in reality makes a difference; however, in your design of
an Order XSD, all that it takes is to set minOccurs to greater than 1 for the Order node
right under the OrderHeader element.
The data constraints granularity or constraints granularity in general is the next logical
level of granularity. Again, talking about XSD, you could be really restrictive with your
data type definitions while determining whether they are necessary by declaring a simple
type using XSD patterns, explained as follows:
Fine-grained
Coarse-grained
<xsd:simpleType name="imageType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="(.)+\.(gif|jpg|jpeg|bmp)"/>
</xsd:restriction>
</xsd:simpleType>
xsd:string xsd:any
Here, you want to be sure that the image's filename provided in a message is safe (at least
not executable). This could not be achieved by the most popular xsd:string data type
alone in the service contract. The xsd:any element is at the upper level in this hierarchy,
which in OOP has equivalent Object . All these levels of abstraction have full rights to
exist, but you must clearly realize which part of your SOA infrastructure should employ
these different levels of granularity. The other means of data granularity already men-
tioned are minOccurs , maxOccurs , and nillable that are applicable for the ele-
ments and xsd: attributes. Terms usually used for different levels of detailing are the
fine- and coarse-grained granularity, and they are quite self-explanatory. The levels of de-
clared granularity directly impact the location of the service-processing logic. This means
Search WWH ::




Custom Search