Hi Chris,
if the autoloader function (oxAutoload) and/or "oxNew" always loads the
last class, in the chain, and you are using the OXID given way ($oObject
= oxNew("oxArticle");), to create an instance, there is no reason to
update all modules at once. In this case backward-compatibility is given.
For the future you have to change your files, but I think with "Find &
Replace" it costs not much time to update your code.
Best regards,
Stefan Krenz
Am 10.05.2011 12:54, schrieb Chris Jolly:
> Hi Martin,
>
> I like the idea of better IDE support and auto-complete, but I'm not
> happy with the idea of changing hundreds of class files we have - the
> cost is not worth the benefit. Also, you'd have to guarantee backward
> compatibility for modules with the old class structure for the following
> reason:
>
> If you upgrade a running system to the new class structure and there is
> no backward compatibility, you'd need to do a one time upgrade of ALL
> the modules, which I don't think is feasible. Our customers have modules
> from many different vendors, ALL vendors would need to agree to upgrade
> ALL their modules at exactly the same time - I don't think this is going
> to work...
>
> Regards,
> Chris
>
> ------------------------------------------------------------------------
> *From:* Martin Brotzeller <[email protected]>
> *To:* [email protected]
> *Sent:* Tuesday, May 10, 2011 11:50 AM
> *Subject:* Re: [oxid-dev-general] Idea to replace the "oxNew" function
>
> Hi,
>
> Am 10.05.2011 11:27, schrieb Alfonsas Cirtautas:
>> Hi,
>>
>> Did you considered just using PHPDoc for autocomplete type hinting ?
>>
>> /* @var $oArticle oxArticle */
>> $oArticle = oxNew('oxarticle');
>>
>> Tested on Zend studio and NetBeans
>
> Compare pressing F4 in Zend Studio for a Class with multiple levels of
> inheritage (e.g. models in Zend Framework) and an oxid class that has
> been overloaded multiple times (when multiple modules extend e.g.
> oxarticle).
>
> Also, you dont have an oxArticle where you have an instance of
> oxnew('oxarticle') always - plus you don't usually go change the
> docblock everywhere when you change the setting of the modules.
>
> The way Stefan suggested it works automatically for everyone
>
> regards,
> Martin
>
>
>
> --
> Mayflower GmbH / ThinkPHP [email protected]
> <mailto:[email protected]>
> Pleichertorstrasse 2 Tel: 0931 / 35965-16
> 97070 Würzburg Fax: 0931 / 35965-28
> * http://www.mayflower.de/ * http://blog.thinkphp.de/
>
> Mayflower GmbH, Standort Würzburg
> Firmensitz: Mannhardtstrasse 6, 80538 München
> Registergericht: Amtsgericht München, HRB 142039
> Geschäftsführer: Gregor Streng, Björn Schotte,
> Albrecht Günther, Johann-Peter Hartmann
> _______________________________________________
> dev-general mailing list
> [email protected] <mailto:[email protected]>
> http://dir.gmane.org/gmane.comp.php.oxid.general
>
>
>
> _______________________________________________
> dev-general mailing list
> [email protected]
> http://dir.gmane.org/gmane.comp.php.oxid.general
--
Stefan Krenz Mayflower GmbH
Pleichertorstraße 2 Tel.: +49 931 359 65 1163
D-97070 Würzburg Fax : +49 931 359 65 28
[email protected] http://www.mayflower.de
Mayflower GmbH, Standort Würzburg
Firmensitz: Mannhardtstraße 6, 80538 München
Registergericht: Amtsgericht München, HRB 142039
Geschäftsführer: Gregor Streng, Björn Schotte,
Albrecht Günther, Johann-Peter Hartmann
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general