Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding to Dataset vs. Property in distributed architect
Message
Information générale
Forum:
ASP.NET
Catégorie:
Programmation orienté objet
Divers
Thread ID:
00704353
Message ID:
00704397
Vues:
16
>In architecting our distributed application we're still waffling between having the BO layer pass back a typed dataset to the presentation layer vs. the BO passing a serialized instance of itself to the presentation layer.
>

You raise many good questions! I will try to give you my thoughts.

>Currently, our BOs have properties that are actually objects as well; e.g. type StringProperty so that the property object actually has a value, and other meta data like a caption, required?

The DataColumn has an ExtendedProperties property that looks like it should work perfectly for this situation. No need to subclass. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatacolumnclassextendedpropertiestopic.asp

>
>Also, our requirements include the need for column level security. With strongly typed datasets, I don't see how we can pass back a table sans a few columns.
>

In a web services scenario, the only way I see to enforce security is to give the client a view with the calculations made and the rows and columns filtered. If they want something else to happen with the data, they have to make a method call into the Web service where you can fire your security rules.

Re: serializing the Business object. I would say NEVER EVER make the DataSet your Business object. The DataSet should be used to move data between the tiers of your application. The Business object shoud be based on marshal by reference behavior (its methods will execute on the machine where the business object lives, which will be on a different machine than the client if you are remoting). Still, there are many cases where you want rules to fire in your UI before you submit it back to your business object. I really don't know what so say there. You can take the performance hit and call your business object with your dataset as a parameter. If the BO is on a remote machine this will serialize the dataset and send it over the network. One option would be to create a lightweight "business object" that lives client-side and handles the validation or anything that needs to be done before sending it back to the middle tier.

I really hope Mr. McNeish comes up with something good for this one.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform