• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2018
  • Last Modified:

3 Tier Winform Application

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
aspnetdev
Asked:
aspnetdev
  • 2
  • 2
1 Solution
 
ZippitCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
aspnetdevAuthor Commented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
ZippitCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now