Help with n-tier design. Client piece and server piece? Distributed objects?

Help with n-tier design. Client piece and server piece? Distributed objects?

Old forum URL: forums.lhotka.net/forums/t/417.aspx


budbjames posted on Tuesday, June 20, 2006

Hello all,
 
I work for a company that has a rather hodge podge of a VB 6.0 application.  Each fat client uses the database directly to retrieve data.  The database design is horrible and the data access code isn't any better (adhoc queries).  This prevents our application from running fast from remote sites (It could even be faster directly on a LAN too).  We are starting a rewrite and Expert VB 2005 business objects came highly recommended (it's new too..).  I'm getting into the book now but I have a basic enterprise design level question that may help me understand the book better.  Is it better to develop our smart client, web client, and an actual TCP/IP server that uses sockets to retrieve requests from the clients, process the requests with the database, and return responses to the clients or to develop clean UI/Business/DataAccess assemblies and have the clients communicate with the database directly through the framework?  Will the book address things such as this?  I'm a bit nervous about the server service idea because it will need to be up all the time, it's a single point of failure, and all clients are limited by the speed limitations of the server.  Any other ideas or insight would be very appreciated?  Thanks.
 

ajj3085 replied on Tuesday, June 20, 2006

Hi,

If you're just on a lan, you can have the business objects communicate with ADO.Net directly (but ONLY in the DataPortal_XXX methods) OR in those same methods, you can use a data access layer of your own making or something like NHibernate.

Csla buys you a lot of flexibility as far as having a server goes.  You can have the data access run on the client as well (you set Csla to use the local data portal) or you can setup Csla to use remoting and have the remoting server running on IIS.  Your data access code would run on this server then. 

You best bet is to have seperate UI / Business and data access layers (which again may be ADO.Net directly or a DAL of your choosing).  The book certainly discusses n-tier, its much of the 'point' of the framework.  Building off of Csla will help you keep your layers distinct and seperate, and the book is an excellent way to help you understand how to properly build n-tier applications.  It addresses everything you are asking about.

HTH
Andy

Copyright (c) Marimer LLC