|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON DECOUPLING Reducing Maintenance Costs Through Systems Decoupling
Technological and functional decoupling
Dec. 25, 2006 03:30 PM
Over-Generalized Interfaces CRUD Web services describe generic operations over objects instead of specific business operations. CRUD interfaces are born out of the good intention to provide a single unified interface to all clients. CRUD operations also make it possible to generate a large part of the implementation skeleton using code generation tools. To illustrate problems of CRUD interfaces, let's consider the case of a bank account. There could be operations to set account properties in a particular balance. A property might be updated only by an authorized request sender. While the CRUD approach looks very generic, it is difficult for implementation, use, and more importantly, security:
Of course, sometimes CRUD interfaces are adequate. For example, they could be used for communication between JavaScript code executed on a client and server side logic. Here, tight coupling between these two parts of the solution is rather natural. However, using CRUD interfaces for Web services is often the wrong idea.
Vertical Industry Standards Often these standards declare a quite generic and flexible XML language that is able to accommodate different business requirements. However, the target service is usually able to understand only a subset of this rich language. Some constructs are valid for such a language and can be rejected by a Web service because they contain unsupported fields or miss required fields. UBL developers have noticed the problem and offered a partial solution in the form of customization guidelines. If the schemata are used as is, implementation of both clients and servers is more complex. Servers are required to perform extra validation checks. Developers of clients are forced to check each step with additional guidelines to ensure that requests will be valid, instead of just relying on the respective API. Although vertical industry standards can decrease documentation and interface development efforts, they often do little to reduce coupling of systems. Moreover, naive implementation of these standards can conceal existing coupling problems instead of solving them.
Fine-Grained Interfaces This is a well-known bad practice that was understood as anti-pattern even during CORBA days. A typical example is expressing a high-level update operation as a sequence of property update operations. However, it still periodically surfaces because it falls into the exposing the application "as is" trap. The problem becomes a latency and perrequest cost of network operations that consume more resources than local operations. When a business function is split into too-small pieces, the coupling also becomes higher because the business operation becomes implemented by client applications rather than by the server logic. This also leads to security problems similar to ones already discussed above in over-generalized interfaces.
Coarse-Grained Interfaces ACORD P&C 1.x.x specification is an example of a specification in the domain of insurance. A single request can contain a number of business requests that create and update different business objects (claims, polices, etc). It is also possible to check the status of previous requests and pull results of completed operations. This is done to reduce the amount of interactions between clients and servers. Such an approach results in complex logic for request processing, and this complexity is caused not by the business domain of the specification, but by technical decisions to create a coarse-grained interface on the system and specify processing models for requests. As the result, the technical coupling in the system is increased since both clients and servers have to support the specified processing models.
Conclusion Management is aware about the mission and the structure of their organization. Knowing needs, goals, and rules is the essential part of any change within an enterprise. Analysts and domain experts can elaborate these goals and rules to software requirements. Architects know how to bring these requirements to the life. Coupling is an interesting and complex problem, which is created by decisions on many different levels. High coupling on the level of real business processes is often caused by management decisions. High functional coupling is often caused by the way requirements are distributed among applications, and it is mostly the responsibility of analysts and domain experts. High technological coupling is often caused by decisions made by architects. While sometimes it is possible to partially compensate a problem of one level on other levels, it is still better to solve it on the level that it belongs to. RFC 1925 also says: "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." There are tools and methodologies that help to reduce coupling on each level. However human intelligence and creativity are still the best and indispensable tools. LATEST JAVA STORIES & POSTS
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK SPONSORED BY INFRAGISTICS
BREAKING JAVA NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||