addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [mysql-144] Tripug: PHP Best Practices

From: Michael K.
Sent on: Monday, August 16, 2010 11:05 AM
1) Class names should not be verbs ("sendMail", "manageUsers", etc).
2) Database field names should not be prefixed with "field_" or "fld_"
or, really, anything.

Exception to #2, I occasionally see a table name used as a prefix for
an id, as in
user_id for the id column in a user table.  Not my cup of tea, but
livable if that's the only prefixed field.


On Mon, Aug 16, 2010 at 10:56 AM, Bryan <[address removed]> wrote:
> Michael and I were discussing a project he recently started working
> on, where the developer made lots of "no-nos" including but not
> limited to, creating database tables prefixed with "tbl_", for example
> "tbl_users", etc.
>
> It got me thinking, what are a few best practices? If you were
> speaking to a beginning developer what are some of the things you
> would stress?
>
> Ill start off with a few suggestions:
>
> 1. Use meaning full and consistent names.
> 2. Clearly comment your code.
> 3. ?Don't use short open tags ie) <? ?>
> 4. Use whitespace and indent your code to improve readability
>
> I got us started with 4 basic tips, now its your turn.
>
>
>
> --
> Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
> http://www.meetup...­
> This message was sent by Bryan ([address removed]) from The Raleigh MySQL/PHP Meetup Group.
> To learn more about Bryan, visit his/her member profile: http://www.meetup...­
> To unsubscribe or to update your mailing list settings, click here: http://www.meetup...­
> Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]
>
>



-- 
Michael Kimsal
http://jsmag.com­ - for javascript developers
http://groovymag....­ - for groovy developers
http://indieconf....­ - web freelancer conference
[masked]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy