n-tier-architecture

Steps to take to slowly integrate unit-testing into a project

喜夏-厌秋 提交于 2019-12-20 14:25:42
问题 I'm currently on a co-op term working on a project nearing completion with one other co-op student. Since this project has been passed down from co-op to co-op, poor practices have been taken along the way and testing has been left until the end. I've decided I'd like to write unit-tests to learn something new while testing. However, I'm working on a 3-tier, tightly coupled app that seems impossible to unit test in its current form. I don't want to throw off the other co-op student with no

Steps to take to slowly integrate unit-testing into a project

一笑奈何 提交于 2019-12-20 14:24:55
问题 I'm currently on a co-op term working on a project nearing completion with one other co-op student. Since this project has been passed down from co-op to co-op, poor practices have been taken along the way and testing has been left until the end. I've decided I'd like to write unit-tests to learn something new while testing. However, I'm working on a 3-tier, tightly coupled app that seems impossible to unit test in its current form. I don't want to throw off the other co-op student with no

Advice For A Newbie About N-Tier Applications

你说的曾经没有我的故事 提交于 2019-12-20 12:15:11
问题 Okay people, here's another one for ya'll: I'm starting in the n-tier apps world. I've done some reading on the topic and general advice is that n-tier apps' objective is to abstract functionality tween layers. So, based on this, in a n-tiered app the regular model is: Data Access -> Business Layer -> Presentation Since I'm a .NET developer, I thought that to enhance integration with multiple client types (Silverlight, Web app or even a WinForms client) I should use WCF (Windows Communication

Entity Framework 6 - use my getHashCode()

感情迁移 提交于 2019-12-20 10:29:04
问题 There's a certain amount of background to get through for this one - please bear with me! We have a n-tier WPF application using EF - we load the data from the database via dbContext into POCO classes. The dbContext is destroyed and the user is then able to edit the data. We use "state painting" as suggested by Julie Lerman in her book "Programming Entity Framework: DBContext" so that when we add the root entity to a new dbContext for saving we can set whether each child entity is added,

Advice on moving to a multi tier Delphi architecture

风格不统一 提交于 2019-12-20 09:59:49
问题 We have a relatively large application that is strongly tied into Firebird (stored procedures, views etc). We are now getting a lot of requests to support additional databases and we would also like to move a lot of the functionality from the client to the server. Now seems like a good time to move to a 3(4) tier architecture. We have already looked at DataSnap 2009 and RemObjects SDK/DataAbstract. Both seem like they would do the job, but are there any advantages/disadvantages we should look

Should service layer classes be singletons?

▼魔方 西西 提交于 2019-12-20 09:29:44
问题 I am using Spring framework. Should my service classes be created as singletons? Can someone please explain why or why not? Thanks! 回答1: Yes, they should be of scope singleton . Services should be stateless, and hence they don't need more than one instance. Thus defining them in scope singleton would save the time to instantiate and wire them. singleton is the default scope in spring, so just leave your bean definitions as they are, without explicitly specifying the scope attribute. You can

Where should data validation occur?

半城伤御伤魂 提交于 2019-12-18 12:28:40
问题 I've read conflicting philosophies on where data validation should happen and it's just confusing me more. Some say it should only be in the database. Others say that the validation rules should be mirrored in other layers like the bll or ui. Where should the data validation live? Should rules be split across multiple layers? What are some of the actual best practices (as opposed to theory, head in the clouds type stuff) regarding when and where to validate data in an application running on

Where should data validation occur?

送分小仙女□ 提交于 2019-12-18 12:28:16
问题 I've read conflicting philosophies on where data validation should happen and it's just confusing me more. Some say it should only be in the database. Others say that the validation rules should be mirrored in other layers like the bll or ui. Where should the data validation live? Should rules be split across multiple layers? What are some of the actual best practices (as opposed to theory, head in the clouds type stuff) regarding when and where to validate data in an application running on

Using DTO to transfer data between service layer and UI layer

烈酒焚心 提交于 2019-12-18 10:12:38
问题 I've been trying to figure this out for days but there seems to be very little info on this particular subject with ASP.NET MVC. I've been Googling around for days and haven't really been able to figure anything out about this particular issue. I've got a 3 layer project. Business, DAL and UI/Web layer. In the DAL is dbcontext, repository and unit of work. In the business layer is a domain layer with all the interfaces and the EF models. In the business layer there is also a service layer

Best Structure for ASP.NET MVC Solution

核能气质少年 提交于 2019-12-17 22:35:33
问题 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