Questions tagged [n-layer]

Use this tag for questions related to the development of application using a N-Layer architecture.

Layers describe the logical groupings of the functionality and components in an application. Logical layers are merely a way of organizing your code. Typical layers include Presentation, Business and Data.

82 questions
4
votes
2 answers

How to pass user identity in a web n-layer application for auditing purposes from the User Interface Layer to the Data Access Layer?

I have built a web application that is structured in a n-layer architecture, i.e. UI, BLL, API (WebAPI), DAL. What I would like to achieve with this separation of concern is to enable basic auditing on the DAL, i.e. RowCreatedBy, RowUpdatedBy and so…
Donald N. Mafa
  • 5,131
  • 10
  • 39
  • 56
3
votes
5 answers

N-Layered ASP.NET Application: One class library for all my layers or one class library for each layer?

N-Layered ASP.NET Application: One class library for all my layers or one class library for each layer?
Mazen Elkashef
  • 3,430
  • 6
  • 44
  • 72
3
votes
2 answers

Using EF POCO classes as MVC 2 models (with data annotations)

I have a 4 layered web application programmed in C#... .Net 4.0: UI Layer Business Layer Data access Layer Entities layer My data layer contains an edmx My entities layer contains my POCO objects (generated by a t4 script), and that layer is…
Chris Klepeis
  • 9,783
  • 16
  • 83
  • 149
2
votes
3 answers

Is there a difference between ASP.NET N-Layered / DDD architecture and a Window service software architecture?

I am reading a lot of architecture (N-Layered and DDD) yet most of the articles are about web site architecture and develop mostly windows services. Can the architecture be used the same way?
guyl
  • 2,158
  • 4
  • 32
  • 58
2
votes
2 answers

Microsoft N-Layer sample

What do you think about http://microsoftnlayerapp.codeplex.com/ ? I am interesting in data access implementation (UnitOfWork, repositories, transactions). Is it the "best" example of implementing this issue on microsoft technologies ? If you have…
2
votes
2 answers

Does application services belong to domain layer or application layer?

I have a N-Layered Winforms application with 4 layers as follows: Presentation Layer Application Layer Domain Layer Infrastructure Layer My Application Layer has a Product Services class which is used for all repository related actions for Products.…
Robertcode
  • 911
  • 1
  • 13
  • 26
2
votes
1 answer

Where Should Data Transfer Objects (DTOs) be declared in a layered application using DDD

I used to have my DTOs declared in the Domain Layer. But that was before I later understood that the Application Layer should pass in primitives to the Domain Layer to instantiate Domain Model Entities, not DTOs. Now that I know this, I have no use…
2
votes
2 answers

Mvc asp.net and n-layer architecture

I am working on a asp.net mvc project. Also I want to use n-layer solution structure. So, I am using the following structure for my solution. It shows specially the part of the solution I have doubts with. I am planing to create interfaces for each…
Flezcano
  • 1,647
  • 5
  • 22
  • 39
2
votes
3 answers

n-layered architecture - BLL, DAL and interfaces. What is best practice?

I have a question regarding n-layer architecture. I thought long and hard before asking this question as there's a lot of similar questions here already... however, after literally a day and a half looking at it and reading these other answers I'm…
Matt B
  • 8,315
  • 2
  • 44
  • 65
2
votes
3 answers

What are the benefits of an N-layered architecture?

What are the benefits of an N-layered architecture? How does that make an application better?
SAHIL SINGLA
  • 745
  • 2
  • 9
  • 26
2
votes
2 answers

Dependency Injection - Visual Studio layer structure for ASP.NET

I've been reading up on DI and from what I can gather, the structure your VS solution should be as follows: Web (UI) Project references: Data Access (*scratches head) Business Logic DTO Business Logic Project references: DTO Data Access Project…
2
votes
1 answer

where should I implement security/Authorization in n-tier architecture?

where should I implement security/Authorization in n-tier architecture? I was developing an ASP.Net MVC Application using N-tier Architecture. Should I implement the authorization module as a different layer or as Service? Some Business rule depends…
Saanch
  • 1,814
  • 1
  • 24
  • 38
2
votes
1 answer

.net Reference Web in class library

I am writing an n-layer app/site and in my Common class library I need to call on NetSqlAzMan Web reference but that cannot be imported into a class library, only into a website type project. One way to get around it is to make my Common layer a…
sd_dracula
  • 3,796
  • 28
  • 87
  • 158
1
vote
1 answer

Data Transfer Objects in BLL layer or a separate layer?

I have: DAL layer -> entities and DbContext (Entity Framework) BLL layer -> services UI layer -> Razor Pages My services in BLL layer converts entities to data transfer objects and returns data transfer objects to UI layer. The UI layer also…
MrChudz
  • 909
  • 3
  • 10
  • 17
1
vote
1 answer

Can you bypass a layer for a certain operation in a layered architecture?

In an n-layered (5-layer, let's say) application, if there are options available for a certain operation to bypass one of the layers and communicate with the next layer directly, can it still be called an "n-layer" architecture, or does it turn into…
atiyar
  • 7,762
  • 6
  • 34
  • 75