3-tier Architecture question

D

Dave Veeneman

I'm new to 3-tier architecture, and I am looking for some advice on how to
implement it in C#.

I am creating an app with a Presentation layer, a Domain layer, and a
DataServices layer. There is also an Application Services layer that sits
between the Presentation and Domain layers. This layer contains controllers
that act as intermediaries between the Presentation and Domain layers. It is
included to provide additional indirection, so that I don't end up wiring my
presentation objects directly to my domain objects.

The UI is an MDI interface similar to Microsoft Outlook. Each task area has
a separate MDI child form that is loaded into the parent when the task is
invoked. When a child form is loaded, its controller is instantiated in the
Application Services layer. The child form communicates with the controller
to get its work done.

Here's my question: Should the child form communicate with its controller
directly, or should it pass its requests through the parent form? On the one
hand, there are fewer lines of communication if the child form only needs to
know about its parent. On the other hand, if the parent has to manage
lifecycle and communications for several different controllers, the parent
starts looking bloated to me.

On the whole, it seems simpler to have the parent only be responsible for
loading its child. The child then instantiates its controller and
communicates directly with the controller, and closes the controller when it
is closed. The child notifies the parent of its events as needed.

Is there any strong reason not to follow this approach?
 
R

Ravichandran J.V.

"On the whole, it seems simpler to have the parent only be responsible
for loading its child. The child then instantiates its controller and
communicates directly with the controller, and closes the controller
when it is closed. The child notifies the parent of its events as
needed."

Seems quite clear. No reason why you should not adopt this technique
because, as you say, passing the buck to the parent may just slow down
the whole app because each time the user uses the child form and
interacts with, say, data, then although the user may leave the child
form quickly but, getting back to the parent may take longer for the
user and the end result may turn out to be that of a slow application
for the user.



with regards,


J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top