Flash Gordon
08-30-2007, 11:33 PM
Hi Guys,
I'm okay with code, so I'm not asking about that. However, I'd like to get a little help with coming up with a OOP structure for a video player; you know, just the standard youtube player.
From what I've learn so far I can rule out the use of several patterns:
Factory - doesn't seem to be any need for a factory
Adapter - I'm creating the code from scratch so no need.
Iterator - I won't be storing any list of data, and if I do it will be xml
Composite - I wont be having grouping of videos with sub videos so that is out.
State - while there will be different states of the player (playing, paused), i don't think this pattern will be used
Facade - i could use it, but i think it is over kill
Decorator - i don't see how right now
So that leaves me with:
Observer - this is built into the way flash event handling
Strategy - maybe?
Command - eh.....
But I also want to keep in mind (and what I haven't in the the past) is "A class should have only one reason to change" e.g. 1 class 1 job.
Could I get some help how to make a OO video player
Cheers
:)
I'm okay with code, so I'm not asking about that. However, I'd like to get a little help with coming up with a OOP structure for a video player; you know, just the standard youtube player.
From what I've learn so far I can rule out the use of several patterns:
Factory - doesn't seem to be any need for a factory
Adapter - I'm creating the code from scratch so no need.
Iterator - I won't be storing any list of data, and if I do it will be xml
Composite - I wont be having grouping of videos with sub videos so that is out.
State - while there will be different states of the player (playing, paused), i don't think this pattern will be used
Facade - i could use it, but i think it is over kill
Decorator - i don't see how right now
So that leaves me with:
Observer - this is built into the way flash event handling
Strategy - maybe?
Command - eh.....
But I also want to keep in mind (and what I haven't in the the past) is "A class should have only one reason to change" e.g. 1 class 1 job.
Could I get some help how to make a OO video player
Cheers
:)