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

learn more… | top users | synonyms

-2
votes
0answers
151 views

What Architecture for web app with social networking features? [closed]

My team needs to develop a website that will work as a community. The site also requires a mobile app for all major platforms: Android, iOS, WP, etc. Users will be able to post and comment and there ...
4
votes
3answers
188 views

DDD, modularizing the application and domain layers without breaking the DIP

Quoting DDD theory: The application layer is thin in terms of domain logic - it merely coordinates the domain layer objects to perform the actual work. When it comes to modularization, and ...
0
votes
0answers
97 views

N-Layer architecture

I am attempting to structure my solution projects in such a manner as to improve testing, reuseability, separation of concerns and all that good stuff. Whilst I understand these concepts in theory, I ...
1
vote
4answers
90 views

Domain Model, validation, and pushing errors to the model

Looking into DDD and something I noticed is that business logic should be in the model, otherwise you just have property bags. That said how do you handle pieces of validation that require a trip to ...
0
votes
2answers
95 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 ...
1
vote
2answers
123 views

Where should the “not empty field” validation code be written on a 3-layer application?

When working with the 3-layer model, where should the validation code be placed? for: not empty fields, unchecked options, null values, wrong-written dates, etc. To keep total isolation between a ...
0
votes
3answers
227 views

Business Logic vs Presentation/View Logic

I often question myself of where to put the logic that organize the data to a view that is not necessarily a business logic in a 3-layered architecture (DAO, Business, View). I'll put an example to ...
1
vote
1answer
144 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 ...
0
votes
2answers
114 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 ...
2
votes
1answer
77 views

How to handle errors best addressed in a higher abstraction layer and dependent on state inferred in current layer?

I have a use-case that can be repaired, but the logic for repairing it is best done in a higher level of abstraction. Just throwing exception/failure is ugly because it's hard to pass back up through ...
3
votes
1answer
148 views

Where do utility libraries fit in a layered architecture?

Consider this mock-up of a software stack designed with layered architecture in mind : Every application layer is decoupled through API calls, but a memory handling library is used throughout. All ...
1
vote
1answer
171 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 ...
0
votes
0answers
66 views

Application access layer vs data access layer: taking a choice between distinct 'fast' and 'big' stores served by Redis protocol

background story: So, we want to have a distributed cache available to all applications. (Non-concurrent writes, concurrent reads). In ideal case, the cache must be persistent and kept in RAM ...
4
votes
2answers
223 views

What are the advantages of strictly maintaining separate data | algorithm | interface layers?

I always separate the user interface from other functionality in my programs - its the way I have been taught, and it has obvious advantages since you can change the interface but keep the same ...
0
votes
0answers
38 views

modelling data / UI models in relation with the Data Layer

I have a user interface in Asp.Net MVC, which would for example need to load a list of products to show. Let us assume this calls ProductRepository.GetProducts() . In the data layer, I have a class ...
3
votes
2answers
136 views

Best practice for security checks, in surface or deep layer? [closed]

Let's take a server-side WebServices app, we need to make sure that all function applies every security rules, and keep the code clean. In such a case, I usually prefer to place my security checks on ...
0
votes
1answer
84 views

Data Access Layer for application

I am working on a retail application where currently I'm using raw SQL like insert into some_table values (Textbox1.Text, Textbox2.Text, ...) and update some_table set some_column = value for ...
1
vote
1answer
183 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 ...
2
votes
3answers
475 views

What is an “abstraction layer”?

I need a very simple explanation because I'm not a professional programmer. I found the terminology "abstraction layer" reading the documentation of mysqli extension where is described the difference ...
2
votes
3answers
444 views

DAL vs BLL functions' return types

Here is how I see the main differences between the DAL and the BLL: The DAL directly query the database. The DAL doesn't create new information. It may execute complex sql requests, joining several ...
5
votes
1answer
227 views

How to avoid dragging arguments from function to function

When I do my code layout, I like to start with a rather high level view, and then start to delegate actual computation to class or functions that have a bit more detail. Then in these classes of ...
89
votes
10answers
12k views

How accurate is “Business logic should be in a service, not in a model”?

Situation Earlier this evening I gave an answer to a question on StackOverflow. The question: Editing of an existing object should be done in repository layer or in service? For example ...
6
votes
2answers
661 views

Is programming in layers real? [duplicate]

I am fairly new in product development and I am trying to work over a product. The problem that I have realized is that people draw diagrams and charts showing different modules and layers. But as I ...
0
votes
1answer
114 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
3answers
382 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
0answers
56 views

Layer Encapsulation without Model Overload?

I'm starting a new project, so it's time to re-evaluate how I do things. In the recent past I have created a 3 layer/tier project (UI, Domain, Data) with each tier with it's own separate model. The ...
2
votes
3answers
118 views

Efficiently “moving” data upward through a communication stack

