11

I just posted a question about business rules in MVC views; when going to tag the question I was looking for business-something and found the and tags, neither of which have a tag wiki.

business-logic seems to be more used with 80 questions tagged vs business-rules at 37.

Is there a difference between the two? Should they be merged?

3

Wikipedia says:

In computer software, business logic or domain logic is the part of the program that encodes the real-world business rules that determine how data can be created, displayed, stored, and changed.

I wouldn't be opposed to merging the two into the more popular , I almost wonder if the tag shouldn't be changed to (which doesn't exist right now). I think "domain logic" is more general and would be preferable.

  • 2
    Your idea about merging all those tags to domain-logic tag sounds very good, but to me it sounds like it's a DDD-ish term . Although I have noticed that many people asking about business-logic and business-rules are just mostly stuffing logic and rules into service layers and using aenemic models. – kayess Feb 24 '16 at 12:02
  • 4
    Also consider that "business logic" is a very well-known term in our field: we would need a tag alias as well because someone would just recreate it. – user22815 Feb 25 '16 at 17:33
  • Domain logic seems too specific to DDD, IMO, which may not even be appropriate depending on the complexity of the solution needed. – Andy Mar 1 '16 at 1:44
  • @Andy Domain logic isn't specific to DDD. I wouldn't be surprised if DDD co-opted the term, but traditionally, domain logic is how the software encodes the rules about how data is interpreted, manipulated, or stored. You don't often find people who make scientific software or aerospace software talking about "business logic" - their software doesn't encode business rules. It encodes rules about the domain the software exists in, usually based on physical science principles. – Thomas Owens Mar 1 '16 at 14:18
  • In my career, I've (rarely) heard the term domain experts referring to the business people/analysts. The more common is subject matter expert (if they even got so formal), and never encountered "domain logic" until I started hearing about DDD, which is itself still unknown to a sizable portion of engineers. I'm not the only one that commented that domain logic migh be to DDD specific either. I think the fact that there is no domain logic tag but we have both business logic and business rules already backs up my point. – Andy Mar 2 '16 at 0:51
3

I consider that Business Rules are the business's rules, that is, policies determined by the business, i.e. specifically by business experts and those in charge of the business, who are likely non-programmers. (https://en.wikipedia.org/wiki/Business_rule)

I consider that logic is programming and thus associated more with IT than business leaders and domain experts, and therefore, Business Logic is the embodiment of (some of) Business Rules in IT systems and applications. (https://en.wikipedia.org/wiki/Business_logic)

Being rather different things, it would be a mistake to merge the terms Business Rules and Business Logic.

(A rules engine, combined with a set of rules for it (in whatever specific and limited form the engine takes) is an embodiment of business logic (but there will have to be other business logic as rules engines broadly can't accommodate all of a business's rules). It is often the case that IT takes over common terms and gives them more limited meaning, such as thinking of Business Rules as the actual rules (i.e. programming) that you'd feed to a rules engine! Rules engines execute rules-engine rules (programming), not Business Rules.)

  • Logic = programming is silly. The business says orders over 50 can qualify for free shipping, that's business logic. Or, the rule is orders less than 50 can't get free shipping. – Andy Mar 1 '16 at 1:41
  • 1
    @Andy, try again: neither domain experts nor business leaders would refer such a bit of business policy or a business rule as "logic". Programmers call it logic. – Erik Eidt Mar 1 '16 at 3:53
  • Wrong, I've had plenty of customers that called it business logic, without any prompting from me. And even if i were to go along with your definition, its still silly because the code is the expression of the logic/rules which the business decided upon; IT just makes the system obey the rules the business sets forth. – Andy Mar 2 '16 at 0:47
  • @Andy, well, maybe you should inform Wikipedia, as well. – Erik Eidt Mar 2 '16 at 1:01
  • 2
    No one in the auto industry calls emission specifications, emission controls, emissions regulations "emissions logic" or "emission control logic", though software programmed to follow the emissions specs can be referred to as emission control logic. No one practicing health care refers to medical logic or health logic, however, a software expert system that codifies such medical knowledge could be referred to that way. No one calls tax regulations or tax forms "tax logic", but software that helps with taxes can be. It's the business domain vs. the IT domain (programmers). – Erik Eidt Mar 2 '16 at 1:01
  • IMO business-rules are a part of business-logic, which can be expressed as rules. It's not the same. – Maciej Chałapuk Mar 4 '16 at 10:17
0

rules are rules and logic is the logic, if you know meanings of these than you see that it is different :) Assume you are in army where lots of rules are. you may not do that, you may do that bla bla bla. These are the rules of the business, which is summed up for you to stay in live. When we come to logic, you have to make decisions on the situation. So if you are going into an action with some badguys you make decisions, these decisions are the logic.. but you know that you make these decisoins in circumstances of the learned rules. Then is the logic itself the rule or is it the different sums of some rules for different situations? Yes we can talk about that, it is the sum of some rules that apply for the situation, I liked it :)) no, no, no do not merge rule with logic...

-2

I would say these tags are different. Business logic is the domain-specific logic of a business application, while business rules are usually relatively small isolated pieces of the business logic that can be encapsulated in a rules engine.

  • 2
    there is a rules-engine tag that seems to cover business rules when asker mean them the way you wrote. Askers of most questions in business-rules tag seem to use it differently (yesterday I retagged to rules-engine a bunch of questions which were focused on it) – gnat Feb 22 '16 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .