So I was wondering what the best method may be to access the model to add a
playlist.
Some say the best way is to create a wrapper function to the MusicPlayer
class, that simply runs the method of the model. But then I need to create
extra kinda useless functions in the MusicPlayer class.
So what would you guys do?
I would add the 'useless' functions :)
dont worry about their content, focus on the API that you are presenting.
If im using your music player and i see
MusicPlayer.addPlaylist
its obvious what its for and i'll happily use it. I dont care if it just
delegates to the model without doing anything else. Im quite happy not even
knowing there is a model. :)
Of course you could choose to allow the client code to access the model through
a MusicPlayer.getModel but you probably dont need to expose that much of the
internals.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com