n-tier-architecture

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

烂漫一生 提交于 2019-11-28 04:22:08
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 application speed. But apart from performance stand point are there any other advantages of MVC over the view-logic-data layered type pattern? EDIT: For those who's interested I just uploaded a sample PHP code that I created to test the use of MVC. I purposly omitted all the security checks to make the code a little easier to read. Please don't

EF4 Independent Associations - Why avoid them?

匆匆过客 提交于 2019-11-28 01:07:58
问题 I saw this comment on MSDN (link and link): "Note that Independent Associations should often be avoided since things like N-Tier and concurrency becomes more difficult." I'm new to EF4 and I'm building an n-Tier web app. This sounds like an important pitfall. Can someone explain to me what this means? 回答1: I think it's personal preference. Originally, EF was created to only use indep. associations and aligned with a more classic ERM approach. However, most of us devs are so dependent on FKs

What's the naming convention for classes in the DataAccess Project?

独自空忆成欢 提交于 2019-11-28 00:14:02
问题 I usually name by classes in the Business project as Manager.cs, like BaseManager.cs, CommentsManager.cs, ProfileManager.cs, etc... How do you name your classes in the DataAccess project? Do you call it CommentsDA, CommentsDB, or what? Just curious...BTW, I'm using .NET C#. 回答1: Naming Conventions between Software Layers I used to separate class naming conventions for each kind of software layer like you're asking about. However in the .NET world upon realizing each layer is it's own assembly

Fastest way to convert datatable to generic list

泄露秘密 提交于 2019-11-27 14:33:02
I have a data tier select method that returns a datatable. It's called from a business tier method that should then return a strongly typed generic List. What I want to do is very similar (but not the same as) this question: How do you convert a DataTable into a generic list? What's different is that I want the list to contain strongly-typed objects rather than datarows (also, I don't have linq avaiable here yet). I'm concerned about performance. The business tier method will in turn be called from the presentation tier, and the results will be iterated for display to the user. It seems very

What is difference of developing a website in MVC and 3-Tier or N-tier architecture?

試著忘記壹切 提交于 2019-11-27 12:24:22
What is difference of developing a website in MVC and 3-Tier or N-tier architecture? Which one is better? What are pros and cons? They're pretty much the same, however in 3-Tier, the top level (presentation) never directly communicates with the bottom layer (data persistence). In model-view-controller, theoretically the Model is supposed to 'notify' the View that it has changed so that the View can update. However, this is usually not an issue in most web applications because they are stateless. I'm not sure if any well-known PHP MVC architectures have Views that directly communicate with

Business Layer in 3 tier Architecture

纵饮孤独 提交于 2019-11-27 12:14:34
I went for an interview, and was asked to show up my Business layer architecture. I have some idea about 3 tier architecture but really no idea, to what to write in front of interviewer. So suppose my project deals with Employees of an organization, then what would i have written there. Will it be any kind of diagrams i should have made or some coding part. I worked in C# framework 3.5. I really don't understand what else to mention in this question, so please let me know if something is required.Thanks. Edit I worked in winforms. I know what Business layer is, but was not sure what to tell

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

让人想犯罪 __ 提交于 2019-11-27 10:11:23
问题 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

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

会有一股神秘感。 提交于 2019-11-27 09:50:56
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . 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

Should the repository layer return data-transfer-objects (DTO)?

半城伤御伤魂 提交于 2019-11-27 06:55:00
I have a repository layer that is responsible for my data-access, which is called by a service layer. The service layer returns DTOs which are serialized and sent over the wire. More often than not, services do little more than access a repository and return whatever the repository returns. But for that to work, the repository has to return an instance of that DTO. Otherwise, you would first have to map the data layer object that the repository returns to a DTO in the service layer and return that. That just seems wasteful. On top of that, if creation of the DTOs happens in the service layer,

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

佐手、 提交于 2019-11-27 05:19:53
问题 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 application speed. But apart from performance stand point are there any other advantages of MVC over the view-logic-data layered type pattern? EDIT: For those who's interested I just uploaded a sample PHP code that I created to test the use of MVC. I