n-tier-architecture

DDD & client-side validation

跟風遠走 提交于 2019-12-03 13:49:33
Suppose you have an application that utilizes the domain-model pattern, DDD and lots of other design patterns. assume that we have a number of solutions as listed below: Solution.Model Solution.Repository Solution.Services Solution.Presentation Solution.UI.Web The user experience layer will be Solution.UI.Web and we'll assume that it'll be an ASP.NET WebForms application. how do you enforce client-side validation? There are a number of things to be considered: First and foremost, we shouldn't have to hit the application/database server(s) to return any validation errors to the client, we could

How to connect 2 virtual machines in Windows Azure to have Two-Tier-Architecture?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 13:34:12
How to create 2 connected virtual machines in Windows Azure to be able to deploy Two-Tier-Architecture solution ? Let me clarify the scenario, Currently I am using 1 virtual machines in Windows Azure where I have the SQL Server 2008 DB installed AND the ASP.NET solution. However, I want to create a very simple Two-Tier-Architecture where the SQL Server 2008 DB is installed on Server1, and the ASP.NET solution is deployed on Server2. So, How to accomplish that? I mean, How to connected those two separate virtual machines? And how they can work together to run one single solution? Could you

ASP.NET web application architecture design advice

自古美人都是妖i 提交于 2019-12-03 10:04:01
previously my ASP.NET web application connects to a database directly using ADO.NET. Now I want to change it to 3 layers, ASP.NET layer, middle web service layer and backend database layer. I think there is benefit that I could abstract data source to ASP.NET front layer, loosely coupled and reduce potential security risks to let external exposed ASP.Net web application to be able to access database directly, etc. Compared with 2 layer architecture with the 3 layer architecture, I met with 2 major issues. An additional middle web service layer will incur more traffic, e.g. ASP.NET does not

traversing object graph from n-tier client

梦想的初衷 提交于 2019-12-03 08:44:41
I'm a student currently dabbling in a .Net n-tier app that uses Nhibernate+WCF+WPF. One of the things that is done quite terribly is object graph serialisation, In fact it isn't done at all, currently associations are ignored and we are using DTOs everywhere. As far as I can tell one method to proceed is to predefine which objects and collections should be loaded and serialised to go across the wire, thus being able to present some associations to the client, however this seems limited, inflexible and inconsistent (can you tell that I don't like this idea). One option that occurred to me was

How to map Entity Framework model classes with Business Layer class in n-tier architecture - ASP.NET-MVC

隐身守侯 提交于 2019-12-03 08:31:48
I am working on e-tier architecture within MVC framework (ASP.NET MVC5, Entity Framework 6). My application is divided into three sub-projects which are Business-Layer, Data-Access-Layer, Repository (This include repository and Unit of Work) and ASP.NET MVC web-app. I am struggling to understand mapping between business data and entity framework model. for example if I have model class User in entity framework as DAL - User Model [Table("User")] public class User { public User() { } [Key] public int UserID { get; set; } [StringLength(250)] [Required] public string FirstName { get; set; }

passing data in an ntier application

最后都变了- 提交于 2019-12-03 07:04:22
How do you pass data to layers in an n-tier application? I have mapped out 3 different methods. A) generic .net objects generic data tables, Hashtables, generic datasets, strings, ints etc... then using the datasets to fill your business objects which get sent to the UI layer. alt text http://img11.imageshack.us/img11/460/generic.png http://dabbleboard.com/draw?b=eiu165&i=26&c=54eef6f1ac01f03c85919518f4a24e798e57e133 Pro- No extra layers needed Con- Have to work with Generic datasets and tables in the business layer B) using an entities layer that the other layers would reference. This layer

What objects should you return from the data access layer to the business layer an n-tier system

▼魔方 西西 提交于 2019-12-03 06:53:23
问题 If you have, for example, a database table called Person (ID,Name etc) what kind of object should the data access tier return to the business tier? I'm thinking something like this: //data access tier public class DataAccess{ public interface IPerson{ int ID{ get; set; } string Name{ get; set; } } internal class Person : IPerson{ private int id; private string name; public int ID{ get{return id; } set{ id=value; } } public int Name{ get{retutn name; } set{ name=value; } } public static

I've never encountered a well written business layer. Any advice?

馋奶兔 提交于 2019-12-03 06:04:54
问题 I look around and see some great snippets of code for defining rules, validation, business objects (entities) and the like, but I have to admit to having never seen a great and well-written business layer in its entirety. I'm left knowing what I don't like, but not knowing what a great one is. Can anyone point out some good OO business layers (or great business objects) or let me know how they judge a business layer and what makes one great? Thanks 回答1: Good business layers have been designed

What Project Layer Should Screen DTO's Live In?

依然范特西╮ 提交于 2019-12-03 05:16:06
问题 I have a project where we use screen DTO's to encapsulate the data between the Service Layer and the Presentation Layer . In our case, the presentation layer is ASP.Net. The only classes that know about the DTO's are the service layer classes and the Pages/Controls that call these services and display the DTO's. The DTO's are almost always Page/Control specific so I feel they belong in the Presentation Layer, but that would mean the Service Layer would have to reference the Presentation Layer

Architectural decisions: ASP.NET MVC & Entity Framework

為{幸葍}努か 提交于 2019-12-03 05:10:49
I'm having an architectural decision-problem: We're about to build a new application and we've decided we'll be using ASP.NET MVC and Entity Framework (database first probably). In the first fases we'll only be building a web application for regular browsers, but in the future we might add mobile applications. (SOA?) My question is now what would be the best way to build up the application architecture? Would this be correct? MvcProject Model View Controller DAL project Holds edmx and T4 templates I've been searching for examples, patterns and best practices but I can't seem to find something