Re: OO development question...
- From: "RobinS" <robins@xxxxxxxxxxxxxxxx>
- Date: Fri, 4 Jan 2008 11:03:32 -0800
Are you still looking for some help or did you figure this out?
RobinS.
-----------------------
"Brad Pears" <bradp@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:uInRyyYQIHA.1212@xxxxxxxxxxxxxxxxxxxxxxx
Hi there... I am so new to OO, I am not sure what you mean by "helper" functions in particular. What kind of a base class would I inherit from - and where would I find one with the methods I would need - OR are you saying that I would create my own base class to inherit from? I take it this would have to be a VERY generic class that would just have a few properties and these "helper" functions or methods available? My update/delete/inserts are very specific (I call SQL Server 2000 stored procedures to do the work - not embedded or dynamic SQL) unless the functions you are referring to are so generic and all you do is to pass table names, fieldnames etc..etc.. to the methods which in turn would do the inserts/updates etc..etc...
Help?
Brad
"Spam Catcher" <spamhoneypot@xxxxxxxxxx> wrote in message news:Xns9A05A1968E521usenethoneypotrogers@xxxxxxxxxxxx"Brad Pears" <bradp@xxxxxxxxxxxxxxxxxxxxx> wrote in
news:OYT4V4ZPIHA.1756@xxxxxxxxxxxxxxxxxxxx:
I am unsure how I should develop the business classes, whether I
should have just one business class which includes collection
properties to house the two 1-M relationships or whether I should
create three business classes (one for each table) with the high level
class containing one collection property for it's 1-M relationship
with the 2nd class and in the second class, also include a collection
property to house the 1-M relationship it is in with the 3rd class...
You should have 3 classes, for each 1->M relationship, use a collection
to house the objects.
i.e,
Parent
Property Child as List(of Child)
Child
Property GrandChild as List(of GrandChild)
GrandChild
just a bunch of properties
your parent object - you may even want to inherit from a base object so
that you can put in generic helper functions (i.e. Save to Database,
Delete, etc.)
You should also take a look at LLBLGen Pro and Typed Datasets - LLBLGen
Pro is a OR Mapper which does this sort of mapping for you. Typed
Dataset is a VS.NET feature which does something similar but is MUCH
more primative ;-)
--
spamhoneypot@xxxxxxxxxx (Do not e-mail)
.
- Prev by Date: Re: Pulling first name out of a name column in DB
- Next by Date: Re: how to open .doc within vb.net?
- Previous by thread: Pulling first name out of a name column in DB
- Next by thread: Showing an email as read after viewing
- Index(es):
Relevant Pages
|