On Tue, 5 Jun 2001, Stephen Adkins wrote:
> Several people have commented on this topic.
>
> Is it 1. Widget::HTML::Select ?
> ....or 2. Widget::Select::HTML ?
>
> I believe that "all of the HTML widgets" have more in common
> than "all of the Select widgets". That's why I chose #1 rather
> than #2.
I don't think you can easily make that generalization about all widgets.
I agree with you that for simple widgets, most of the package will be
about how to render the widget. But when you look at a widget like the
Databound Select widget you mentioned in an other email, then I can see a
lot of code that can be shared between all those databound select widgets.
And if we look back at the DateDropDowns widget, It doesn't need to know
anything at all about how to render itself, since it uses three
sub-widgets to do all the rendering work. All DateDropDowns really does
is figure out how the user wants the sub-widgets configured, and handles
splitting and joining the date values (in other words all of it could be
shared across the HTML, WML or Gtk interfaces).
However, I can also see your point about keeping the HTML stuff together
and the Gtk stuff together. So I would be happy using the multiple
inheritance model, where Widget::HTML::DateDropDowns would inherit from
Widget::HTML::Base and Widget::Base::DateDropDowns.
--
Cees Hek
ce...@si...
|