From: Andreas A. <a.a...@th...> - 2001-05-13 11:05:51
|
Hi Alex, > well, they're up: > http://www.binarycloud.com/documentation/r2/overview.html Cool. Great work. But think the code conventions are a bit confusing (to me). For example. The mehtod names are named like: "Set_Name". The uppercase/lowercase thing seperates engough, so why add a "_"? and why start with a capital letter (classnames already start with a capital letter). To me it's more smooth to name functions that way: public: setName(); ( $obj->setName() vs. $obj->Set_Name() ) private: _setName(); or that way: set_name(); _set_name(); You alread do: $_my_variable_name vs. $_myvariablename. That should be in line with the other naming conventions. Also the global vairable naming. Varibale names starting with a _ are global. On the other hand methods starting with a _ should be considered as private!? Could be a bit confusing - ok its another context but not very linear, in my mind. At the this is not really as important as other topics. It's important the the conventions (no matter in what form they are applied) are constantly used. So what does the community think? Andi -- BTW: I'm working on a set of code standards for our internal projects. They are heavyly based on PEAR and the Java Code Standards which I think are a good base to work with. We "ported" them to PHP. You can download them here: http://www.thyrell.de/info/downloads/CodeGuide.pdf |