I am currently building HealerPress, a website builder for healers (SaaS) build on WordPress MultiSite. Coming from Yii, developing in WordPress is a big shift. The structure and concepts are quite different, and the initial plunge into procedural code is a shock. But, after awhile you get used to thinking differently and can appreciate how the stability of the code has allowed for such a rich eco-system to grow. Plus, you are free to use OOP and even an MVC approach in your plugins.
I’ve been researching tools and frameworks for WordPress to assist in rapid application development. Unfortunately, there aren’t a lot that are designed to help you build from the ground up. For better or worse, the accessible power of WordPress means a lot of projects that seem to be (or start out being) for developers, are actually trying to “make development easier for non-developers”. Non-developers don’t want (or don’t know how) to write code, so these solutions are cluttered with UIs that let a non-coder approximate creating functionality that you would otherwise have to hand-code. The result is more bloat and less flexibility.
I am not interested in these solutions because I want to build custom functionality that is clean and streamlined. So, that excludes a lot of “frameworks” that are actually theme frameworks–they let you build themes rapidly, but not apps.
For example, I’ve abandoned using Genesis for this project, which I’ve used for years as a theme framework, because I kept removing functionality and eventually it seemed pointless to even build on it. It’s great for rapid blog development, where it’s just a matter of tweaking the surface layers and copy and pasting some filters and functions for some customization. But it has it’s own structure that conflicts with the options and functionality I want to give my customers, so there’s no point in using it to build this web app.
But there are some tools out there that help. Here’s what I have ended up with so far.
Starting theme: Roots
Roots is build on HTML5Boilerplate and Twitter’s Bootstrap, which were my basic criteria. I also considered Bones as it is also based on HTML5Boilerplate, but not on Bootstrap. I am in love with Bootstrap, so I went with Roots.
I removed some of the functionality, like the URL-rewriting, which I find not all that exciting and which has been known to break in MultiSite. I’m not a fan of activation-hooks in general, so I disabled all of them.
Because LESS compiles CSS, you need to have all your CSS interpreted at once in order to take advantage of variables and mix-ins. That means that it would be pointless to have some LESS in my parent theme and some in my child theme, unless I could chain them all together. So that’s what I’m doing.
I have created an import trail which first imports Bootstrap, and then defines LESS at the parent-theme level and at the child-theme level, letting each level override the previous ones. It’s pretty spiffy and should let me minimize the number of files the child themes have to have. This is the import flow:
- Bootstrap variables
- Parent-theme variables
- Child-theme default variables
- Any variables set through the user’s admin options
- Bootstrap LESS
- Parent-theme LESS
- Child-theme LESS
By importing all the variables first, later files can override variables in earlier files, before any of those variables are used in expressions. It’s awesome.
Since everything is imported into the last LESS file in the child-theme directory, that’s the one you set the compiler to convert to CSS. Easy-peasy.
Admin User Options
While I prefer convention to configuration, I want to let people change the window dressing, like colors and fonts. Defining option pages from scratch is a bear, so I wanted to find some kind of helper to make it easier. I found the Upthemes Options Framework, which seems promising, although I haven’t dug into it yet.
Piklist also promises to do this, and I will compare them — Piklist is brand spanking new (still in Beta) so I’m not sure how well supported it is or even who is sponsoring it. Where’s your About page guys? (OK, after some more digging, I found it is build by SlipFire, which seems to basically be Steve Bruner, who is active in the WP community. He says “we” and that he is a “partner” but who the other person/people are is not mentioned and he seems to be the only one doing commits. Hmm.)
Misc Other Stuff I Found
The PODS framework is interesting (v2 is in alpha), and I might use it in building HealerTree. It seems to be going toward the “support non-coders” approach with more UIs, so I’m not sure how that will impact performance and functionality.
InfiniteWP is massively helpful in administering multiple independent blogs. I’m not using it for this project, but I use it to keep all my other blogs updated so I thought I’d mention it.
WP-MVC - I really wanted to use this, but it doesn’t seem well enough supported – just one developer, and when I wrote him he said he just got a job at a startup…so I didn’t want to base my app on it.
Widgetkit – I don’t think this will be useful for me, but it might be useful for someone.