Re: php5 packages - interfaces
| From: | Aidan Lister | Date: | Sat, 17 Apr 2004 14:27:25 +0000 |
| Subject: | Re: php5 packages - interfaces | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27852@lists.php.net to get a copy of this message | ||
Defining interfaces in any way other than per-package would be dumb, I
think.
I think we should be throwing exceptions using a PEAR Exception base class.
And I agree, the PEAR Base class should be scrapped.
I disagree about putting 5 on the end of Category names, that's a silly
suggestion I think.
I think we should follow standard major release guidelines. XML_Parser5, or
XML_Parser2, I'm not sure if we want to adopt 5 for php5 packages - what do
people think?
"Stefan Neufeind" <stefan@neufeind.net> wrote in message
news:40813A27.25276.11922E9@localhost...
> I don't think that really an interface *package* is need. But there
> could be a recommendation for common method-names with short
> explanations maybe? Somehow like design-patters:
>
> "if you use <this or that> you will usually need function like [...] -
> and if you feel you need them we suggest that you use these names
> where possible"
>
> Something like that. There might even be people which need "connectA"
> and "connectB"-methods - but at least they would be named connect :-
> ))
>
>
> However, I think that defining such intefaces soon makes much sense,
> since it will already take a long while to adopt them everywhere -
> and the move php4 -> php5 is a chance (for API-breaks, in most cases,
> since php5-only will be released as a new major-version) we should
> definitely take!
>
>
> Stefan
>
> On 16 Apr 2004 at 12:27, Joe Stump wrote:
>
> > OK, the only questions I have now are ...
> >
> > 1.) Do we have an outlined upgrade path for package maintainers to
> > follow for the php4 -> php5 transition?
> >
> > 2.) Should I write up a PEPr proposal for a interface package? (maybe
> > one outlining that other packages with factory methods should create
> > their own as well? Kind of an RFC of sorts ...)
> >
> > --Joe
> >
> >
> > > -----Original Message-----
> > > From: Lukas Smith [mailto:smith@backendmedia.com]
> > > Sent: Friday, April 16, 2004 11:33 AM
> > > To: Joe Stump
> > > Cc: pear-dev@lists.php.net
> > > Subject: Re: [PEAR-DEV] php5 packages - interfaces
> > >
> > >
> > > Joe Stump wrote:
> > >
> > > > It would be a simple package for sure, but a standard package with
> > > > interfaces for PEAR packages would be great I think. It
> > > would contain
> > > > a simply a series of common interfaces ...
> > > >
> > > > toArray, toXML, toHTML, etc.
> > > >
> > > > There would probable be other interfaces as well. I can
> > > imagine that
> > > > the
> > > > Net_* packages would have a common interface with functions like
> > > > connect(), disconnect(), etc.
> > > >
> > > > DB should have one for it's drivers, etc. At any rate I think a
> > > > package of common interfaces should be put together in anticipation
> > > > for PHP5.
> > >
> > > I agree that we should start collaborating on a set of interfaces for
> > > common "problems". However using them in actual packages will
> > > probably
> > > take a bit longer as for now our strategy is to have packages
> > > that are
> > > compatible with both php4 and php5. However eventually more and more
> > > packages will likely get new major versions that are php5 only.