Cookies help us display personalized product recommendations and ensure you have great shopping experience.

By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    New Data Analytics Breakthroughs Give eCommerce Startups a Fighting Chance
    New Data Analytics Breakthroughs Give eCommerce Startups a Fighting Chance
    6 Min Read
    How Data Analytics Is Reshaping Patient Financing Decisions
    How Data Analytics Is Reshaping Patient Financing Decisions
    13 Min Read
    business using business intelligence
    How to Use a Competitive Intelligence Dashboard to Turn Market Data Into Smarter Marketing Decisions 
    9 Min Read
    unusual trading activity
    Signal Or Noise? A Decision Tree For Evaluating Unusual Trading Activity
    3 Min Read
    software developer using ai
    How Data Analytics Helps Developers Deliver Better Tech Services
    8 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-25 SmartData Collective. All Rights Reserved.
Reading: Business Rules to Programmers – Methink thou doest protest too much I
Share
Notification
Font ResizerAa
SmartData CollectiveSmartData Collective
Font ResizerAa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Business Intelligence > CRM > Business Rules to Programmers – Methink thou doest protest too much I
Business IntelligenceCRMData MiningPredictive Analytics

Business Rules to Programmers – Methink thou doest protest too much I

JamesTaylor
JamesTaylor
9 Min Read
SHARE

Well last week was exciting on the ebizQ blog – thousands of new visitors after a link from a popular programming blog. This article – Programming Sucks! Or At Least, It Ought To – referred to an old article of mine – Don’t soft-code, use business rules that had been prompted by his article on soft-coding. Following so far?

Clearly, having provoked this storm of interest, I should respond. This week I will write three posts to answer this – one will recap the basic premise of business rules and make it clear what I mean, one will take some of the arguments Alex makes and show why I think his arguments should lead one to adopt a business rules approach and one will take the specific comments I got and address them. Should be a fun week.

Let’s start with the snippet of code Alex used in his posts and with which I took issue in Don’t soft-code, use business rules:

