Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [business-logic]

The tag has no usage guidance.

-2
votes
0answers
35 views

Dealing with hierarchical rules

I want to configure hierarchical rules such as - Rules --------------- dimension_1: * dimension_2: * value: val1 dimension_1: abc dimension_2: * value: val2 dimension_1: xyz dimension_2: * value: ...
6
votes
3answers
532 views

Where should business logic sit in microservice architecture?

Still trying to wrap my head around microservice architecture since I'm used to a monolithic approach Suppose we try to build a extremely simplified Uber booking system. To simplify things we let's ...
3
votes
2answers
88 views

How thoroughly should you document business flows for a product or system you are learning?

I work on applications that have user documentation but it is not organized or updated to the current release. Is it worth my time to create my own documentation with screenshots and notes on all the ...
3
votes
3answers
219 views

Aggregation of data from two Microservices

I have two Microservices A and B. B Microservice has a large set of an entity called User. A Microservice stores the User entity in its own DB if User is configured by an agent. There is no flag ...
0
votes
1answer
135 views

In MVC + SOA Architecture, What is the Rationale for Placing Business Logic in Models?

When writing web applications I place business logic in controllers. This has worked well for my small App Dev team- our applications run reliably, perform well, and the code is easy to maintain. ...
4
votes
2answers
238 views

How to keep track of growing catalog of business rules?

Building my last application, everbody started to lose control over the increasing complexity of business rules, which would be added every week - most of all the app owners themselves. In the end, we ...
2
votes
3answers
176 views

What defines a business rule, as opposed to application or presentation logic?

The way I explain it to myself is that a business rule is a requirement for a domain concept of an application. One of the core tasks of my current app is to send notifications. Therefore I have a ...
3
votes
3answers
822 views

Business Logic Entities and Data Access Layer Entities

I am thinking on how to structure a project. I wonder if it is a good practice to use different entity classes between the BL and DAL in order to decouple these layers. I have worked on projects ...
1
vote
4answers
202 views

Rules engine suggestion for hard coded if-then-else

Reposting question as Previous post on same Topic was not clear. Currently our financial application receives multiple feeds in csv format from client, there are usually 100k to 5M rows of data. ...
1
vote
1answer
95 views

Where to put intermediary business logic in a backend

Consider you have a GravityLogic and a WeakForceLogic class. In themselves both provides tons of business logic. Now you want to create interactions between those which produce a complete different ...
0
votes
1answer
40 views

Function for processing files: Business Layer, Service Layer, or anything else?

I read that Repositories should not refer to other repositories. I have a method ProcessFile that refers to multiple repositories, it parses a file, and inserts into many table models in different ...
-3
votes
2answers
248 views

data vs business logic

Today my manager said: 'Amir, don't mix the business logic with data in database'. I surprisingly shocked! I said 'Where?'. According to wikipedia business logic is: In computer software, business ...
0
votes
0answers
196 views

Fluent validation - integrate in my business objects best practices

I am involved in the development of a price engine system. I have a set of business objects like Car, Engine, Wheels, etc I want to validate them using the framework Fluent Validation Here an example:...
13
votes
3answers
399 views

Using static type checking to protect against business errors

I'm big a fan of static type checking. It prevents you from making stupid mistakes like this: // java code Adult a = new Adult(); a.setAge("Roger"); //static type checker would complain a.setName(42)...
2
votes
2answers
327 views

DDD - delegate business rule of domain object to external service

Situation: I am implementing DDD in my first project and I would like to clarify how to correctly implement strategy pattern (in my case check if API token is active). This is a business rule of ...
3
votes
3answers
2k views

Onion architecture: layer placement of business logic

Where should the business logic for a project that utilizes Onion Architecture be placed? In my case, it's a C#-based project, utilizing Web API and possibly a MVC UI for the presentation. But ...
2
votes
2answers
109 views

Communicating the intended operation of API business logic to both developers and business people

