Re: oo design question - how to avoid a factory
| From: | Olivier Guilyardi | Date: | Sat, 18 Dec 2004 19:12:35 +0000 |
| Subject: | Re: oo design question - how to avoid a factory | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35146@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On Sat, 18 Dec 2004 17:49:31 +0100, Olivier Guilyardi <ml@xung.org> wrote:I agree you. But, better than "a large statement in the changelog", what about the pear installer issueing warnings/asking questions at install time ? This would be similar to the famous debian's dpkg and could be achieved by a new <warning> tag in package.xml and/or pre/post-install scripts. -- ogHi, Justin Patrin wrote:Well, it would include lots of extra code by default and be useless to those who read the docs. If Structures_DataGrid has yet to go stable BC breaks are ok. You should put a large statement in the changelog which tells the user that there are BC breaks. If their apps fail, they can ask on the list and be redirected to the docs. I say don't put in the large ugly hack. It will just make support harder.On Fri, 17 Dec 2004 12:39:36 -0500, Andrew Nagy <andrew.nagy@villanova.edu> wrote:Now, there may be another solution, to keep bc : In the constructor, issue a warning like "Please use the factory...", and then act as a decorator to the real datagrid. This is very possible because the Structures_DataGrid class is currently an almost empty wrapper. One may say that it's heavy, but it's not for the one who directly use the factory. All of this workaround will only create a bit of overhead for people who didn't RTFM recently, but will keep bc. And it could be wiped out in some future major release. What do you all think about this idea ? Is it an acceptable trick ?Could using a factory instead of a constructor be confusing to the non-savvy user?