Perl Monk, Perl Meditation | |
PerlMonks |
Re: OO Design -- Separating Data from Presentationby adrianh (Chancellor) |
on Dec 13, 2003 at 02:26 UTC ( [id://314453]=note: print w/replies, xml ) | Need Help?? |
so what is the correct way to tell my data object how it should present itself? Of course there is never the correct way :-) However, it might help to split the functionality into three layers:
So all the report specific information stays in the Report class. All the output-format specific information stays in the ReportRender classes. Hopefully this makes some sort of vague sense :-) Update: Just noticed - this was my 1000th post. Gosh.
In Section
Seekers of Perl Wisdom
|
|