Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object Oriented Architecture Discussion
Message
De
11/07/2007 19:04:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/07/2007 17:20:24
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01239519
Message ID:
01239544
Vues:
12
>I am trying to come up with the best architecture for my system, and have some questions. Maybe I just need a book on OO theory and best practices.
>
>Let's say we have a simple PO system. It stores vendors, POs, PO Line Items, etc.
>
>I have the following classes:
>PurchaseOrder (A single PO. Contains POLineItems)
>PurchaseOrders (PurchaseOrder collection)
>POLineItem (A single PO line item)
>POLineItems (POLineItem collection)
>Vendor (A single vendor. Contains PurchaseOrders)
>
>Now let's say I want to query all POs for one vendor. I create a vendor object, load all PurchaseOrders and POLineItems. I understand using a DataReader and loading individual objects into a collection object, but what is the optimal way of doing this in a proper n-Tier architecture? It seems to me that I would make several trips from my Biz layer to my Data layer, opening and closing several connections in the process.
>
>Grrr.... the more I think about it, the more overwhelmed I become.

Why would you be doing several trips? It's a single trip, no? Check Devforce from ideablade. Even if you don't choose to use it, it can give you ideas about OQL and SQL. The key is that you would create a single call that gets the required data (and utilize the cache where applicable).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform