Decouple App Specific and App Agnostic Logic

Your application typically consists of a variety of functionality – user interface components, business logic components including domain assets, business rules, and services, backend assets such as legacy components, packaged systems etc. If you tie your assets too specific to an application it will severely inhibit reuse.  Application agnostic logic should be built as reusable assets. If they aren’t, plan to refactor so they are reusable.

Business tier assets could be a combination of objects and services. Your SOA efforts need to be brought into the picture here so you can leverage existing services for fulfilling application functionality. Enterprise data can be decoupled from your application either via a data access layer or a data services layer or a combination of both. Business rules can be encapsulated using Classes via the Strategy pattern or via a declarative rules engine. Either way you should ensure that most of your rules are standalone units of logic that taken a bunch of inputs and return a result. That way they are not specific to a single application. External system integrations should be encapsulated as well including connectivity, data transformations, target specific data values, and error handling. Equally important is handling exceptions in a consistent way across your application.

The idea is to reduce coupling between application specific logic and application agnostic ones. This will help you reuse technology assets in new and unexpected ways! This in fact is a foundational idea of Software Product Lines.

Like this post? Subscribe to RSS feed or get blog updates via email.

add to del.icio.us: Digg it : post to facebook: Stumble It! : :

Advertisements

One Response to Decouple App Specific and App Agnostic Logic

  1. […] a library (JAR or DLL for instance). The important thing is to resist placing data management logic alongside consuming application code. Every consumer would have to implement the similar code and you will add operational complexity […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: