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
1
vote
1answer
6k views

What is the best way to get a list of Business objects from a list of entities?

I am using entity framework to get a IEnumerable<CustomersEntity>, and I need to cast this to a IEnumerable<CustomerBO> to display it in some view. I know how to do cast a IEnumerable<...
1
vote
1answer
1k views

Confused about layered application development

So, for the first big project that I'm getting paid for, I decided I'd do things right. To that end, I've created several projects in my Solution. Some of these projects are generic and handle common ...
1
vote
1answer
535 views

Lazy Loading, DAL and BLL abstraction

I'm asking myself a question to code the right way on a new fresh project. I have a designed database and I mapped tables to equivalent POCO classes using Entity Framework 6 Code First. Then, I ...
1
vote
3answers
942 views

Event driven design and separation of core/UI logic

I am new to event driven development, and I feel lost when I try to implement events that should pass the core/UI boundary. In my program I have the following (example in c#): UI.RuleForm Core....
1
vote
2answers
121 views

Check permissions on top layer before going deeper

I'm building a four layer simple architecture with the following layers: Controller Actions and Events Repositories, that returns single entities or collections Models, where the SQL code resides ...
1
vote
1answer
118 views

How should we approach layered-architectures that need large amounts of continuous, real-time, communication?

Background In much of the literature I've read online with respect to multi-layered architectures, many people describe how to create the simple application where: UI presents static model objects ...
1
vote
1answer
104 views

Software layers and data mapping

Before I would ask my question, here is the context: I am working on one part of a relatively big software. In its simplest form there are 3 layers of the software lets call them lower layer, middle ...
1
vote
1answer
186 views

Data transfer between modules (layers)

I'm creating an application that is composed using different modules (core, course, grades, news). I'm using clean architecture for the different modules but I'm stuck trying to pass data from one ...
1
vote
2answers
695 views

A way to keep object between layers decoupled?

I think this is a common design problem, but I keep scratching my head every time I face it. On one side, we have our API which sends or receives simple structures aimed to be consumed by web apps, ...
1
vote
1answer
767 views

Layer application and token authentication

Suppose we have an application with multiple layers in .Net: Domain layer (entities) Data access layer (entity framework) Business layer Web Services layer (Web Api) Presentation layer (MVC) Now I ...
1
vote
1answer
44 views

Can an outside component interact with lower layers directly in a strictly layered architecture

If we have a strictly layered architecture, can we allow outside components to interact directly with the lower layeres? More specifically: In my lower layers, I am providing a service, and in the ...
1
vote
1answer
1k views

Where does non-MVVM code belong in an MVVM app?

By non-MVVM code, I mean things like highly generalized components, like one with common extension methods for CLR types, and other 'homeless' helper classes etc? I have a Core project that most ...
1
vote
1answer
1k views

Effective programming of data layer management/access

Short Version: What is the term/concept which describes the efficient design of programming the data layer for efficient data access and what are some sources/books/articles/website which discuss this ...
1
vote
2answers
100 views

which layer must check if something(like account etc) exist in database

I am implementing a web api and i have crated three layers,data access layer,business layer and presentation layer. In data access layer I have a method which create a user.I use a transaction which ...
1
vote
0answers
105 views

JavaFX generating UI controlls from backend classes

I have a problem with my Software design. I want to generate UI controls from XML messages over the network. The XML messages contain simple information about a component and its properties for ...
0
votes
2answers
669 views

Can a layer consist of multiple projects / dlls?

I am working on the architecture for a new web application and I am pretty much a complete newbie when it comes to architecture. Working my way through .NET Application Architecture Guide, 2nd Edition ...
0
votes
1answer
310 views

How to properly decouple the service layer from the user interface layer, if the service layer needs to interact with the user?

In my program, I have a long-running function from which I would like to interact with the user for various reasons: Giving status updates ("Downloading file /foo/bar.png") Displaying warnings ("File ...
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 ...
0
votes
3answers
811 views

How do I create a simple yet complex business layer?

I'm working with a fairly complex web application. It's split up into the following layers: Presentation - HTML Service layer - A REST and SOAP API communicating with the business layer Business ...
0
votes
1answer
306 views

Why are the Android runtime and native libraries in the same layer?

Regarding the diagram in Android's website: https://developer.android.com/guide/platform Why did they put the Android Runtime category in the same layer as the native C/C++ libraries category. ...
0
votes
2answers
632 views

Multiple layers of abstraction and chain calls of methods (Java functional like programming)

I am creating a multiple wrappers/layers API in Java that go like this public class Layer1<T extends Layer1> public class Layer2<T extends Layer2> extends Layer1<Layer2> public ...
0
votes
2answers
290 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 ...
0
votes
1answer
65 views

What is the correct way to design a model and its relations?

I have the following database models and its properties: User (id, role_id, name, email, password) Role (id, name, description, active) User2Role (user_id, role_id) Customer (id, name, user_id) A ...
0
votes
1answer
603 views

3-tier data access layer usage

As I understand in the 3-tier architecture, the presentation layer talks to business logic layer, which talks to data access layer. And, ideally, business layer knows nothing about presentation, and ...
0
votes
1answer
8k views

Help me resolve this circular dependency?

This would be behind a spoiler tag if I could get the markdown to work. Sorry. As soon as I typed in "circular dependency", I got a ton of suggested results. Such as: How to handle “...
0
votes
2answers
170 views

What layers reference each other in a multi layer design? [duplicate]

I'm creating a project and I'm having difficulty and contrasting opinions on how to do things when it comes down to separating layers. I'm not fully sure what layers should reference each other. I ...
0
votes
1answer
2k views

Trying to understand 3 layer programming [closed]

I am confused to understand the structure of a 3 layer programm. Where is good place for exceptions, entity and etc.? If I use MVC, in my UI model, how to transfer entity class to model class and etc.?...
0
votes
1answer
42 views

Questions about Direct access to data source from Services

Background: I'm trying to separate my concerns in the application architecture the best possible way. In a nutshell: The requests are parsed and go to an Action Action decides which service(s) to ...
0
votes
1answer
48 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
1answer
658 views

What layer does the presenter go in?

Whereas there seems to be a lot of information on the Internet about what the presenter both is and does, there doesn't seem to be a whole lot that specifically describes where to put it in a multi-...
0
votes
1answer
156 views

Using static methods in layered architecture

In layered architecture does it matter where static methods go? Or is it the architect deciding this? For example can the DAL be static to cache records and perform smart data retrieval at the ...
0
votes
2answers
535 views

In AngularJS - should $resource be used from controller or service?

All the documentation, examples and tutorials I've found on $resource were using it directly in the controller. So far I'm just using $http from services and those services are further used in the ...
0
votes
1answer
172 views

Layer style applied, but intuition is different

Currently, I'm developing an architecture for a system of the following kind: There are a couple of existing applications (front end) with which one can define UML profiles capturing some specific ...
0
votes
0answers
41 views

Layered Model-View-ViewModel design

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 ...
0
votes
0answers
99 views

Is ASP.NET Core Identity a leaky abstraction?

As far as I know, the DBContext or underlying persistance technology should be only contained inside the Data layer. Also, it feels very wrong to me to have identity package inside the user ...
0
votes
1answer
62 views

Generic crud with jdbc api

I am used to programming java on the server side with ORM frameworks and using abstract classes for CRUD. But now I'm workign on a desktop project without ORM and just the good old JDBC API for ...
0
votes
1answer
91 views

Communication between separated application parts

I have searched well before asking this question, and some of the questions look like what I need here, but none of the gave a clear answer to my question. I am writing a web application (in PHP if ...
0
votes
0answers
258 views

Clarification on the Onion architecture's Domain Service and Application Service

I am studying Onion Architeture but i got some doubts: All the samples (github) I found over internet are too simple, or are implemented under DDD (which I have not studied at the moment) so I can ...
0
votes
0answers
471 views

How do I design a Service Layer in code?

I am currently rewriting one of my projects in Java and want to implement a service layer that will be used by different clients (CLI/GUI/Web) to communicate with my core application. For now it will ...
0
votes
1answer
141 views

Best practices for internationalization in layered applications

I'm building a new application in JSE for which I want to support internationalization. I've never built such an application. I'm looking for the best practices for internationalization. The ...
-1
votes
1answer
56 views

How shall I implement a MVC program into presentation, business logic and data access layers?

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 ...
-2
votes
1answer
465 views

Consuming Rest, DAO or Service layer?

I feel like this is a dumb question but here it goes: If i'm consuming rest (getting data and transforming in POJO), does it sit in the DAO or Service layer? As for what i've researched I believe that ...
-2
votes
1answer
71 views

What to call a API and DB code layer [closed]

In a recent MVVM mobile app project I wrote a set of API classes and Database classes where there was a clear flow of logic between both api and db code. To enforce the way api and db interacted I ...
-3
votes
1answer
68 views

Packaging of a web application code-base [closed]

Michael Nygard writes in Release It!: Have you ever checked in a commit that had bunch of new files like "Foo", "FooController", "FooFragment", "FooMapper", "FooDTO", and so on? That is evidence of ...