Questions tagged [business-rules]
67 questions
218
votes
18 answers
How can one manage thousands of IF...THEN...ELSE rules?
I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in any landscape. They are affected by things like…

David
- 4,449
- 6
- 35
- 48
147
votes
10 answers
How much business logic should the database implement?
I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this is a bad practice ("Databases are there to store…

Raphael
- 1,987
- 2
- 16
- 15
46
votes
5 answers
Should an e-commerce application reserve products before attempting payment?
I'm designing an e-commerce application and I'm concerned about users occasionally experiencing this:
A user orders a product and is redirected to the payment processor.
While the user is paying, another user orders the product and it's now out of…

paj28
- 1,663
- 1
- 13
- 13
32
votes
2 answers
What does "business logic" actually mean if not "all non-3rd party code"?
I've heard people talk about business logic a lot at work, and online, and I've read several questions on this site about it, but the term still doesn't make a lot of sense to me. For example, here are some (paraphrased) statements I often…

Ixrec
- 27,621
- 15
- 80
- 87
25
votes
4 answers
What exactly is a business rule?
I'm trying to better organize my application architecture, so I've been doing some reading, but I keep running into references to "Business Logic" and "Business Rules". I've never really understood what these actually are. I generally just focus on…

hal
- 396
- 1
- 3
- 9
25
votes
4 answers
Is BDD actually writable by non-programmers?
Behavior-Driven Development with its emblematic “Given-When-Then” scenarios syntax has lately been quite hyped for its possible uses as a boundary object for software functionality assessment.
I definitely agree that Gherkin, or whichever feature…

MattiSG
- 1,932
- 2
- 13
- 16
21
votes
4 answers
Clean architecture validation in domain vs data persistence layer?
I'm studying up on clean and as a result am quite dramatically rethinking a great deal of how I design and write software.
I've thing I'm still wrestling with however, is for business rules like "on save updates to some item, first load All the list…

Dale Holborow
- 321
- 1
- 2
- 7
21
votes
7 answers
How do I manage a very large set of rules and magic numbers in my program?
I'm somewhat new to programming (I'm a mechanical engineer by trade), and I'm developing a small program during my downtime that generates a (solidworks) part based on input from various people from around the plant.
Based on only a few inputs (6…

user2785724
- 321
- 1
- 7
19
votes
7 answers
Business Objects - Containers or functional?
This is a question I asked a while back on SO, but it may get discussed better here...
Where I work, we've gone back and forth on this subject a number of times and are looking for a sanity check. Here's the question: Should Business Objects be data…

Walter
- 16,158
- 8
- 58
- 95
17
votes
4 answers
What is the difference between business and application logic?
Please note that I asked the same question on stackoverflow but they directed me to ask here.
While I am trying to discerne the difference between the application logic and business logic I have found set of articles but unfortunately there is a…

Mo Haidar
- 507
- 2
- 4
- 9
17
votes
6 answers
Representing business rules with exceptions
I know it is expensive but (IMO) I believe it is a very good practice. I'm talking about rules like say, you can't save an Invoice if you are not a sales person... so in that case throwing an exception saying 'your are not authorized' or…

sebagomez
- 432
- 4
- 11
15
votes
6 answers
How to document business rules
I am wondering what would be the formal and the most commonly practiced method of documenting business rules? Also how do you document the UI specifications of development artifacts (e.g. Documenting form fields and how buttons behave on form, info…

Maro
- 269
- 1
- 2
- 6
13
votes
5 answers
How to fit a rules engine in a microservice architecture when it requires lots of input data?
Current situation
We are implementing (and now maintaining) an online shopping web application in a microservice architecture.
One of the requirements is that the business must be able to apply rules on what our customers add to their cart, in order…

Didier L
- 241
- 1
- 2
- 9
11
votes
2 answers
Has anyone successfully used Windows Workflow for a Business Rules/Validation engine?
I was wondering if anyone has successfully used Windows Workflow Foundation for a BusinessRules/Validation engine, or if you know of some sample code or articles about this.
If you have used it before, what do you think of it? How is it compared to…

Rachel
- 23,979
- 16
- 91
- 159
11
votes
4 answers
As a programmer, how can I speed up my adoption and understanding of business rules?
I've been a developer for a while. I'm far from the best out there. (As I sit by myself in this room, I wonder if I'm even the best in here.) However, I've come to understand my tools, and I've come to trust in my ability to reason and learn.
When…
user26452