I have implemented an application protocol stack that moves an incoming stream of data upward through several layers, as follows: copies a TCP segment from an OS buffer to my_buffer. after ...
1
vote
3answers
481 views

Which layer does async code belong?

I am developing an application that consumes data from an external service. The application is being implemented following a typical layered architecture with UI, Presentation, Domain and Data ...
0
votes
1answer
597 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 ...
61
votes
13answers
6k views

Why is it a good idea for “lower” application layers not to be aware of “higher” ones?

In a typical (well-designed) MVC web app, the database is not aware of the model code, the model code is not aware of the controller code, and the controller code is not aware of the view code. (I ...
3
votes
1answer
279 views

Why doesn't layered architecture translate easily to tiered architecture?

Basically, I'm trying to understand why layered and tiered are that different, and why they don't translate easily to each other. I understand that layered could be 3 separate class files for UI, BL ...
4
votes
4answers
213 views

Large teams with layered application

I work in a fairly large team (~15 developers) which is currently discussing our working methodology. The software we work on is quite feature-rich and expanding rapidly in terms of scope so the ...
5
votes
2answers
2k views

How do the Application and Database Interface Layers interact at their boundary?

I was watching one of Uncle Bob's videos and he brought up the Database Interface Layer. He had this diagram showing it: These arrows show that the DB Interface Layer is aware of and calls the ...
5
votes
3answers
625 views

Good practices to implement mappers in a multi-tier application

When you are working with a multi-tier application very often you run into task of converting objects in one layer to objects in another layer. This could be converting database objects into domain ...
3
votes
3answers
1k views

Presentation VS Application layer in DDD

I have trouble drawing a clear line between Presentation and Application layer in Domain Driven Design. Where should Controllers, Views, Layouts, Javascript and CSS files go? Is it in the ...
1
vote
1answer
161 views

When do domain concepts become application constructs?

I recently posted a question regarding recovering a DDD architecture that became an anemic domain model into a multitier architecture and this question is a follow-on of sorts. My question is when ...
22
votes
4answers
3k views

Do stored procedures violate three-tier separation?

Some colleagues of mine have told me that having business logic in stored procedures in the database violates the three-tier separation, since the database belongs to the data layer whereas stored ...
0
votes
3answers
3k views

PHP - Data Access Layer

I am currently reviewing a code base and noticed that a majority of the calls (along with DB connections) are just buried inside the PHP scripts. I would have assumed that like other languages they ...
7
votes
4answers
280 views

Processing a stream. Must layers be violated?

Theoretical situation: One trillion foobars are stored in a text file (no fancy databases). Each foobar must have some business logic executed on it. A set of 1 trillion will not fit in memory so the ...
0
votes
6answers
2k views

When to use the 3 layers model?

I was recently exposed to the three layer model (DAL,BL,UI). Someone told me I should ALWAYS work with this model. I have a medium project that I'm starting and I have doubts whether I should build ...
18
votes
2answers
7k views

Does it make sense to use ORM in Android development?

Does it make sense to use an ORM in Android development or is the framework optimized for a tighter coupling between the UI and the DB layer? Background: I've just started with Android development, ...
1
vote
3answers
596 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 ...
1
vote
1answer
708 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 ...
9
votes
3answers
2k views

Validation and authorization in layered architecture

I know you are thinking (or maybe yelling), "not another question asking where validation belongs in a layered architecture?!?" Well, yes, but hopefully this will be a little bit of a different take ...
3
votes
3answers
223 views

What are the pros and cons of implementing this requirement in different layers?

I have a CRUD app for <DomainObject>s. They are persisted in a database. There is a new requirement: keep track of the <DomainObject>s that have been created since the app was opened, ...
6
votes
4answers
1k views

n-layers architecture design, really worth the effort?

I was building an application in .Net for almost a year (almost alone), I took the decision to build it with a 3-layer design. Recently when finished the project, I analyzed if the effort of creating ...
11
votes
3answers
9k views

Entity Framework and layer separation

I'm trying to work a bit with Entity Framework and I got a question regarding the separation of layers. I usually use the UI -> BLL -> DAL approach and I'm wondering how to use EF here. My DAL would ...
5
votes
2answers
112 views

How to document/verify consistent layering?

I have recently moved to the dark side: I am now a CUSTOMER of software development -- mainly websites. With this new role comes new concerns. As a programmer i know how solid an application ...
2
votes
3answers
660 views

Recommended content for layers

As an expansion from my previous question about using separate projects for seperate layers - Good practice on Visual Studio Solutions I now wish to know if I am putting the right functionality in ...
8
votes
2answers
2k views

GUI, BLL, DAL Organization In A Project

I'm reading about application layers, and want to use this design in my next project (c#, .Net). Some questions: Is the separation of layers done through namespaces? Project.BLL.Whatever, ...