Nice input.
To be honest, I’m in no position to talk about best-practices using PHP, as well as MODx. I’m just happen to be a computer science student who knows a little bit about coding, and have a really hude interest in web development project. I learned PHP while it’s still in version 3 for a month or so. I use ASP .Net before I join MODx community for this past few months, and I had built a framework using that .Net framework, and I’m an unsatisfied programmer with the current bloated system that causing the system to run slow in older machine, even though there are a lot of good things on .Net framework as well. I soon realize that the development on .Net framework is relying too much on their visual studio IDE, which causing me a lot of headache to learn that super-power IDE. So here I am, learning from scratch about all the PHP language, and if you guys would excuse me, all the past conversation that we have is basically emphasize too much on the PHP language itself, because I want to know more about PHP language, so without realizing it, I drag guillaume to explain it further for my own advantage.
So to cut the story short, here is my opinion.
I totally agree with the concept of not forcing coding style to each developers, even though I’ve never been involved coding in a team, which all developers got their own coding style and etc, but as the core developer, I would prefer to read my code in my own coding style, and the additional developers need to be able to adapt to that coding style. I think this is the number one rule for programmer, to be able to accept other people coding style, and in fact use that coding style in working on that code.
Having a simple list of things that need to be avoided when coding in PHP, and a specific reference articles that developers able to read before starting to code will be awesome, even though it’s unrealted to MODx, but we can help all those programmers who are starting to use PHP to know it (a good example will be me). We don[’t have to maintain it extensively, but having it as a reference link will be great don’t you guys agree with me?
Talking about imparting knowledge, I’m 100% agree to that. MODx can be seen from 2 different point of view. The first one will be from the end user, as a full-fledge content management system, while on the side, it can be seen as a full-fledge content management framework for advanced users. By imparting knowledge, the documentation that we have right now needs to be divided into two. The first documentation will be composed for the end users and all people starting with MODx, while the other documentation will be aiming towards the developers documentation. Basically drupal documentation serve as a good example for us to see the importance to differentiate between this. If we have the documentation separated, we can start having an impartation of knowledge from developers’ point of view and end users’ point of view. With this, it won’t make the documentation for the end users too complicated, and it won’t make the developers’ documentation too easy and uncomplete, and causing a new developers got confused on where to start building something on top of this framework.
Another important thing will be the folders structured and commenting structure. I believe this won’t cut down the creativity of the developers, instead it will increase consistency between each resources releases, and making it a lot easier to be used by other people. The idea of having the commenting to be parsed by phpdoc is a great idea. I’ve tried to follow the phpdoc guideline in my commenting system, but I still find it kinda hard to use, considering that the commenting doesn’t have a clear formatting to be read on the code, so most of the time, I ended up coming up with my own commenting system that looks like phpdoc format, but it’s not.
Anyway, more input discussion will be awesome.