Monday, July 5, 2010

Vietnam - 2. Standardizing

Existing Office
There isn't any problem with setting up the office Vietnam as we already have an existing office with about 20 CSR. The CSR are working around the clock. We moved in, share the existing facilities.

SVN & Linux
Initially, I setup the subversion and local development environment. As a Linux geek, I forced everyone to use Linux, Ubuntu distribution. I don't see the need for Windows at all. Here are some reasons I think Linux is better. At least for our PHP developers.
  • Free, easy to install
  • No drivers needed
  • Haven't got any complaint from our staffs about virus
  • Represent our server environment
  • Staffs cannot do much beside working
  • The list is endless...
There are many cases you need Windows. Please do not argue here as I don't want to end up fighting the never ending war between Windows and Linux.

Coding Standard
I divided the coding standard to 3 sections:
  1. PHP - Most of our web projects are based on the Zend Framework. Hence, we use the Zend Framework coding standard.
  2. Database - Coding standard for SQL is a little bit tricky. I couldn't find any standard that suit our needs. I have to invent my own standard. Here are some guidelines:


    • Database name: lowercase, usually project name
    • Table name: plural, uppercase first letter, then CamelCase. Only the last word is plural. E.g.: UserProfiles
    • Reference table name: we use the word Maps to indicate. E.g.: UserGroupMaps
    • Field name: singular, uppercase first letter, then CamelCase. E.g.: FirstName, UserId
    • Primary key: should be the singular table name follow by Id. E.g.: UserId
    • Avoid using `-` and spaces
    • All table, field, functions, triggers, stored procedure names should be as meaningful as possible.
    • Never use abbreviation. Some people understand others don't, so avoid using it.
    • SQL keywords must be CAPITALIZED
  3. CSS - All our web projects are using jQuery extensively and we are planning to keep it that way. jQuery/UI using hyphen `-` as word separator for CSS, we will stick with it. The key is making the class name as meaningful as possible.
The key here is to make everyone using the same simple standard. Talking the same language. Thinking of the same concept.

I long know simplicity is the key! Can I simplify it?

No comments:

Post a Comment