Let's say that I'm developing some extensions to ZF and I'm adopting the documented coding standards. I'll use a namespace of NS, so my classes will all be named NS_*. I'll be creating a class that implements an existing and well-defined specification. Let's say I name this class ABC_Spec. There are multiple versions of this specification in use, let's call them revision 1.0, revision 2.0, and revision 2.5. I want to be able to use the same interface regardless of which revision I need, so I'll create one subclass of ABC_Spec for each revision. The question is, if these already-established revision identifiers are numerical in nature, but the ZF standards frown upon numerical names, what's the best naming scheme for my subclasses?

This seems just wrong:
    class NS_Spec_10 extends NS_Spec { }
    class NS_Spec_20 extends NS_Spec { }
    class NS_Spec_25 extends NS_Spec { }

This seems rather vague:
    class NS_Spec_R10 extends NS_Spec { }
    class NS_Spec_R20 extends NS_Spec { }
    class NS_Spec_R25 extends NS_Spec { }

This seems best:
    class NS_Spec_Revision10 extends NS_Spec { }
    class NS_Spec_Revision20 extends NS_Spec { }
    class NS_Spec_Revision25 extends NS_Spec { }

This seems a bit much:
    class NS_Spec_OnePointZero extends NS_Spec { }
    class NS_Spec_TwoPointZero extends NS_Spec { }
    class NS_Spec_TwoPointFive extends NS_Spec { }

I don't see any examples in the current ZF code to compare against. How would you do it?

Thanks,

--
Alex Howansky
Director of IT
Birdview Technologies

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to