Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

.net

wcf

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 business 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?

like image 302
Anders Jakobsen Avatar asked Mar 14 '10 11:03

Anders Jakobsen


People also ask

Is WinForms in .NET core?

NET Framework) NET Core Desktop Product Installer (includes WinForms and WPF components/libraries built for . NET, and .

What is the example of 3 tier architecture?

This can be a relational database management system such as PostgreSQL, MySQL, MariaDB, Oracle, DB2, Informix or Microsoft SQL Server, or in a NoSQL Database server such as Cassandra, CouchDB or MongoDB. In a three-tier application, all communication goes through the application tier.


1 Answers

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.

like image 90
Shiraz Bhaiji Avatar answered Oct 04 '22 23:10

Shiraz Bhaiji