private void attachSupplementalDocuments(){  if (stateCode == "AZ" || stateCode == "TX") {    //SR008-04X/I are always required in these states    attachDocument("SR008-04X"); ...

More Read

Ad Industry Groups Begin New Anti-Regulatory Campaigns
Data Privacy: the Creepy vs. the Terrifying
Business Analytics: Correlation is Not Causation
The Analytic Entrepreneur Series: Dr. Robert Phillips
Last call for papers for Business Rules Forum/EDM Summit 2009


Copyright © 2009 James Taylor. Visit the original article at Business Rules to Programmers – Methink thou doest protest too much I.

Syndicated from ebizQ

Well last week was exciting on the ebizQ blog – thousands of new visitors after a link from a popular programming blog. This article – Programming Sucks! Or At Least, It Ought To – referred to an old article of mine – Don’t soft-code, use business rules that had been prompted by his article on soft-coding. Following so far?

Clearly, having provoked this storm of interest, I should respond. This week I will write three posts to answer this – one will recap the basic premise of business rules and make it clear what I mean, one will take some of the arguments Alex makes and show why I think his arguments should lead one to adopt a business rules approach and one will take the specific comments I got and address them. Should be a fun week.

Let’s start with the snippet of code Alex used in his posts and with which I took issue in Don’t soft-code, use business rules:

private void attachSupplementalDocuments(){  if (stateCode == "AZ" || stateCode == "TX") {    //SR008-04X/I are always required in these states    attachDocument("SR008-04X");    attachDocument("SR008-04XI");  }  if (ledgerAmnt >= 500000) {    //Ledger of 500K or more requires AUTHLDG-1A    attachDocument("AUTHLDG-1A");  }  if (coInsuredCount >= 5  && orgStatusCode != "CORP") {    //Non-CORP orgs with 5 or more co-ins require AUTHCNS-1A    attachDocument("AUTHCNS-1A");  }}

Three (perhaps four) rules, 13 lines of code and three comment lines. Alex then went on to say

And then there was this one guy, James Taylor, who basically called me an idiot for suggesting that developers get their hands dirty with business rules. Apparently, we should all be building whiz-bang expert systems with fancy UIs that let the end user do all of the dirty work.

…such expert systems exist only in the land of pixie dust, unicorns, and lossless compression of random data

Well, I guess I did call him an idiot (more or less) for coding 3 or 4 simple business rules in code and arguing that was a good way to go – though quite what my post has to do with Expert Systems, unicorns or pixie dust I don’t know. I would no more suggest an Expert System for managing these rules than I would suggest hard coding them.

Now these are pretty simple rules and I am certainly not suggesting that if these were the only rules for this decision that it would be worth coding them in a business rules management system or BRMS. Despite the opinions of some of the commenters I am not, in fact, an idiot. But the decision “Identify Supplemental Documents” probably has more rules in real life than the example – I can’t believe, for instance, that only AZ and TX have state-specific rules. Given that, coding these rules in a business rules management system would be way better than just stuffing them into an ever-longer piece of code.

Now a typical business rules management system would probably give you very similar rules:

If StateCode is AZ then attachDocument(”SR008-04X”) and attachDocument(”SR008-04XI”)

If StateCode is TX then attachDocument(”SR008-04X”) and attachDocument(”SR008-04XI”)

If LedgerAmount is greater than or equal to $500,000 then attachDocument(”AUTHLDG-1A”)

If coInsured Count is greater than or equal to 5 and OrganizationCode is not “CORP” then attachDocument(”AUTHCNS-1A”)

There are not many differences here – a BRMS would let you use slightly more user-friendly terms for attributes, for instance, and avoid having to teach users what && or != mean for them to be able to read them. A BRMS could probably handle the coInsured Count declaratively so you would not need to maintain it as a separate variable but who knows – you might be doing this for some other reason anyway.

These rules are more approachable – they don’t have programmer speak in them – and they don’t require comments like those in the original code – but the changes are pretty minor. If I only had four rules, this would not be worth it. But if I had several hundred then my code starts to become voluminous and the ability to manage the rules becomes more important than the specifics of each individual rule. Using a BRMS I can:

  • Easily find all the rules that relate to a state or a document or that use a particular attribute
  • Check for contradictory or incomplete rules using the underlying logical structure of the rules
  • Log the rules when they fire for debugging or for compliance without writing any additional code
  • Have the lawyers or business people who know what the rules are interact directly with them
  • Have different groups or people manage their rules (TX rules v AZ rules, for instance) and easily combine them at runtime

There’s more but I want to finish the post today. The point is that coding these kinds of rules – rules that are largely independent of each other and that have high business/low technical content makes them harder to manage and harder to verify and keeps the business users at arms length.

Of course for some programmers, that’s the point – they like to keep their priesthood unsullied by non-programmers. These were the same programmers who insisted that business users could not build their own reports or manage their own business processes. Yet company after company has successfully empowered business users to do both these things. I guess some programmers will continue to lie down in the face of the bulldozers of progress but hopefully some will realize that some of the logic in their systems is not technically complex and can, and should, be managed by the business users who are deciding that that logic is.

As Jim Sinur over at Gartner said, If You Bury Key Business Rules, then You Will Bury Yourself


Link to original post

Share This Article
Facebook Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

New Data Analytics Breakthroughs Give eCommerce Startups a Fighting Chance
New Data Analytics Breakthroughs Give eCommerce Startups a Fighting Chance
Analytics Big Data Exclusive
data driven businesses
How Data-Driven Businesses Choose Storage That Reduces Risk and Drag
Big Data Exclusive
Operational Data Becomes Business Value in the Age of AIoT
Operational Data Becomes Business Value in the Age of AIoT
Big Data Exclusive Internet of Things
growth guide
Growing Smarter: The Role Of Strategic Partnerships From Startup To Scale
Infographic News

Stay Connected

1.2KFollowersLike
33.7KFollowersFollow
222FollowersPin

You Might also Like

Cultural Insights
Artificial Intelligence

Can AI Assist with Making Cultural Insights

7 Min Read

Simple Methods and Ensemble Forecasting of Elections

6 Min Read

The Agile Agency: creating the best conditions for awesome

7 Min Read

TDWI Boston Chapter meeting on April 9, 2009

4 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

ai is improving the safety of cars
From Bolts to Bots: How AI Is Fortifying the Automotive Industry
Artificial Intelligence
giveaway chatbots
How To Get An Award Winning Giveaway Bot
Big Data Chatbots Exclusive

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-25 SmartData Collective. All Rights Reserved.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?