开发者

How to implement a .net 3-tier architecture using Winforms

I have for some time build n-tier Applications using a database server as the data tier, Winforms as the presentation tier and an ASP.NET asmx webservice in the middle to send back and forth untyped Datasets. While this approach has worked for me so far, it certainly does feel outdated today.

What technologies should I use if I were to create a similar architectured application today? .net 4.0 technology is welcome.

I still want a database server as the datatier and the asmx webservices should probably be replaced by WCF. I would still like to have the presentation tier running as a desktop application (Winforms or WPF) so ignore ASP.net for this question.

My main question really comes down to what to use as busi开发者_如何学Cness objects. I want something that is easier to bind to the interface than untyped Datasets and strongly-typed datasets feels very heavy. I also need something that can track changes to make sure users do not override each other's changes in the database.

Will the Entity Framework 4 be usable for a scenario like this? Are there any thorough guides available?


There is a good introduction to building n-tier apps with EF 4 here: http://msdn.microsoft.com/en-us/magazine/ee335715.aspx

The introduction of POCO objects in EF 4, make it easier to build n-tier apps, as it removes the need to program mappers to map between EF objects and Data Transfer Objects.


I also prefer to use EF4 or LinqToSQL, WCF, WF and yes WPF for presentation. Also if you decide to go with WPF use some libraries for IOC DI like Unity or STRUCTUREMAP or for reusing components MEF and so on. If you gone use WPF like windows forms you not gone get any benefits from it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