Solved

3 Tier Winform Application

Posted on 2008-06-18
5
1,959 Views
Last Modified: 2012-05-05
Hi,
I have a winform application that is using a webservice to communicate to the database.I made a architecture diagram as follows
   UserInterface Tier                    Middle Tier                            Database tier
         
     UI ---------------------> Webservice -->Dataaccess ---------->Database
                                                                  Components
Does this approach make any sense?Can any one comment on this?
Thanks
0
Comment
Question by:aspnetdev
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Zippit
ID: 21817327
if you need to access your business objects across the internet then this is exactly how to do it.  If this is purely in a LAN environment the the webservice will introduce some overhead to the messaging with your business objects.  If performance is very important you may want to move to remoting (using tcp/binary channel/formatter) or possibly COM+ (Enterprise services) and interop.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 21818124
I agree with Zippit, webservices can be overkill in most situation where you don't have to go over the web.

You may use a very similar architecture (and yet be opened to the web) by using WCF. See http://netfx3.com/content/WCFHome.aspx
0
 

Author Comment

by:aspnetdev
ID: 21819017
thanks, for the comments but i would like to know will my webservice come under the business layer and UI in the GUI layer?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 21820626
If you are speaking only of (logical) layers, we normally limit the number of 3. Data-Business-Presentation. A Web service is clearly in the Business layer because it does not handle controls (at least should not).
0
 
LVL 7

Accepted Solution

by:
Zippit earned 250 total points
ID: 21824505
What do you mean by "will my webservice come under the business layer"?  Are you asking about where it should be physically deployed?  Or are you asking from a logical standpoint?

If you mean logically, then emoreau is correct.

if you are speaking physically then it obviously resides on your webserver.  The client/presentation layer could reside on the same webserver (if it's a web-client) or another webserver.  

Your data-access components (assuming they are separate assemblies from the webservices) will either have to live on the webserver with the webservices, or you will have to use a technique like remoting, enterprise services or WCF to run them on a separate server from the webservices but still be accessible from the webservices.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SqlDataBase 7 48
InputLanguage 1 27
C# LINQ ForEach() question 6 28
Crystal Report 13.19  not working with ASP.Net framework 4.5.2 4 17
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question