Questions tagged [business-rules]

68 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…
151
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…
45
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…
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,711
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…
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,952
  • 2
  • 14
  • 16
22
votes
5 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…
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…
20
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
  • 537
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,136
  • 8
  • 59
  • 95
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…
16
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
  • 279
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…
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…
11
votes
7 answers

How to define complex business rules using User Stories?

A quick and dirty definition of User Story: "As a , I want so that " In this commonly accepted definition there is little space for defining business rules, constraints or user input. Trivial example just to…
Pomario
  • 1,309
  • 2
  • 13
  • 26
1
2 3 4 5