|
I’m experimenting with inheritance… I’ll
try to be concise explaining what I’m up to… My app contains Pages, Modules, Categories and Products, all
objects that are quite similar. Each is used to generate a static page to
display in the browser, and each has common attributes (ie meta_keywords,
filename, template_id etc.) The only difference really is in the way they
get their actual content; pages fetch simple html from the database, categories
fetch and display their associated products, and a product fetches its
description etc. Modules actually read xml config files to build very
specific content – store locator functionality and the like. So am I on track to assume I can have my Modules, Categories
and Products extend Pages? Then I just overwrite the getContent()
function to suit the specific needs? If that much makes sense, how to I handle nested
templates? For example a Page uses a Template to render itself, as do the
other objects mentioned. But a Category will have a Template of type Page
(to render the browser page) and also a Template of type Category (to determine
the way its products should render on the page). Similarly, a Product
needs a Page Template as well as a Product Template. It scarcely makes sense to me, so if I need to clarify let
me know… (By the way most of the conversation on this list goes over
my head so use small words and speak slowly… ;)) Thanks, Paul You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- [CFCDev] inheritance advice Paul
- Re: [CFCDev] inheritance advice Barney Boisvert
- RE: [CFCDev] inheritance advice Kerry
- Re: [CFCDev] inheritance advice Chris Stoner
- Re: [CFCDev] inheritance advice Barney Boisvert
- RE: [CFCDev] inheritance advice Roland Collins
- RE: [CFCDev] inheritance advice Seth MacPherson
- RE: [CFCDev] inheritance advice David Harris
- Re: [CFCDev] inheritance advice Peter J. Farrell
- RE: [CFCDev] inheritance advice Programmer
- Re: [CFCDev] inheritance advice Chris Stoner
