Skip to main content

Questions tagged [layers]

Layer (or abstraction level, or a layer of abstraction) is a way of hiding the implementation details of a particular set of functionality.

Filter by
Sorted by
Tagged with
2 votes
1 answer
157 views

Should our api-response-to-domain-entity transform functions be in the API/Infrastructure layer, or the Domain layer? We have a react-native mobile application written in TypeScript. We have separated ...
Nick's user avatar
  • 29
0 votes
2 answers
259 views

Some years ago, I started using a particular architectural pattern that proved itself useful on a significant number of projects. It includes the following concepts: Presentation Layer/Tier that ...
OzrenTkalcecKrznaric's user avatar
6 votes
2 answers
5k views

In a legacy project's service layer, there are tens of service classes and among them there is one service, UtilityService using 2 other services: class UtilityService{ private UserService ...
Rui's user avatar
  • 1,935
0 votes
1 answer
214 views

I'm building a mobile app in Flutter, and the project has several distinct layers. The top part is something better described as MVVM: dumb View layer that performs rendering and delegates actions to ...
afrish's user avatar
  • 103
1 vote
2 answers
211 views

I have a custom repository for each entity/module (I'm working with NestJS). I know that this is a lot of repeated code and I may refactor it in order to use a generic repository later, but currently ...
Thiago Dias's user avatar
0 votes
1 answer
342 views

Say I have a simple layered .NET application, with three layers: API Adapters Application The application layer needs to use some typed http clients to communicate with external APIs. This means that ...
Jakob Busk Sørensen's user avatar
2 votes
3 answers
1k views

Overall cost and simplicity are the primary strengths of the layered architecture style. Being monolithic in nature, layered architectures don’t have the complexities associated with distributed ...
Gill Bates's user avatar
0 votes
0 answers
29 views

We all know that in a layered backend architecture we have the Controller (or view) > Service > Repository (or Manager) The Repository part is the part that retrieves and updates the DB. But now ...
Dany Y's user avatar
  • 143
2 votes
3 answers
170 views

In a Flutter app I'm developing, I have a class hierarchy of model objects of a certain base class. To take a typical example, the abstract base class could be Vehicle. Then I have a (pretty much) ...
Anakhand's user avatar
  • 149
5 votes
2 answers
735 views

Overview I am tasked with designing a system that serves as an Interface between a User and one or more microcontrollers in different Variants. As an example, our Microcontrollers Type 1 are milk ...
UnbescholtenerBuerger's user avatar
1 vote
0 answers
141 views

I'm trying to make a simple Blog-application, but I'm a bit stuck on the architecture of the application. I'd like to create a details-page with the content of the blog-post and a form for adding ...
Sam's user avatar
  • 65
1 vote
0 answers
131 views

I built an asset management system (a web application) using C# ASP.NET in MVC structure. My project is built upon the ASP.NET Boilerplate template, which includes 5 layers by default. These layers ...
Emre Can Serteli's user avatar
-1 votes
1 answer
76 views

I work with csv files that after some steps provide the initial data, and with a database that is derived from this data. The database then is read from and written to in many different ways by the ...
Miles's user avatar
  • 101
0 votes
2 answers
1k views

I am refactoring a legacy codebase of an Angular SPA. The central entity of the app is the chat room, and there is a plethora of ways on how to enter a chat from different views all across the app. ...
user2195738's user avatar
2 votes
2 answers
288 views

I am facing a common situation where I am saving some values into database from a business object. I am using a relational database and usually I only need to save a few items that are part of the ...
Dennis's user avatar
  • 8,267
2 votes
2 answers
737 views

I am trying to understand layered architectures and apply some DDD fundamentals to improve my architecture. I am finding that determining "what" an application service actually is, what its ...
Patrick Christie's user avatar
4 votes
1 answer
255 views

I'm developing an application with DDD pattern with three layers: API Domain DB After adding a new field to the domain object, I realized that many places need to change. Imagine the following model....
Glyphack's user avatar
  • 151
0 votes
1 answer
173 views

I have three layers. I wish to reduce coupling between them and other modules. I wish to use the command pattern between all layers. A command should be able to be passed from one layer to another. ...
reign's user avatar
  • 125
2 votes
2 answers
3k views

I have inherited a badly architected and organised ASP.NET MVC application, which is an online booking system for healthcare providers. It seems to have been designed with very few object oriented ...
Daniel Vernall's user avatar
0 votes
1 answer
322 views

Assume an application architecture with three layers (presentation, domain, data access - though presentation is irrelevant to this question) that follows dependency inversion: The domain layer ...
hingst's user avatar
  • 29
5 votes
1 answer
1k views

The application I am working on is written in TypeScript and I need to manipulate DateTime. I always avoid doing date/time calculations manually, because they have a lot of edge-cases. The Date class ...
Andrey Tsarev's user avatar
0 votes
1 answer
299 views

Imagine an http request in a RESTful API that needs to request the database to perform validations before proceeding, but some of those database requests would need to execute again if the validation ...
underthevoid's user avatar
0 votes
3 answers
1k views

Exogenous exceptions are that kind of exception that are unavoidable because they are throwed outside of our system's pristine logic. A good practice is to throw wrapped exceptions in lower layers ...
Scover's user avatar
  • 5
-2 votes
2 answers
153 views

Lets say we have a table 'A' with 4 referenced tables : Table B,C,D,E In our Data Acces Layer we could write a method that returns Table A containg every entity of B,C,D,E by joining in order to reuse ...
Michael's user avatar
0 votes
1 answer
117 views

According to the definition by Robert Martin, high level modules should not depend on low level modules, instead both should depend on abstractions. So if I have a domain entity Invoice that uses an ...
Hans's user avatar
  • 572
7 votes
2 answers
10k views

I have a RESTful API service that has three layers: Application/Domain, Infrastructure, and Presentation. Application/Domain contain my interfaces and models. I currently have three different types of ...
brandon d tran's user avatar
0 votes
2 answers
2k views

I’m pretty sure I’ve made some wrong assumptions in my questions so bear that in mind. At some point, the methods inside objects that are part of the persistence layer will be called/accessed for say… ...
qUneT's user avatar
  • 53
-1 votes
2 answers
236 views

I'm creating a .Net 5 API backend and use EF Core for the database part. The simple CRUD way I know: API layer calling a command or query from the application layer using MediatR Application layer ...
Question3r's user avatar
0 votes
2 answers
2k views

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 ...
GisMofx's user avatar
  • 379
3 votes
1 answer
457 views

As I understand, when following the Low Coupling High Cohesion Principle, I should keep together the code that is related to same theme, splitting the code into modules/submodules by its "domain&...
whyer's user avatar
  • 139
0 votes
2 answers
224 views

Reading a little bit about Functional core & imperative shell pattern, I am wondering if the DI principle can be improved. What happen if instead of having an Infrastructure layer depending on ...
Leonardo Mangano's user avatar
2 votes
0 answers
644 views

I am trying to come up with a design for an application I am working on. Here is a basic picture of what I am looking to do. Everything up to the Data Layer is totally fine but the Data Layer makes ...
Muhand Jumah's user avatar
3 votes
1 answer
9k views

This is my first time I am using repository pattern and applying a layered architecture in a project. I have followed the article found here. The complete code found on the article can also be found ...
Subliminal Hash's user avatar
4 votes
3 answers
3k views

Is it a bad practice (or maybe anti-pattern) to have service to service dependency in the layered architecture? I've noticed that when an application is designed in a way that a service can call ...
Ali's user avatar
  • 149
0 votes
1 answer
186 views

We have structured our application with typical layers. UI, Database access, services, Helpers etc. However, at the very top we have a project called "Interfaces" which contains the ...
Zuldaan's user avatar
  • 99
2 votes
1 answer
934 views

In discussion about an architecture decision that we do consider wrong and how exactly to address it, some lack of understanding on the matter arose. In dealing with authentication and authorization, ...
Pedro Rodrigues's user avatar
3 votes
3 answers
565 views

I'm working on a spring boot REST service. It's divided into three layers: REST controllers, services, persistence/DAO. We have multiple services and persistence repositories. We have the following ...
naike's user avatar
  • 39
0 votes
2 answers
514 views

I am playing with my simple personal project - a simple REST API application and I am currently struggling with a kind of design problem. The problem: How to insert an operation ID (request ID, an ...
pstanko's user avatar
  • 54
1 vote
1 answer
1k views

+-------------+ +--------+ +----------+ | repository +-------->+service +------->+controller| +-------------+ +-^------+ +------------+ +-------------+ | ...
poppycockears's user avatar
0 votes
1 answer
100 views

I designed a rest api software with 2 simple layers: Controller and Service. The controller handles the coming http request and redirect to a service method. In the beginning of development every was ...
josev.junior's user avatar
1 vote
3 answers
726 views

I'm learning about the Layered Architecture Pattern for Software Development but I'm confused on how objects are sent 'up' the layers. In general, I know that there are about 4 main layers: ui layer, ...
Golden's user avatar
  • 27
0 votes
1 answer
3k views

I've to implement some Backend Webservices, which provide a given, final JSON structure, which is allready in use on the FrontEnd side. This structure doesn't match the database structure, so I have ...
user2622344's user avatar
1 vote
2 answers
102 views

When using data and domain models, where does validation take place? Both or just For example: class UsersDB(): def create(self, user_data): # Create user here return ...
Slepton's user avatar
  • 51
4 votes
2 answers
2k views

Background In Uncle Bob's Clean Architecture, use case interactors are responsible for the orchestration of business objects to accomplish some user goal. As an easy example, an e-commerce application ...
Nicholas Miller's user avatar
7 votes
3 answers
15k views

In this github, https://github.com/johnph/simple-transaction, under the Transaction.Framework project, there are entities (located at Data/Entities) AccountSummaryEntity.cs AccountTransactionEntity ...
Steve's user avatar
  • 309
5 votes
1 answer
1k views

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 ...
onefootswill's user avatar
-1 votes
1 answer
286 views

Here is part of an ASP.NET MVC program, from https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/controller-methods-views?view=aspnetcore-3.1 : A model class Movie: public class ...
Tim's user avatar
  • 5,565
1 vote
2 answers
1k views

I am designing an application using C# and Windows Presentation Foundation (WPF). I would like to follow (at least) the very basic rules of software architecture, like dependicies only going in one ...
Jakob Busk Sørensen's user avatar
2 votes
2 answers
276 views

I'm trying to split the use of a business entity (e.g. a post) thought an application uses, trying to obtain a clean architecture So I will likely have: A class model, where the business logic lives ...
Tizio Fittizio's user avatar
2 votes
1 answer
159 views

I am developing an architecture for a new MVC system. The legacy system has a layer it calls "facade", but it is not the classic GoF Facade. It is more like a service aggregator. It is used as a ...
jkilgrow's user avatar
  • 147