Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for advice on passing data between layers
Message
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
00992836
Message ID:
00993068
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
Sylvain,

I would stay away from approach #2 because it really limits reusability of code or stored procs or whatever you do to fetch your data. It also makes testing much more complex because any change you make in your retrieval code potentially affects the other related items.

When we're talking on a fast connection I'd always vote for more atomic data access because that way you can isolate that stuff easily in your business object and logically group these calls. With a 'get me everything' approach you're almost always setting yourself up for an implementation specific (read used only once) method. This is not necessarily bad, but whenever you bulk multiple things together reusability is almost always nil.

There are special cases where this rule does not apply. In disconnected or low bandwidth environments it's often necessary to pull data all at once in one swoop. But even here you have to be careful because if you pull too many things and something along the way fails the whole boatload has to be thrown out.

Atomic access good! <g>...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform