Hello,
A small comment about capitalization: <tablename in singular>ID ; notice the
uppercase ID because it is easier to read :).
As far as the rest goes... I guess it's just an issue of preference. I
personally prefer java-style, like in getItemProperty(). It somehow looks
weird to have something like my_object->get_item_property(). It sure does
look better if you make that myObject->getItemProperty() ! Just like
phpWebSite looks better than php_web_site ... :))
But as I say, this is my -personal- preference and coding style. As I said
in one of my earlier E-mails, all of my PHP code is strictly object
oriented, as far as PHP allows it, and thus I have adopted the OOP (java,
c++) naming scheme.
Thanks for asking for opinions :)
> -----Message d'origine-----
> De : php...@li...
> [mailto:php...@li...]De la part de
> Todd Owen
> Envoyé : mardi 27 mars 2001 21:11
> À : php...@li...
> Objet : [Phpwebsite-developers] Naming conventions
>
>
> It seems that those expressing an opinion want <tablename in
> singular>id as
> the primary key and ref<primary key name of other table> for foreign keys,
> which is a good method.
>
> I prefer underscores in lieu of StEpPiNg caps for the following
> reasons. I
> think it's easier to read and case is always lower. PHP has adopted it
> (e.g. mysql_fetch_array()) and so has most of the existing
> phpWebSite code.
> Does everyone agree?
>
> --Todd Owen
>
>
>
>
>
>
> _______________________________________________
> Phpwebsite-developers mailing list
> Php...@li...
> http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers
>
|