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.

79 questions
33
votes
4 answers

What are the main advantages of MVC pattern over the old fashioned 3-layer pattern

I am contemplating about using an MVC pattern in my new project and I can clearly see the main advantage of being able to put the data layer (the model) a little closer to the presentation layer (the view), which will allow a little increase in…
26
votes
6 answers

Onion vs. N-Layered Architecture

One thing beforehand: I arrive from an N-layered background. I have now spent quite a bit time getting my head around Onion Architecture and related Domain Driven concepts such as Hexagonal Architecture reading resources like Jeff Palermo's series…
14
votes
2 answers

What is the difference between Monolith and n Layer?

i have a few questions regarding monolith and n layer architecture. First, whats the difference between Monolith and n Layer architecture? Second, let's say I have a single Visual Studio solutions that consist of multiple projects such…
13
votes
5 answers

Which layer should i declare enums?

I have a C# N-Layer Project that has 5 Layers: 1-Infrastructure 2-Domain 3-AppService 4-Distributed Service 5-Presentation I want to use enums in my project. but I don't know which layer describe them. I have two ideas about it. 1- declare enums in…
ArMaN
  • 2,087
  • 2
  • 28
  • 47
11
votes
1 answer

DDD Concepts in N-Layer Development

After spending a couple months studying DDD methodology, I've now began to apply these concepts into actual products at my company. In fact, I've been tasked with creating a suitable and maintainable architecture for future development. We have…
Daniel
  • 1,835
  • 2
  • 18
  • 27
9
votes
5 answers

A modern n-layer asp.net web application sample?

So my asp.net is very very rusty, and i'm trying to get back into best practices and what not. So, I whip out google and start looking for examples and samples and tutorials, but what do I find? Old crusty stuff that tends to be written even…
Erik Funkenbusch
  • 90,480
  • 27
  • 178
  • 274
8
votes
4 answers

.NET N-Tier Architecture: What do I do about the Model objects?

I am creating a solution from scratch, using ASP.NET Web forms C#. I am concerned about the model objects as I don't want to create duplicate sets of model objects in each layer. What is the best practice for using Model objects in 3 layer…
Funky
  • 11,511
  • 32
  • 93
  • 157
8
votes
2 answers

In which layer should Specification Pattern objects be "new'ed up"?

So, I've looked at some posts about the Specification Pattern here, and haven't found an answer to this one yet. My question is, in an n-layered architecture, where exactly should me Specifications get "newed" up? I could put them in my Service…
6
votes
4 answers

N-Layer Architecture

I'm in the situation that I have to design and implement a system from the scratch. I have some questions about the architecture that I would like your comments and thoughts on. Quick Info about the project: It's a data centric web application. The…
coddey
  • 380
  • 2
  • 13
6
votes
1 answer

N-Layer to Hexagonal (Ports and Adapters) architecture

Alistair Cockburn introduced a Hexagonal architecture, now it is called Ports and Adapters pattern. In my understanding, the concept is similar to n-layer architecture where one layer depends on the other layer via abstraction (interface) only. For…
wonderful world
  • 8,704
  • 14
  • 76
  • 142
5
votes
4 answers

How to mock Entity Framework in a N-Layer Architecture

I have a N-Layer application with Entity Framework (Code-First approach). Now I want to automatize some tests. I am using Moq framework. I am finding some problem about writing the tests. Perhaps my architecture is wrong? With wrong, I mean that I…
Ciccio
  • 1,703
  • 3
  • 23
  • 62
4
votes
2 answers

Unity and lifetime management configuration - always transient lifetime manager

I have an configuration error with Unity. I am trying to implement http://unitymvc3.codeplex.com/, but i am stucked right now, because of this: In my unity configuration I have this settings:
clpx
  • 103
  • 2
  • 7
4
votes
3 answers

MVC or MVP architecture for winform applications using Entity Framework as ORM

I am going to develop a winform project of considerable size. I am planning to use Entity Framework as ORM tool. Now I am searching for an architecture(MVC/MVP/MVVM etc..) to implement all these. Firstly there are few choices for n-layered…
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…
Donny
  • 4,738
  • 8
  • 35
  • 50
4
votes
1 answer

Layered Architecture with DI vs onion architecture?

Could anyone please explain the difference between onion architecture and Layered architecture using dependency inversion? They look exaclty the same to me. Any input is greatly appreciated :)
mike john
  • 63
  • 4
1
2 3 4 5 6