Business logic is the abstract thought process behind decision making in human transactions. Translation of business logic into code is one of the major tasks in producing business software.
Questions tagged [business-logic]
626 questions
13
votes
4 answers
Where does business logic go in rails?
I'm an ASP.NET MVC developer just starting with my first big project on rails however Im confused as where to put your business logic? on ASP.NET I create a library which contains services(Domain driven design) which handle business logic, I have…

ryudice
- 36,476
- 32
- 115
- 163
12
votes
2 answers
How to avoid duplicating business logic across multiple different presentation layers
I am currently designing the architecture for an multi-channel commerce system which will have multiple different frontend presentations which are tailored to device and channel (user type and location). The challenge I'm facing is how to best…

zmcmahon
- 401
- 4
- 9
12
votes
8 answers
Handling errors and feedback when performing bulk operations in a multi-tiered architecture
Let's say you have a business logic method that can perform some operation across a number of objects. Maybe you want to call a lottery number picking web service, once for each person selected from a list. In Java, the code might look something…

Adam Batkin
- 51,711
- 9
- 123
- 115
11
votes
1 answer
How can developers let business users define application logic?
I'm working on a new application at work, and a manager is really pushing the concept of a business rules management system (BRMS) and a workflow management system, and I'm trying to figure out the best way of integrating these types of tools.
With…

Bret Walker
- 1,796
- 5
- 20
- 41
11
votes
2 answers
Event Sourcing: where to put business logic
I can think of two places where to put the domain logic in an event sourced system either one has a drawback.
In an event handler of the Aggregate, called locally after creating the event. (That's what I saw in most examples though most of them…

Marian Bäuerle
- 371
- 2
- 15
11
votes
6 answers
Business logic in Enums?
Is it considered good practice to put any type of business logic in Enums? Not really intense logic, but more of like convenience utility methods. For example:
public enum OrderStatus {
OPEN, OPEN_WITH_RESTRICTIONS, OPEN_TEMPORARY, CLOSED;
…

sma
- 9,449
- 8
- 51
- 80
11
votes
6 answers
Is it good to use check constraints for business rules
Currently we are using check constraints for business rules implementation, but I want to know if we should implement business rules in SQL or in the business logic layer (C#). I have searched on the net and found that check constraints are good to…

Punit
- 1,347
- 3
- 20
- 39
11
votes
4 answers
C# Windows Forms App: Separate GUI from Business Logic
I would like some advice on how to separate the UI and business logic in a simple C# Windows Forms Application.
Let's take this example:
The UI consists of a simple textbox and a button. The user enters a number between 0 and 9 and clicks the…

Happy Go Lucky
- 607
- 1
- 9
- 17
10
votes
14 answers
Business Validation Logic Code Smell
Consider the following code:
partial class OurBusinessObject {
partial void OnOurPropertyChanged() {
if(ValidateOurProperty(this.OurProperty) == false) {
this.OurProperty = OurBusinessObject.Default.OurProperty;
}
…

jason
- 236,483
- 35
- 423
- 525
10
votes
1 answer
Flutter Firebase BLoC pattern
I want to know how to manage BLoC pattern for Firebase.
I couldn't find any example of BLoC for Firebase so it might be broad but forgive me.
I saw some basic BLoC implementation but those were basically fetch data or updating view in a active way…

Daibaku
- 11,416
- 22
- 71
- 108
10
votes
1 answer
What is the difference between a web service and application layer of code in an application server
Hello I am a newbie to n-tier architecture and was trying to find out the difference between what an application server hosting application layer of code does, and what a web service does?
So I'll tell you people my understanding of the whole n-tier…

macha
- 7,337
- 19
- 62
- 84
10
votes
2 answers
Please explain the Repository-, Mapping-, and Business-Layer relations and responsibilities
I've been reading a lot about this stuff and I am currently in the middle of the development of a larger web-application and its corresponding back-end.
However, I've started with a design where I ask a Repository to fetch data from the database…

Stefan Falk
- 23,898
- 50
- 191
- 378
10
votes
12 answers
Enforcing an "end" call whenever there is a corresponding "start" call
Let's say I want to enforce a rule:
Everytime you call "StartJumping()" in your function, you must call "EndJumping()" before you return.
When a developer is writing their code, they may simply forget to call EndSomething - so I want to make it…

Jeff Meatball Yang
- 37,839
- 27
- 91
- 125
9
votes
2 answers
Where should the business logic be placed when using Doctrine 2 and Zend Framework
I've a question related to Doctrine 2 and Zend Framework.
If you use Zend Framework without Doctrine by default you place business logic in the models. But as Doctrine 2 does have Entities where should the business logic be placed?
I first had…

tom
- 8,189
- 12
- 51
- 70
9
votes
6 answers
What pattern/patterns work best for developing rule/decision engine
I am working on a decision engine / rule evaluation engine. For example:
Input: Customer and all the offences done by the customer
Output: Consequences of the offences
A sample case would be:
Input: Customer(Jhonny Chimpo, 999-00-1111), Offences (…

Perpetualcoder
- 13,501
- 9
- 64
- 99