Tripug: PHP Best Practices

From: Bryan
Sent on: Monday, August 16, 2010 10:56 AM
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.

Our Sponsors

  • TEKsystems

    Meeting space and refreshments

  • indieconf 2013

    $20 discount off indieconf 2013 - use code TRIANGLEPHP to save today!

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