On Sun, Apr 11, 2010 at 8:14 AM, Piotrek Karas
<p.karas.li...@mediaself.pl> wrote:
> Hello,
>
> 1) What is/was the rationale behind this separation? I think I
> understand technical consequences, but I fail to see the reasons... The
> guidelines say: "The implementation of the properties happens in the
> __set() and __get() magic methods to allow value bounds checking and
> access control.". Wouldn't that be possible with traditional getters and
> setters? I would be grateful for some example illustration here.

I think it's just a matter of taste. I myself don't have time to make
a lot of boilerplate getter/setter/isseter/unsetter functions for each
property. For example, that would be maintaining 32 boilerplate
functions for 8 simple properties, i'd just end up implementing a
__call() for property access, which would not make sense. I've seen a
lot of this boilerplate code in Magento and i found it annoying.

> 2) What method of deciding which would become an internal property and
> which would become $properties[$name] would you recommend? Any golden
> rule here?

I use $properties for everything because, most recent components do as
far as i know.

> 4) Also, is this how inheritance is achieved with the $properties?
>
> [...]
>
> Would that be correct?

Yes, in most cases.

> 5) Would you recommend to stick with eZC way? Why? Why not?
>

Any coding standard is ok, as long as you're using respecting it all
along your project

-- 
http://jamespic.com/contact
Customer is king - Le client est roi - El cliente es rei.
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to