n-tier-architecture

What is the difference between tier vs layer application?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 03:59:20
Last week I was talking about the 3 tier architecture with my seniors. I was saying that it has a UI tier, Business Logic Tier and Data Access tier. After I have finished, he just told me that, I am talking about 3 layered architecture, not a 3 tier architecture. Then I asked him what is the difference, he assigned me the task to make a documentation about the difference. so Here I am, Os far, I come to point that a 3 tier architecture is 1. A client in on machine, 2. The application Server is hosted in one machine 3. The database server is hosted in another machine where 3 layer architecture

How would I know if I should use Self-Tracking Entities or DTOs/POCOs?

心不动则不痛 提交于 2019-11-29 03:25:24
问题 What are some questions I can ask myself about our design to identify if we should use DTOs or Self-Tracking Entities in our application? Here's some things I know of to take into consideration: We have a standard n-tier application with a WPF/MVVM client, WCF server, and MS SQL Database. Users can define their own interface, so the data needed from the WCF service changes based on what interface the user has defined for themselves Models are used on both the client-side and server-side for

Best Structure for ASP.NET MVC Solution

前提是你 提交于 2019-11-28 18:24:42
I tried to structure my last sizeable MVC project following a best practice approach, but didn't quite understand what I was doing. It has a Data, Business and Web (MVC) project, but the controllers contain most of the code, the Data layer uses NHibernate and has a few repositories responsible for too many things, and the Business layer is a dumping ground for anything that doesn't belong in the other two projects. It works, but I feel it could have been setup better - the main things I'm unhappy with are the fat controllers and the repositories. I'm starting a new project that might grow to

How Do You Communicate Service Layer Messages/Errors to Higher Layers Using MVP?

大兔子大兔子 提交于 2019-11-28 17:06:12
I'm currently writing an ASP.Net app from the UI down. I'm implementing an MVP architecture because I'm sick of Winforms and wanted something that had a better separation of concerns. So with MVP, the Presenter handles events raised by the View. Here's some code that I have in place to deal with the creation of users: public class CreateMemberPresenter { private ICreateMemberView view; private IMemberTasks tasks; public CreateMemberPresenter(ICreateMemberView view) : this(view, new StubMemberTasks()) { } public CreateMemberPresenter(ICreateMemberView view, IMemberTasks tasks) { this.view =

Explain the different tiers of 2 tier & 3 tier architecture? [closed]

杀马特。学长 韩版系。学妹 提交于 2019-11-28 16:41:02
I am not able to understand which elements are called as first tier, second tier & third tier & where they reside. Can they reside on same machine or different machine. Which tier reside on which machine? How we can identify a particular application as a 2 tier application or 3 tier application. Please explain with example Dan McGrath Wikipedia explains it better then I could From the article - Top is 1st Tier: LeWoody First, we must make a distinction between layers and tiers. Layers are the way to logically break code into components and tiers are the physical nodes to place the components

Exception handling in n-tier applications?

帅比萌擦擦* 提交于 2019-11-28 16:17:31
问题 What is the suggested approach or best practice for handling exceptions in tiered applications? Where should you place try/catch blocks? Where should you implement logging? Is there a suggested pattern for managing exceptions in n-tiered applications? Consider a simple example. Suppose you have a UI, that calls a business layer, that calls a data layer: //UI protected void ButtonClick_GetObject(object sender, EventArgs e) { try { MyObj obj = Business.GetObj(); } catch (Exception ex) { Logger

Business Logic in Database versus Code? [closed]

。_饼干妹妹 提交于 2019-11-28 15:34:11
As a software engineer, I have a strong bias towards writing business logic in the application layer, while typically relying on the database for little more than CRUD (Create Retrieve Update and Delete) operations. On the other hand, I have run across applications (typically older ones) where a large amount of the business logic was written in stored procedures, so there are people out there that prefer to write business logic in the database layer. For the people that have and/or enjoy written/writing business logic in a stored procedure, what were/are your reasons for using this method? I

Have I implemented a n-tier application with MVC correctly?

蓝咒 提交于 2019-11-28 10:35:47
Being pretty unfamiliar with design patterns and architecture, I'm having trouble explaining to others exactly how my latest application is designed. I've switched between thinking it's a pure n-tier, pure MVC and n-tier with MVC in the presentation layer. Currently I think the latter is correct, but I want thoughts from more experienced developers. How it works: Browser sends HTTP request to Tomcat. Maps the request via web.xml to a servlet (which I call controller) The controller instantiates one or more business object and calls methods on these, i.e. customerBO.getById(12) which again will

Entity Framework - layered design - Where to put connectionstring?

折月煮酒 提交于 2019-11-28 08:42:47
I am using a layered architecture with the Entity Framework as my datalayer with a bunch of repositories on top which contain the Linq-To-Entities queries. The data layer is one project, next to that I have a Services layer and the interface, which is a website. I want my website to be responsible of specifying the connectionstring for my entity model. How do I do this? I am using a singleton method to get to my entity repository, which is located inside the datalayer. Thanks You can copy the connection string created in the App.Config of the DAL assembly into the connectionStrings section of

Where to set a UTC datetime value in n-tier application: Presentation Layer, Domain, or Database?

我与影子孤独终老i 提交于 2019-11-28 05:13:37
问题 This seems like it should be an obvious question, but I have had some issues finding a good answer. I am building an n-tier application that needs to be UTC time sensitive. Values can be updated and when they are timestamps are recorded. This includes transactions in the database where updates or inserts will impact datetime columns. To give some context I am using SQL 2008 R2 + with DATETIMEOFFSET(2) for most of my datetime columns. I am considering putting the updates for timestamps into