Basic wordpress development rules : how to implement good coding design
wordpress developers work in 3 areas
- Graphic / web design : css, html, php
- Technical / software analysis : php
- Hardware / database and server management : mysql / apache
10 rules to be a good wordpress developer
- Search before you start : if you need something done, 99% chance someone has done it before. Search wordpress plugins database , search wordpress forum, search wordpress free and especially commercial themes where you find stuff that's worth the few dollars they ask for it, and finally search google where a lot of solutions from personal blogs are indexed
- Check the dates : if you are lucky enough to have found a piece of code, tutorial or plugin that makes it, be careful of old stuff : wordpress evolves fast and some solutions to an old problem might have been solved by subsequent releases, or have become inefficient because of new features within wordpress and its codebase. don't allow stuff older than 2 years to waste your time.
- Learn the codex : If you really need to code, don't go without learning basic possibilities that wordpress gives you : custom post types, taxonomies, template system are essential concepts to master, and without coding much accomplish a lot
- Think simple : a lot of layout problems can easily be fixed by manipulating images or style sheets. Before you look into the theme or plugin folder, think about graphic design first and then code to code.
- Think generic : if you do it once, why not do it for good ? take 10 minutes to expand your problem to more general solutions, and always think of the possibility of releasing your code to the world via your blog of via the wordpress plugin repository. The main idea behind this is that out there your creation will have a life of its own, will be reviewed by thousand of interested engineers and will benefit of a few enhancements from the minority of users that behave like you did.
- Get close : if someone has done something very near to what you need, use it and enhance it. Exemple : we needed worpdress widget to link a specific url on the widget title, we enhanced some coding done by some guy and were 100% satisfied
- Pick your framework : WordPress is particularly famous for the amount of thrid party solutions distributed for a small fee. Theme framework are basically advanced layouts with a lot of options that require some learning curve before you get to master them, not to mention wordpress core. The ideal solution for learning a framework is to find one layout that fits your customer's requirements and choose it then learn via a specific project.
- Reuse : even if some solution is not perfect, try to stick to what you know. Existing plugins that you know is better than a plugin you don't know for many reasons, including maintenance work that is a strong characteristic of wordpress plugins.
- Folder Hierarchy : when getting deep inside the theme functions coding, use includes in a specific folder with your company name in it. When you get back to it a few months later you'll know instantly you are responsible for those parts of code. It makes things easier to debug or evolve when you know it's yours
- Document your code : there are two solutions for documenting what you have done. First is to do it alone on your files. Second it like we said before, go opensource, write about it, let people know what you have done, they'll thank you for it (sometimes pay) or bring new solutions on top of what you have brought. Good luck