Currently, I'm designing the intended operation of a (RESTful) API which a team of developers will eventually build. I'm not concerned with implementation details, as long as inputs are correctly ...
1
vote
0answers
152 views

Business Logic: 3-Layer-Architecture and Rich Domain Model

I have some questions about the "best" underlying architecture of software projects. I know, that there are different similiar posts but I'm really confused because it seems that everybody is telling ...
1
vote
4answers
1k views

Separation of application logic and domain logic in Clean Architecture

I'm struggling with the separation of logic between entities and interactors or Use Cases. If I design the entities with DDD principles, each entity would have methods corresponding to use cases, ...
3
votes
1answer
327 views

How to organize business logic which deals with different, but related objects

The task The piece of software I'm writing operates on the following object types: Agents Calls CallQueues These objects can be linked together, and each of them contains some additional ...
0
votes
1answer
62 views

Is it ok to have transaction at Presentation level?

Let's assume that I have an Order object that has a List<OrderItem> , the user goes to page and creates his order, now I should save his selection to the database, I have two data service ...
0
votes
1answer
75 views

Avoiding concrete references, should expressing relationships be an exception to the rule?

I have a critical business object GroupMembership that represents the relationship between an user and a group. I have set an architectural policy that critical business objects should avoid ...
0
votes
0answers
92 views

Adding Business Logic into typical MVC + EF structure

We are writing a .net Core MVC Web application, but I think this is a general programming question. This is typically the structure we use with our .net Core MVC Web applications, using dependency ...
4
votes
3answers
144 views

Does Presentation Logic constrain design of Business layer?

We have an email plugin which encrypts a mail's attachments when the user sends an email and gives the mail's recipients permissions to decrypt the attachments. The recipient permissions are stored on ...
-1
votes
1answer
87 views

Should we implement the state machine logic near the data in the “persistence” layer, or bring the data out and implement it in the “listener” layer?

The implementation is MVC. The View is isolated to the browser layer. The Model is isolated to the persistence layer. The Controller is split with: UI controls in the browser mostly so input is ...
6
votes
2answers
1k views

Should Extensions methods be used for Business logic

In C# we have Extension methods. Extension methods enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. ...
5
votes
1answer
125 views

Should data model logic live in database schema?

(Apologies if some of my terminology is off, I have not seen much on this subject and am using be best terms I could come up with) Should data model logic live in the database schema? I am making a ...
0
votes
2answers
159 views

Where should I enforce that an entity has between 0 and 7 attributes

Background I need to implement a URL whitelist to limit the number of pages that a javascript widget can be deployed on. The requesting domain is already limited for an account, but I now want to ...
3
votes
1answer
684 views

Domain Objects and How they Access the Database

