Wednesday, August 19, 2009

Generics Love

Wow ... been a long time since I posted here. I've been really busy learning a whole new set of technologies and paradigms; well, at least new to me.

I'm on a WCF project in VB.Net, Framework 3.5 SP1. The class model being used is beautiful as far as OOP goes (yes, I think .Net has finally surpassed VFP in OOP in almost all aspects).

It's a bit of a pickle with the model handed to me which I must adhere to. The output will be serialized based on the model and the consuming requires a certain structure.

Here's a simulation of the model, roughly, in psuedocode:

Class ClubMember
(a number of attributes like Name, MemberID, et al)
Public Property Talks as Presentations

Class ActiveMember
Inherits ClubMember
(a few more atomic properties+

Class ActiveMembers
Inherits List (of ActiveMember)

Class Presentation
(Buncha attributes for a presentation)

Class Presentations
Inherits List (of Presentation)

ActiveMembers are derived from a stored proc from a source table, Members
Presentations are derived from a Presentations table with a Many to One to Members

My question is, where is the focal point in this model to integrate the DAL when requiring ActiveMembers? Simply put, where does the code go to create the individual objects and the lists? I mean, I can make it work as it stands but it ain't pretty. What would be a best practice approach?