Questions tagged [business-logic]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
2answers
108 views

Getting the UI to know about Business Rules for Form Controls

Situation: VB.NET WinForms application, using the WinForms as a presentation layer project. Another class library project containing the business layer, in the form of CQS and Service classes, plus a ...
0
votes
1answer
77 views

Storing Sort Order in Database: match the business logic or the application logic? [closed]

Take a profile page for a job applicant with a list of names in a form with typical CRUD: Resume Name: Altenrate Name 1: Alternate Name 2: Alternate Name 3: Assuming we have some sort of Names table ...
1
vote
3answers
68 views

Keeping business logic separate from data access

Let's say I have few entity classes: class EntityA { LocalDate date1; LocalDate date2; } class EntityB { } class EntityC { LocalDate date1; } and I want to pass them through some logic containing ...
3
votes
1answer
136 views

How to make a business case for incremental product development

I don't work for an development company, but we have been working in partnership with one to develop an application for use internally within our business. The application is somewhat "niche&...
2
votes
3answers
148 views

domain model logic behavior (ddd)

How domain model capture business logic / domain logic since i cannot access repository? I see many posts saying that domain model = business objects But Business objects live in application layer (...
0
votes
2answers
75 views

Does it make sense to inform SPA frontend about business rules from the backend?

Let's say you have a user registration form in your frontend. In both, backend and frontend, password is valited so it has to match a set of requirements: more than 6 characters, no symbols, etc... ...
0
votes
2answers
148 views

Patterns for returning messages/results from business logic to UI

Cross-posting from SO. Is there a name for the patterns used send messages/errors and results through an application's layers from business logic/database to the UI? What is the modern way? For ...
0
votes
0answers
27 views

Appointment Reminder System Queuing Dates? (Logic Flow Question)

I'm tasked with modifying an appointment reminder system (.NET / EF6) that currently searches a database for valid appointments tomorrow (now + 1 day) and sends a simple reminder. The system needs to ...
1
vote
1answer
462 views

Where should "query" business logic be placed in Domain-driven design?

System description This is a simple eCommerce application containing a Products inventory managed by an Admin. The Products in inventory/repository will show in the User App. Admin has the ability to ...
1
vote
3answers
149 views

Is creating an entity in a database considered to be business logic?

According to my (perhaps incorrect) understanding business logic includes saving/updating entities in the database, as well as connecting with any 3rd party API's or using services and should ...
1
vote
2answers
111 views

Implement business logic as dictionaries of delegates

In my application I'm dealing with periods. A period is defined by it's end date. A period may shrink or grow, can restart and can have a priority. This is modeled using the following struct: public ...
1
vote
1answer
263 views

Upholding business logic and invariants in an event sourced CQRS architecture

My understanding of a CQRS architecture is that a micro-service is split to two servers each with its own database such that the first server handles all the writes and the second server handles all ...
0
votes
0answers
52 views

TransactionScope in DAO or in BLL (Business Logic Layer)?

I've been working with Entity Framework, Repositories, Unit of Work, DDD, CQRS... But I have an different challenge now...my company is working in the below architecture: Contrllers -> BLL (...
2
votes
1answer
150 views

How to model Business Objects depending on use cases?

I'm having trouble modeling the Business Objects of my application. In my domain I have substantially a list of bills of orders, and for every bill I have the pallet that contains the materials to ...
4
votes
1answer
677 views

Where should I place more complex business logic related to what a Web API does but consumed by a single client?

I have been debating with my colleagues about the following and we still did not reach consensus. The architecture is as follows: medium size monolith application for intranet usage a small ...
1
vote
1answer
217 views

Where to place the business logic for an external application that is tightly coupled with an internal application and how to adapt the architecture?

I and a colleague had a rather strange discussion with our boss related to the architecture of the applications we are currently developing. The C4 (second level) diagram of the existing architecture ...
2
votes
1answer
1k views

DDD and MediatR - where the Validation and Business Logic go

I'm trying to get to grips with Domain Driven Design and MediatR. A reaction to being involved with applications that favour Services for almost everything. I see so much value in DDD and I'm trying ...
0
votes
0answers
99 views

How to handle various types of custom logic in multi-tenancy architecture

In a microservice based multi-tenant web application, there are some cases of tenant specific logic where I am unclear about the proper strategy to handle them. Thank you for pointers. These two ...
5
votes
2answers
322 views

How to clean up a business logic class that does too many things without injecting a ton of classes into it?

Let's say we have business logic to perform in an MVC framework after a user submits a form: class BusinessLogic: def sendDataTo3rdPartyApi(self): # do stuff def validateResponse(self)...
3
votes
2answers
213 views

DDD, Aggregate Root and entities in library application scenario

I'm building a library application. Let's assume that we have a requirement to let registered people in the library to borrow a book for some default period of time (4 weeks). I started to model my ...
5
votes
1answer
327 views

Is My Data Access Layer Really My Domain?

I'm not an architect, but am trying to put together a diagram which represents the architecture of the application which I am maintaining. I have one question (but welcome any comments about the ...
3
votes
1answer
203 views

What domain objects might I need to represent a user and users profile in a forum web application

I’ve been trying to get a firm understanding of the MVC design pattern so that I can write my own framework for implementing the back-end of a forum web application using Slim 3. In particular, after ...
10
votes
5answers
622 views

Presentation Layer Accessing Business Logic

I've been reading a lot of material lately about DDD (business entity objects) and other common patterns in n-tiered(layered) architecture. One thing I have issue with is, most articles, blogs, ...
-1
votes
1answer
116 views

How to generalize this method for its duplicate/common logic?

I've a method that apparently has quite some duplicate logic, I'd like to generalize it so that their duplicate logic could be shared and reused, also make my code more extensible for future additions....
2
votes
3answers
311 views

Possible alternatives to excel as business logic implementation

I just started my internship as a computer science student. The project I'm working on is web based price calculation. Previously, the price calculation have been done in a quite huge excel ...
-1
votes
1answer
70 views

How process dynamic rules for product configuration?

I need to find a software architecture to support object configuration and validation in a dynamic environment. Lets say I want to configure a bike where I have many physical components available to ...
0
votes
2answers
816 views

DDD How to populate AggregateRoot from Repository when properties and collections should be readonly

If the entity should be always in valid state (therefore the properties are readonly and can be set only by methods which contains validation), How can I build this entity inside Repository without ...
-2
votes
1answer
169 views

Documenting business logics of legacy application having no unit test

I have joined a team in company and this team owns few services, which are used widely by many other user facing internal/external UI apps and other internal apis. My manager gave me rough idea that ...
14
votes
3answers
6k 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 ...
2
votes
2answers
127 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
1k 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 ...
2
votes
1answer
1k 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
1k 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
250 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
4k 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
862 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
146 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
95 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 ...
0
votes
2answers
2k 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 ...
13
votes
3answers
449 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)...
3
votes
2answers
1k 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 ...
6
votes
3answers
5k 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
242 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 ...
4
votes
4answers
5k 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
938 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
84 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
76 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 ...
6
votes
3answers
349 views

Is it good practice to put service business logic based on audit trail?

Our application creates audit trails in response to system actions and user actions. Our business logic depends on these audit trails to find out which user performed what action. Is it good practice ...
4
votes
3answers
282 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
114 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 ...