[Tutor] class design

ALAN GAULD alan.gauld at btinternet.com
Sat Jun 6 19:30:12 CEST 2009



> In simple terms I was trying to create a 'folder with a view' which
> displays all the data it contains on one page, rather than having to
> view each node individually.


In that case I'd probably create a FolderView class with a show or display method.

If you want to do something with the contents then I'd have a Folder object
and associate each FolderView with its Folder -0 which is what Kent 
recommended in another post. But I'd expect the Folder to be doing more
than simply returning the items in the Folder, I'd expect you to be doing
something with it - moving it, copying it, deleting it etc. ie Actually 
manipulating the Folder itself in some way. 

Otherwise the View can fetch and display the contents itself using 
standard OS functions.

HTH,

Alan G.
http://www.alan-g.me.uk/


More information about the Tutor mailing list