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]
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]
http://dir.gmane.org/gmane.comp.php.oxid.general_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general