Re: [PEPr] Comment on Util::Util_Observable
| From: | Heino H. Gehlsen | Date: | Fri, 23 Jul 2004 20:06:05 +0000 |
| Subject: | Re: [PEPr] Comment on Util::Util_Observable | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32291@lists.php.net to get a copy of this message | ||
Hans L wrote:
> > While the suggestion to add an “Interface(s)” category at
> > first seemed appealing, it leaves the fact that I’ve also
> > proposed a reference class rather problematic doesn’t
> > it – where should such classes be located then?
>
> I'm not sure the reference class really is necessary.
Of cause it’s not critically necessary, since one could always reinvent the
wheel, but most my guess is that most implementations wouldn’t consider
serialization etc.
> It's a very simple bit of code & would never really stand
> on its own anyway, right?
Personally I wouldn’t bother rewriting the complete pattern, if I could
simply extend an already existing class.
Bear in mind that in Java the java.util.observable is a class not an
interface (the class doesn’t even implement an interface); only
java.util.observer is an interface. The observable implementation in Java is
also a very simple bit of code; it does however stand on its own, right?
Personally I find the proposed interfaces and classes more flexible that
those in Java, since developers is able to write their own implementation,
and I do think the classes should be taken into consideration (when naming
the package – even if they are not included at first).
> I would make the reference class an example in the documentation
> rather than a part of the proposal .... just my .02.
Reference implementations doesn’t always have to be simply examples,
sometimes they are actually fully functional applications. Tomcat for
instance is the official reference implementation for the Java Servlet and
JavaServer Pages technologies…
Regards,
Heino