Home All Groups Group Topic Archive Search About

3-Tier Binding Problem ?????????

Author
13 Jan 2006 3:44 AM
Dave Johnson
In a 3-Tier application, once upon a while comes the need for binding
objects or usercontrols from other objects, example binding a
usercontrol in the Presentation layer from a Business Layer Object,

My problem:

I have a Dynamically Rendered WebUserControl that it needs some
properties that will control how this WebUserControl be Rendered. The
information needed are found in a business layer Object. What I thought
about is making both the WebUserControl and the Business Class share the
same Interface. So that I can bind easly the properties of the Business
Object to the Control. 

Is this kind of solution is possible ?? what is the smartest way to do
it ??

Please help of you are able to layout a proposed solution to this
problem or at least state some good guidelines it will be much
appreciated.

Best Regards,


Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Author
13 Jan 2006 11:09 AM
DavidG
I don't know the smartest way! Not sure I would use the interface
approach directly on a usercontrol. I prefer a Model View Controller
pattern, maybe an additional facade class that can separate the
presentation logic from the business logic? In the short term it is
slower but over time your code will be easier to maintain...

HTH

-----------------------------------------
David Gray
ASP.NET/C# Developer/Architect (MCAD.NET)

On Thu, 12 Jan 2006 19:44:22 -0800, Dave Johnson
<esharpco***@gmail.com> wrote:

Show quoteHide quote
>In a 3-Tier application, once upon a while comes the need for binding
>objects or usercontrols from other objects, example binding a
>usercontrol in the Presentation layer from a Business Layer Object,
>
>My problem:
>
>I have a Dynamically Rendered WebUserControl that it needs some
>properties that will control how this WebUserControl be Rendered. The
>information needed are found in a business layer Object. What I thought
>about is making both the WebUserControl and the Business Class share the
>same Interface. So that I can bind easly the properties of the Business
>Object to the Control. 
>
> Is this kind of solution is possible ?? what is the smartest way to do
>it ??
>
>Please help of you are able to layout a proposed solution to this
>problem or at least state some good guidelines it will be much
>appreciated.
>
>Best Regards,
>
>
>Sharing makes All the Difference
Are all your drivers up to date? click for free checkup

Author
13 Jan 2006 2:01 PM
Dave Johnson
greetings david,

thnx for your reply but could you give more explanation on how you might
solve this kind of problem and on what basis you have chosen this
solution ? that might help, thanks alot!

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
13 Jan 2006 2:09 PM
Kevin Spencer
Hi Dave,

In good tiered architecture, ignorance flows downhill. That is, the data
layer knows nothing about the business layer. The business layer knows
nothing about the presentation layer. This enables the data layer to be used
by any business layer, and the business layer to be used by any presentation
layer. The business layer must know something about the data layer (its
programming interface) in order to use it. The presentation layer must know
about the programming interface of the business layer in order to use it.
So, don't modify the business layer to suit the presentation layer. Modify
the presentation layer to suit the business layer.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

Show quoteHide quote
"Dave Johnson" <esharpco***@gmail.com> wrote in message
news:u8sGlO$FGHA.608@TK2MSFTNGP14.phx.gbl...
> In a 3-Tier application, once upon a while comes the need for binding
> objects or usercontrols from other objects, example binding a
> usercontrol in the Presentation layer from a Business Layer Object,
>
> My problem:
>
> I have a Dynamically Rendered WebUserControl that it needs some
> properties that will control how this WebUserControl be Rendered. The
> information needed are found in a business layer Object. What I thought
> about is making both the WebUserControl and the Business Class share the
> same Interface. So that I can bind easly the properties of the Business
> Object to the Control.
>
> Is this kind of solution is possible ?? what is the smartest way to do
> it ??
>
> Please help of you are able to layout a proposed solution to this
> problem or at least state some good guidelines it will be much
> appreciated.
>
> Best Regards,
>
>
> Sharing makes All the Difference
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com

Bookmark and Share