As this is my 100th posting to this blog, I’ve decided to do a run-down of the five most popular postings so far:

  1. Tesco Show What Innovation Is

  2. Shaving and Carry-on

  3. What is an ESB?

  4. WebSphere Message Broker and WebSphere ESB

  5. Blog Commenting is Weak

These rankings are provided by the Wordpress Popularity Contest plugin, which calculates them based on a weighted average of views, comments, etc. It’s almost endlessly tweakable - I’m trying to resist the temptation to fiddle. I don’t think the above numbers are particularly accurate right now, so they’re just a bit of fun, but hopefully the statistics will settle as the new plugin starts to record information.

What is Business Logic?

In the world of business-oriented software, we use the phrase ‘business logic’ a lot. In my particular area (WebSphere integration products), a typical pattern is to delegate ‘technical logic’ to mediation flows in WebSphere ESB, and to put ‘business logic’ in process flows in WebSphere Process Server. It doesn’t have to be that way, but that’s what many people encourage, as it seems to neatly match what the software can provide.

But what do we mean by the phrase ‘business logic’? Ultimately both business logic and technical logic come down to the same thing; instructions executed by the machine. I can implement both in mediation flows, Java, Perl, assembler, or shell scripts. So why the distinction? It really depends on one’s perception.

For example, let’s imagine we are developing an integration system for a peanut factory, and we are developing a system to handle the orders. A typical way we might encourage someone to use WebSphere ESB is at the boundary, to convert between the protocol used by the web-based bulk order system (say SOAP/HTTP) to the one used by the back-end production system (say JMS). The distinction between these isn’t important to the business; it doesn’t matter what format the message is in; it just has to be in a certain format because we need some integration and don’t want to change everything.

By comparison, we might encourage someone to use a business flow to model (say) the approval of orders of peanuts. The process might follow a number of steps, some of which might involve human intervention, to modify the order (message) accordingly - i.e. adding ‘approved’ or ‘denied’. This would be based on the size of the order, that customer’s past history, whether they were salted or (urgh) dry roasted - all things that are at the business level - things that we find interesting (assuming we like peanuts).

Therefore, let’s characterise the difference as follows:

  • Technical logic: Stuff we don’t want to do, but need to in order for everything to work.

  • Business logic: Stuff we do want to do - the reason we’re doing all this. We can not only decide on how to implement this (as we can with technical logic), we can also decide not to implement it all, or to implement different logic.

Therefore, these two types of logic are at different abstraction layers - the technical layer we’d love to make as simple as possible and hide away (and I’d like to think WebSphere ESB does a good job of helping IBM’s customers do that), whereas the business layer we find interesting and want to spend some time on. I mentioned something similar before as a best practice - I could rephrase that best practice here as: ‘Spend as much time as possible on the business logic, and as little time as possible on the technical logic’. It seems sensible, then, that to keep them separate (and there are plenty of patterns for doing just that) is a natural thing to want to do.

I’d love to hear some comments from my consultant colleagues on this: do you think this distinction is important? Does it impact the way you work day-to-day?

The Sixth Sense

The Sixth Sense is a reasonable thriller with a good twist at the end (I genuinely didn’t know what it was; and I won’t spoil it for anyone else who doesn’t). Haley Joel Osment and Bruce Willis are both excellent, and the supporting cast competent. Osment in particular stands out - he has done well in other films such as A.I., and is one of the most competent child actors of the modern generation. The film drifts rather to start with, and by the time it gets going the end of the film is approaching. But apart from this mismatch of pace, this is an interesting film from M. Night Shyamalan, one of the most successful Indian film directors to break into Hollywood. Willis again proves that he isn’t just an action hero (see Death Becomes Her and Color of Night for other examples).

Why Trade is Beneficial - The Ebay Way

Ebay can provide a very good illustration of why trade is good for everyone.

Let’s say I have a Coldplay t-shirt that I was given as a present, have worn once or twice, but am ashamed of and want to get rid of. As such, it isn’t worth much to me - if forced to assign a value, I might say £1. I’ve just been given a phone, though, an older model, and want a spare charger for it.

You have just upgraded your mobile phone, and are left with the old charger. It’s therefore useless to you - you might say that’s worth £1 to you too. You like bland British pop, though, so you’re looking for a Coldplay t-shirt.

I put up the t-shirt on Ebay, and you put up the phone charger. We both bid £5 for each other’s items, and exchange goods and money. Since we both bid the same amount, the amount of money in our hands has not changed. However, we’ve both gained wealth, because we both now have items worth at least £5 to us rather than £1. Thus, the total amount of wealth in the economy has gone up, and we’ve both made a profit. In other words, the transaction is win-win (as are most transactions).

Of course, there are some simplifying assumptions here:

  • The market is more complex: the chance of us both being buyers and sellers on Ebay and exchanging items like this is obviously low. In fact, in the example above, we could have bartered and simply exchanged items - money is typically used just because it makes the market more liquid - it doesn’t require both of the transactions above to happen simultaneously between the same parties. If only one of the transactions above happened, the same argument would still apply: it’s simply that the seller values the item less than the money paid, and the buyer more.

  • I haven’t discussed the transaction costs involved.

Hopefully this example illustrates why trade is a good thing for increasing everyone’s wealth. The corollary is that international trade is also beneficial - because there is wider scope for finding people who wish to trade and increase the net wealth. This is one reason why I support the Adam Smith Institute’s campaign to increase free trade and oppose any artificial distortion of trade boundaries or protectionism. (Incidentally, their blog is well worth reading).

Blog Commenting is Weak

Am I missing something, or is blog commenting still immature? I read about 80 blogs currently, and do it mostly through an RSS reader (Thunderbird), as it’s the only way to keep up with that volume. It’s straightforward to keep up with the posts themselves - they appear in a separate list for each blog, typically sorted by time posted (at least that’s the way Thunderbird presents them).

Commenting, on the other hand, is a different matter. On my own blog it’s not too bad: if someone posts a comment about one of my posts, or in reply to comments I’ve made, I get notified by email, because I’m the owner of the blog, and Wordpress (which seems pretty close to the state-of-the-art in blogging software) sends an email to tell me that’s happened. Even on my own blog, though, there is no notion of hierarchy to comments: they just appear in a stream (in other words, there is no notion of ‘replying’ stored with a comment). This can make pulling out longer threads of conversation tricky.

If I make a comment on someone else’s blog, though, I get no notification at all. Many blogs provide no way of keeping up with the comments: I have to go and check all the posts I’ve been interested in, on the web, to check whether anyone has added anything to them. Even when the blogging software provides an RSS feed for comments, like Wordpress does, the comments for all the posts are lumped together - there is no separation by the post they apply to - primarily, I think, because neither RSS nor Atom provide the notion of hierarchies in the entries syndicated. This also means I have to subscribe to two RSS feeds for blogs where I’m interested in both the posts and the comments.

Currently, these things aren’t a major issue for me, more an annoyance, as I tend to only comment on (and be interested in the comments on) a few blogs, but if I spent more of my time reading blogs, this would really begin to get on my nerves. I also avoid commenting sometimes because I think I’ll forget to check the reply. This is what makes me wonder whether I’ve missed something: how do other people cope with this? Maybe I’m expecting too much: I have an mental model whereby I want the RSS reader to act in a similar manner as a newsgroup reader by notifying me of the new comments, attached to the post or comment that they apply to. Maybe that’s more than the designers of RSS had in mind.

subscribe via RSS