seventheyejosh Posted August 19, 2010 Share Posted August 19, 2010 Hey guys, my coworker and I have decided to start coding our code to a standard. We are given pretty free roam on most everything, so up to this point we've kind of just coded whatever. Now that our application is getting to be quite sizeable, we want to rectify our past ways and adopt a standard. I figured that we'd just go for the PEAR standard: http://pear.php.net/manual/en/standards.php , but one of the comments on there, or somewhere, mentioned the phpBB standard. So I had a looky at that, and I think it is a little cleaner looking: http://area51.phpbb.com/docs/coding-guidelines.html . My question is, would it be bad to learn a whole standard such as the phpBB which is not 'official' as opposed to a more popular one such as PEAR? In your experiences, would an employer want you to code to 'A' standard, or code to 'THE' standard? If that is too confusing, firstly my bad, secondly the simple question is should I learn PEAR, phpBB, or some other standard? And, should I learn the SQL standard? Or just learn the SQL standard for the standard I learn ( I saw phpBB had one, not sure about PEAR). Thanks! - Josh Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/ Share on other sites More sharing options...
trq Posted August 20, 2010 Share Posted August 20, 2010 In your experiences, would an employer want you to code to 'A' standard, or code to 'THE' standard? There is no 'THE' standard. The idea of using any standard should suffice. I use Zend's which is a port of the PEAR standard I think. should I learn PEAR, phpBB, or some other standard? It depends. You can easily enough define your own. Your best bet however is probably to find one you like or code similar too already and role with that. There are tools like CodeSniffer around too which may help you stick to these standards depending on how much you want to enforce them. Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/#findComment-1101493 Share on other sites More sharing options...
seventheyejosh Posted August 23, 2010 Author Share Posted August 23, 2010 I really like the look of the Zend standards, they seem quite clean. Does anyone else have a preference or thought on the matter? ( Daniel0 ) Thanks! - Josh Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/#findComment-1102784 Share on other sites More sharing options...
Philip Posted August 23, 2010 Share Posted August 23, 2010 I have my own standards, that are a mashup of a few different well-known ones. Just be sure if you do your own to have it well documented for others on the team to be able to follow your own standard (if you so choose) Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/#findComment-1102786 Share on other sites More sharing options...
JasonLewis Posted August 24, 2010 Share Posted August 24, 2010 I'm the same with KingPhilip, I never really followed another standard but I keep to my own standards that are, like KingPhilip said, a few standards all in one. Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/#findComment-1102932 Share on other sites More sharing options...
JonnoTheDev Posted August 24, 2010 Share Posted August 24, 2010 I really like the look of the Zend standards, they seem quite clean. Since these are the guys who created the core PHP engine, it is probably the best standard to adopt, especially if you are going to release code. However, as others have said, there is no right or wrong with this subject. Quote Link to comment https://forums.phpfreaks.com/topic/211215-code-guidelines/#findComment-1103044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.