Suppose I have the following class: public class Course { // data public string Name { get; } public List<Student> Students {get;} //... // logic public int ...
-2
votes
1answer
38 views

Sharing business logic - Web App and Scheduled tasks

Is that okay to share the business logic between a web application and scheduled tasks. Or should the business logic of the scheduled tasks be separated. Currently some of the methods of the business ...
0
votes
1answer
110 views

BLL Layer with physical file path

So I am working on an existing website project that has a BLL layer with some functions that use physical file paths. But now I am creating a console app that will be setup as a windows scheduled ...
0
votes
2answers
204 views

Where to put code for XML Deserialization: Business Logic Layer or Data Access Layer?

I have a web application (ASP.NET Core / C#) with 3 layers (web/presentation, business logic and data access). I'm using Entity Framework to retrieve a record from an SQL Server database which is ...
1
vote
1answer
26 views

is the logic defining how the data should be converted in different formats, presentation or business logic?

In a calendar app adopting a MVC architecture, the Model consists of objects representing the days of the week. The View consists of labels displaying the days as strings or integers, depending on ...
17
votes
2answers
5k views

How exactly should a CQRS Command be validated and transformed to a domain object?

I have been adapting poor-man's CQRS1 for quite some time now because I love its flexibility to have granular data in one data store, providing great possibilities for analysis and thus increasing ...
3
votes
1answer
75 views

Best practices for dynamically-evaluated dates in system?

Let me introduce you into a minimalistic and made-up case with real-case chronological order, updates and problems. User with ID only I had a system, and it had User entity with ID column only. So, ...
5
votes
2answers
2k views

How to structure business layer logic (app with much complicated business layer logic, calculations etc.)

We are developing a.NET web application that uses WebApi. We have separate layers: UI (HTML, CSS, js etc.) ApiController - receives input DTOs from the UI and calls the appropriate endpoint in the ...
1
vote
3answers
665 views

Organisation of complex business-logic (set of rules)

I have 20 entities and 50 user requests. And i have very complex business-logic (set of rules). How can i make my architecture so I'm not confused when adding new rules. Now if i add property "...
7
votes
1answer
14k views

Business logic vs Service layer

I read this answer: https://softwareengineering.stackexchange.com/a/234254/173318 please correct my understanding. Business rules refers to list of steps of business in real world (no codes). ...
0
votes
3answers
2k views

How to implement business logic with Web Services?

I'am little confused about how business logic should be implemented using web services. For example, think about an education management application. There are simply students, teachers and courses. ...
0
votes
2answers
1k views

How To Design BLL in ASP.NET MVC

I'm trying to design a N-Tier Solution for my existing WebAPI project. I have a WebAPI project where, as of now, all the business logic are written in the controllers and the data validation are done ...
7
votes
3answers
3k views

How acceptable is to keep business logic outside entities (in separate service classes)?

We were taught that objects are self contained things with data and behaviour and therefore they should have methods that act on their attributes. But there are several situations when this coupling ...
6
votes
2answers
326 views

Separating business logic on code

I have a Category and Product tables in database and classes on project. Category class has {id, Name} properties Product class has {id, Name, CategoryId} and other relations. And I have repository ...
3
votes
3answers
154 views

Can a default value for a business process be set in the database column definition?

The business team in my company has come up with a new field to add to one of our entities. For new instances of this entity, it'll be calculated dynamically, but for previously existing instances, we ...
2
votes
4answers
302 views

Design: Should Undo/Redo functionality be part of the business layer of an app?

We're developing a big application with a vast GUI and complex business layer. Without going into too much detail, the application is currently implemented in a rich native client, but functionality ...
11
votes
3answers
1k views

Entity Framework and avoiding the Anemic Domain Model

In our business logic we occasionally have methods defined something like this: User.ResetCourse(Course courseToReset) The problem is that both User and Course are Entity Framework proxy objects. ...
2
votes
4answers
89 views

Should I unit test the consuming class or the class running the logic?

I have a similar scenario to this: public class VatCalculator { public decimal GetValueWithVat(decimal value, decimal? vatRatePercentage) { if(vatRate == null) { ...
0
votes
1answer
775 views

Decoupled architecure between business and data layers in Spring JPA / Hibernate

I'm using Spring Boot with JPA / Hibernate and I'm trying to decouple the business layer from the data layer. I would like to be able to (relatively easily) switch from a relational database to a rdf ...
0
votes
1answer
75 views

Best practice for Managing 1200 Counties data for 56 states

I have a complex problem to be solved, I have several excel files containing data from over 1200 counties from 56 states. Problem is that most of the counties has some columns which are different from ...
2
votes
2answers
135 views

Should this be on the level of ORM or level of business objects?

We have three levels of code in our big and complex Web site: plain SQL (in fact Perl DBI), a primitive ORM (we wrote our own primitive ORM, because DBIx::Class appeared too slow in our environment), ...
3
votes
1answer
99 views

in which layer should “partial” BL method be placed?

I have a project and I follow Repository and UoW patterns. I also have a "service" layer which I also use as my BL layer. Taking for example a Customer domain model, I might have information that I ...