At 01:26 PM 10/8/2001 +0100, tom smith wrote: >So I've generated my Taxonomy db and python code.... and one of the modules >is called Category.py. > >In general OO design terms, should I add a "writeBody()" method to >Category.py, which maybe gets the id from the SEARCH_ARGS or create a >CategoryPage.py module which calls a method in my Category class? > >Which would you do?
You will need a page class that calls your Category. One reason, is that there will almost always be additional page elements that Category knows nothing about. Namely a header, a footer and commonly a sidebar. In my own sites, I have directories that are named after the objects of interest to the user. Usually plural: http://localhost/Categories/ http://localhost/Products/ http://localhost/Customers/ Inside each directory, the Main.py offers an overview of the Categories. View.py shows the details of a particular Category. Edit.py edits one. Usually Edit.py without any args will create a new one. This system has worked well for me. -Chuck _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
