K
Keith
VB.Net2003, Win XP
I plan to build an interface to view video clips, and associate any of a
number of "flags" with each clip (videos are research data, with flags for
any of a number of participants, behaviors, etc. who are in each clip).
I was originally thinking that I'd need to learn more about databases and
just track all my flags in a database, but now I'm wondering if I should
build a "videoclip"class and associate each flag as a property. I'll end up
with a lot of unused properties on each instance of the class (each clip has
less than half the participants, and a random number of behaviors), but it
seems conceptually simpler- then I'd just need to figure out how to save,
load, and unload the data from class instances each time the program is
loaded or exited, for persistence of the data (maybe as an XML file?)
Class VideoClip, an instance might contain properties such as:
.Filename = "c:\SubjectData\Videos\060206_17.avi"
.VideoCaptureDate = "06/02/2006"
.VideoCaptureLocation = "West"
.Participant1Present = False
.Participant2Present = True
(etc)
.Behavior1 = True
.Behavior2 = False
.Behavior3=True
(etc)
or maybe I should use arrays?
.AllParticipants(False,True,True,False,False,False,False)
.AllBehaviors(True,False,True,False,False,True)
(of course, if my base list changes, then I might have a problem with
backward compatibility)
This would make it extra easy to find the clips since I have the filename
property embedded, and I'd just have to learn how to cycle through instances
of the class using an array and associate that instance with the player
window, so I could play the clip while showing (or editing) the properties
Is this an appropriate use of a class, or should I stick with a database
approach? I've done some VBA programming, and some very basic VB.net CF
stuff, but I'm very much a newbie at this- especially design issues, since I
haven't used the full framework before.
Thank you,
Keith
I plan to build an interface to view video clips, and associate any of a
number of "flags" with each clip (videos are research data, with flags for
any of a number of participants, behaviors, etc. who are in each clip).
I was originally thinking that I'd need to learn more about databases and
just track all my flags in a database, but now I'm wondering if I should
build a "videoclip"class and associate each flag as a property. I'll end up
with a lot of unused properties on each instance of the class (each clip has
less than half the participants, and a random number of behaviors), but it
seems conceptually simpler- then I'd just need to figure out how to save,
load, and unload the data from class instances each time the program is
loaded or exited, for persistence of the data (maybe as an XML file?)
Class VideoClip, an instance might contain properties such as:
.Filename = "c:\SubjectData\Videos\060206_17.avi"
.VideoCaptureDate = "06/02/2006"
.VideoCaptureLocation = "West"
.Participant1Present = False
.Participant2Present = True
(etc)
.Behavior1 = True
.Behavior2 = False
.Behavior3=True
(etc)
or maybe I should use arrays?
.AllParticipants(False,True,True,False,False,False,False)
.AllBehaviors(True,False,True,False,False,True)
(of course, if my base list changes, then I might have a problem with
backward compatibility)
This would make it extra easy to find the clips since I have the filename
property embedded, and I'd just have to learn how to cycle through instances
of the class using an array and associate that instance with the player
window, so I could play the clip while showing (or editing) the properties
Is this an appropriate use of a class, or should I stick with a database
approach? I've done some VBA programming, and some very basic VB.net CF
stuff, but I'm very much a newbie at this- especially design issues, since I
haven't used the full framework before.
Thank you,
Keith