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
    image fx (67)
    Improving LinkedIn Ad Strategies with Data Analytics
    9 Min Read
    big data and remote work
    Data Helps Speech-Language Pathologists Deliver Better Results
    6 Min Read
    data driven insights
    How Data-Driven Insights Are Addressing Gaps in Patient Communication and Equity
    8 Min Read
    pexels pavel danilyuk 8112119
    Data Analytics Is Revolutionizing Medical Credentialing
    8 Min Read
    data and seo
    Maximize SEO Success with Powerful Data Analytics Insights
    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

Advanced analytics, particularly predictive and statistical…
BI Vendors Use Communities to Serve Customers
Top Five AI-Driven Digital Marketing Tools in 2023
Stop Words for Social Media Analytics
Essential Elements of Data Mining


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

image fx (2)
Monitoring Data Without Turning into Big Brother
Big Data Exclusive
image fx (71)
The Power of AI for Personalization in Email
Artificial Intelligence Exclusive Marketing
image fx (67)
Improving LinkedIn Ad Strategies with Data Analytics
Analytics Big Data Exclusive Software
big data and remote work
Data Helps Speech-Language Pathologists Deliver Better Results
Analytics Big Data Exclusive

Stay Connected

1.2kFollowersLike
33.7kFollowersFollow
222FollowersPin

You Might also Like

C-level Execs: Big Data Means Big Value

0 Min Read

free access to BI…is business intelligence slowly becoming a commodity?

3 Min Read
ai is a dangerous weapon in the hands of hackers
Security

Hackers Use AI to Create Terrifying Malware Targeting Sandboxes

12 Min Read
AI analytics
AnalyticsArtificial IntelligenceExclusive

AI-Based Analytics Are Changing the Future of Credit Cards

6 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 chatbot
The Art of Conversation: Enhancing Chatbots with Advanced AI Prompts
Chatbots
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.
Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?