Welcome!

Java Authors: Kevin Benedict, Pat Romanski, Frank Huerta, Adrian Bridgwater, Pieter Van Heck

Related Topics: Java

Java: Article

Who Does Business Logic?

'Business Logic' seems to crop up a lot in presentations, articles, sales pitches and so forth

One of the phrases that has always puzzled me is "business logic". It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.

It's not the first time I've come across server heads who use this argument, that their box has to be the gatekeeper for all of the hard and important corporate logic. By using the adjective "business" they're sort of belittling the desktop in any client server equation to be good for nothing more than fancy editing controls and salad dressing the user experience.

The problem is that often when you push people for what business logic really means, it boils down to something like "this value can't be larger than the sum of these values" or "this date can't be before this date for this kind of transaction". It's an answer that more often than not sounds to me like something the GUI is not only perfectly capable of doing, but is probably most sensibly done on the desktop. After all, it can notify errors instantly on mouse and keyboard events, and provide completion assistance and help without incurring the latency of an expensive server round trip.

Wikipedia describes "business logic" with the following sentence:

"Take a spreadsheet, for example. The spreadsheet in itself is a generic tool and embodies no business logic as such. When you use the spreadsheet by encoding formulas which calculate values of importance to your organization, then you are encoding business logic"

For any server guy reading this, a spreadsheet is a desktop application. However, the key phrase in the definition above is "importance to your organization, then you are encoding business logic".

From that definition I think that all code any of us have ever written is business logic. I assume of course none of us have ever written stuff that wasn't important to whichever organization was paying our salary at the time.

Why then is there such a mystique about the phrase ? I think it's because as soon as the adjective "business" is placed around something it means that it's more important to the organization and therefore attracts the attention of managers, accountants and analysts. Business modeling is something done by analysts (proper analysts, not people who write specs for programs that developers have to stay at work late and write) where they take apart the mechanics and structure organization of an organization in attempt to apply change management and restructure its processes to be more efficient and cost effective in future. A Masters of Business Administration studies for three years or more to understand this in depth, hoping for a destiny in the echelons of senior management to perfect and apply their skills. There are even executive MBA programs for those who are aiming even higher up the corporate ladder. I wonder whether MBAs drill into people a subliminal Pavlovian association that make its graduates salivate each time the word "business" is used to prefix an otherwise boring task, such as coding spreadsheet cells.

It's not just business logic that one can dissect in this way, but there are a slew of terminologies such as "business process execution language", "business event publishing", or "business process modeling notation". If you dig hard enough behind the sea of white papers and PowerPoint charts surround these however, you'll find that at the core of each is some plain old-fashioned, unfashionable, boring old code. "When value foo reach values a limit moo write value foo*100 to buffer boo that program goo reads and updates database yoo with".

There is benefit in abstracting lines of code to higher level units. Both from the benefits of modularity and re-use, while object-oriented programming further reifies blocks of work to become recognizable tasks and functions around anthropomorphic functions. What troubles me though, is when just because someone has grabbed a trendy name for what's basically just code, and then denigrates those who aren't using their coding technique as being fat, thick, poor, or whatever other insult they can dream up, allowing them smugly preaching the benefits of the new "business logic application hardware" (BLAH) technique they created with impunity.

We all write business logic. From games programmers, to COBOL guys, through Java, Visual Basic, and spread sheet macro heads. A good rule of thumb I think is to always apply the wikipedia test, which is when coding or designing, to continually question the importance of what you're doing to the organization for whom the program is being built.

Business logic can, and does, run anywhere, in any language, on any platform. Next time you see an over the top presentation being given by someone who dresses up their newfangled architecture with the "business" adjective start questioning them hard and peel back the layers of their onionware. You'll find that behind the robes there's just some code served up in an alphabet soup of acronyms to make it current and confusing. Then question whose benefit this is for. The customer for who the application is going to work, or the company whose consulting services are behind the presentation. Seems pretty logical to me.

More Stories By Joe Winchester

Joe Winchester, Editor-in-Chief of Java Developer's Journal, was formerly JDJ's longtime Desktop Technologies Editor and is a software developer working on development tools for IBM in Hursley, UK.

Comments (6) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
SYS-CON Brazil News Desk 07/31/06 03:32:37 PM EDT

One of the phrases that has always puzzled me is 'business logic'. It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.

JDJ News Desk 07/31/06 01:50:32 PM EDT

One of the phrases that has always puzzled me is 'business logic'. It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.

JDJ News Desk 07/31/06 01:08:01 PM EDT

One of the phrases that has always puzzled me is 'business logic'. It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.

JDJ News Desk 07/31/06 12:54:52 PM EDT

One of the phrases that has always puzzled me is 'business logic'. It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.

Raymond Pendergraph 07/31/06 12:37:22 PM EDT

I agree, business types (as with most other terminology) overuse and mis-use buzz words. "Band-width" is a personal irritant. "Business logic" will be no exception but the true meaning has never been an issue to developers in general I don't think. It has never really confused me anyway. You do make a valid point though... applications are mostly business logic. I think when people (developers?) say that phrase they mean the logical steps it takes to fulfill a task which may or may not be unique to that organization. The proper behind the scenes creation and routing of a 54-D report to accounting after the online submission of a 24-F for instance. What are these? I have no idea but I'll bet the company has specific rules about who, when, where and how. Rules that do not need to rest on several hundred clients (at different revision levels). Now the data entry and validation rules of the 24-F are another type of business logic that you mentioned. I would think these would most likely be on the client.

JDJ News Desk 07/31/06 08:36:34 AM EDT

One of the phrases that has always puzzled me is 'business logic'. It seems to crop up a lot in presentations, articles, sales pitches and so forth. The one I saw it in most recently was a talk about how great web servers are because they keep all of the business logic on the server where it can be robust, secure, and logged. By analogy the client is a poor place for business logic because, while it can do richer things with the user interface, all of the core rules must be kept on the server.