Normally you pass some sort of a data object between the layers. This can be
either a custom class, a dataset, or whatever else you may desire. Just make
sure the object is serializable if you wish to pass it between processes.
Normally you would choose to keep the dataobjects in a separate dll you can
reference in each of the application layers.
How you separate the layers physically is another question, but the logical
separation is the basic prerequisite for physical separation.
You can either keep the layers together physically, simply instantiating
objects from different layers in the same application (application domain),
or you can run the layers in different processes (application domains -
applications, services, webservices,...), separating them with remoting,
webservice, msmq, or other facades (thin interop layers that facilitate
communication).
What level of physical separation you choose depends more or less on the
solution design requirements - security, system, network, performance, etc.
requirements that have to be taken into account - and, of course, personal
preference. There really is no general rule that would fit every approach.
Basically what you should remember at all time is to create your components
statelessly... keeping state is bad, especially with physical separation of
the layers, and designing for asynchronisity is a good approach for boosting
performance.
I would also suggest you look into MessageQueuing and
System.EnterpriseServices a bit... they are an often overlooked part of a
windows box which can solve quite a few problems regarding isolation of
processes and running different components in separate application domains
with different security & trust levels.
Otherwise, recommended reading would be found inthe Microsoft's Patterns &
Practices library, especially in the architecture center.
(
http://msdn.microsoft.com/architecture/)
The specific topic of passing data through tiers is dealt with in the
"Designing Data Tier Components and Passing Data Through Tiers" guide, found
at
http://msdn.microsoft.com/library/de...tml/BOAGag.asp
I hope this helps you further.
Regards,
Ziga Jakhel
MCSD.NET
ziga.jakhel(a)rrc.si
"David Gouge" <(E-Mail Removed)> wrote in message
news:eeZA$(E-Mail Removed)...
> Hi all,
>
> I hope this is a suitable group for this question. Feel free to push me
> off to the correct one if not. 
>
> Basically i have been developing windows applications using Visual Foxpro
> for about 5 years for a small software house and we will be shortly moving
> to a .net (C#) solution.
>
> Within our VFP applications there are no distinct application layers
> whatsoever. Business logic, data access / manipulation and GUI code is
> all lumped together on forms and program files. With our move to .net I
> would like to implement more of a 3 teir architecture with the UI,
> Business Logic and Data Access / Manipulation all separated out.
>
> I understand completely the theory behind this, but am struggling somewhat
> to grasp the practical details. If, for example, I have a Client object
> in my Business layer, what would i need to do do access / update data
> based on the theory that the Business layer does not have any sql
> statements etc in it? Pass datasets between the two layers? Or xml / web
> services?
>
> If someone could give me a point in the right direction or let me know of
> some good resources / books i would be most grateful.
>
> Best Wishes,
>
> David Gouge