One of the points of discussion that often comes up among software developers is how to best organize code and files within a project.
Some frameworks enforce for you to follow an organization scheme – such as Rails which prizes “convention over configuration” – and then other foundations, like WordPress, have standards for certain things – like markup and PHP – but don’t have standards for other things.
For example, there’s no real standard on how to name your stylesheet or JavaScript directories. There’s no standard for where libraries should be kept, nor is there a standard for where preprocessed or pre-minified files should be kept.
Sure, most of us have opinions on this, and developers often spend a lot of time (perhaps more time than they’d like to admit) thinking about optimal ways to organize this information, whereas others are happy to dump things in a directory and as long as the project has some semblance of organization (even if it makes sense only to them), they’re good to go.
Granted, there are personality traits at play here, but I digress.
I’m of the former case where I prefer to try to make sure things are highly organized – perhaps to my own detriment – and I try to bring the idea of “convention over configuration” to work I do within plugins and themes.
And though I spend more time talking about plugins, general practices, and other topics here, there are a few guidelines that I’ve been following as it relates to WordPress theme development that I’ve used in both my own projects as well as contract work.
Continue reading