Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / May 2004

Tip: Looking for answers? Try searching our database.

Object Views

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aaron - 14 May 2004 23:16 GMT
I'm not sure if this question would have an OO or XML-based solution, but I'm posting it here to start..

For our server application, we have business objects (using VB.NET) that include all information that its calling applications require.  However, each calling program will need different "views" of the data.  Similar to a database view, there is information that is allowed to be viewed by some apps, and not others.  Even entire objects can be restricted from some views.

Is there a way to use the same object (or base object) that can "transform" itself into the different views?  Speed of object retrieval is important, so I am hoping there is some way to transform these objects without manually setting objects and properties. Perhaps through an XSL transformation? Or perhaps via some of .NET's serialization capabilities

Thanks
Eliahu Baker - 18 May 2004 16:01 GMT
There i a big classic book called "Design Patterns". I recall something about View desing pattern...
SP - 22 May 2004 13:15 GMT
> I'm not sure if this question would have an OO or XML-based solution, but I'm posting it here to start...
>
> For our server application, we have business objects (using VB.NET) that include all information that its calling applications require.  However,
each calling program will need different "views" of the data.  Similar to a
database view, there is information that is allowed to be viewed by some
apps, and not others.  Even entire objects can be restricted from some
views.

> Is there a way to use the same object (or base object) that can "transform" itself into the different views?  Speed of object retrieval is
important, so I am hoping there is some way to transform these objects
without manually setting objects and properties. Perhaps through an XSL
transformation? Or perhaps via some of .NET's serialization capabilities?

In what form are you returning the business objects currently? Is the
calling application able to dynamically handle an object that is "thinner"
than the complete object or will it expect the same object but with null
objects/null values in place of the restricted data? Finally are you
creating the objects as they are requested (knowing who the recepient is) or
do they already exist as a "full" object and you need to transform them to a
"restricted" object?

SP
aARON - 24 May 2004 14:26 GMT
>In what form are you returning the business objects currently?
The previous version of this software  is VB 6 and not very OO, and did not have to address these issues. This version we are working on is in early stages of development

>Is the calling application able to dynamically handle an object that is "thinner
>than the complete object or will it expect the same object but with nul
>objects/null values in place of the restricted data?
Ideally we want the calling applications to know exactly what is in their "view" and is not even aware of other data out there. However, during this investigation, we are considering the approach where there is a "master object" that contains all information, and can ""shrink" itself according the calling application (so inappropriate fields are zeroed out or set to nothing).

>Finally are you creating the objects as they are requested (knowing who the recipient is) o
>do they already exist as a "full" object and you need to transform them to
>"restricted" object
Regardless of the solution, we will likely create a "master" object that contains all the information.  The question is what to return to the calling applications. As I stated above, ideally, the view the application receives only contains properties/methods relevant to their view of the data.  Obviously, this can be done by creating separate object definitions, but was hoping not to have to make multiple forms of the same object for each calling application's view, or to somehow take advantage of interfaces or inheritance

Hope that all made sense.  Thanks for the help

Aaron

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.