Demystifying Theme “Frameworks”

I was browsing around yesterday looking for topics to write about in WordPress and I came across someone asking a question that is kind of common: What’s a theme framework? Is _s one? Is Genesis? What about X Theme?

At a basic level, you’ll see most people refer to any of those three with the term “framework” but the meaning is quite ambiguous. Each of them serves a pretty distinct audience and in a pretty distinct way. (And though I chose what I think are common and representative samples it is the case that all of these have many many alternatives that are subtly different.)

My hope is that this article can help users and developers get a broader sense of how the term “theme framework” is used by different people and how that definition includes and excludes various things when seen slightly differently.

A Quick Definition From Elsewhere to Center our Discussion

It’s almost cliche, but it’s useful to pull in an outside definition of the term “framework” so we have some clarity about what we’re talking about. Wikipedia‘s is pretty good:

a software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software.

The important things about this definition around software is that we’re talking about something that provides a basis of functionality upon which you build customization. It is also the case in this definition of a “software framework” that the idea of a “framework for knowledge” or similar, doesn’t fit. But framework is also a common English word, so one understands it has uses outside of this narrow definition.

To quickly highlight the ways this definition doesn’t match casual use, here’s an article about theme “frameworks” on aThemes which bundles two of these three types of “frameworks” for themes together. Our goal is to not do that here.

Parent Themes as “Frameworks”

What Genesis typifies is the pattern of something being called a “theme framework” when it’s really a “parent theme.”

What Genesis typifies is the pattern of something being called a “theme framework” when it’s really a “parent theme.” If you’re familiar with the idea of parent and child themes in WordPress (and if you read this site at all regularly, it’s something you probably already know) you know that almost any theme can be a parent theme. So long as it itself is not a child theme, any theme can have that role. For the technically inclined, that basically means that if the top comment block in a theme’s style.css has this line:

Template: genesis

genesis-screenshotIf this is there, it’s a child theme, and can’t be re-childed. This is part of what makes the Genesis ecosystem different. Unlike many other themes that are sold in the world, Genesis themes that are sold are always child themes. This means that if you want to modify the “Genesis theme” you bought, you have to either modify it directly (which to much of the WordPress community is now a no-no) or do it via a strange plugin hack. Neither is ideal to my mind, but a broader discussions of the merits of that pattern is too big a topic for this article. (Some of the other design history and merits of Genesis were discussed in this article I wrote last August.)

What makes sense about calling a parent theme like Genesis a “framework” is that it fits well within the Wikipedia definition. Genesis provides the basic framework — bundle of logic and functionality — of your pages and makes all that WordPress theming piping take place for you, and you just need to hook in and change things in places where you want to.

Starter Themes Are Built Atop

The next thing that sometimes gets lumped into the idea of theme frameworks are what I’d call developers’ starter themes like _s. Not to be confused with the JavaScript library Underscore, Underscores (or _s) is the most-cited and most influential starter theme.

With all “starter themes”, you as the developer take full control over all the code in it immediately.

Underscores is the basis from which all the Twenty X themes (Twenty Twelve, Twenty Sixteen, etc) are built. It’s also used in many other themes by folks at Automattic and other places. And it’s often the best theme for you to follow if you want to know about theme-specific features coming in future version of WordPress. Many functions from _s have migrated into WordPress, and _s often supports other new features first.

underscores-starter-theme-frameworkThe Underscores theme is quite a different thing than Genesis though, even though it also is labeled a “framework” at times. Where Genesis is meant to be the untouched (by you as a theme creator or tweaker) basis for everything you do, _s is meant to be taken over by you as soon as you start on a new theme. This means two basic things:

  1. A non-developer doesn’t see or know of theme-starters like _s or what they do.
  2. As a developer, you don’t ever “update” _s once you’ve started working on a theme.

These two go hand-in-hand. If one were not true, the other wouldn’t be either. But because of the way they stack — you own _s as soon as you fill in that blank with your theme name and download the files — a consumer never knows the difference. For people who want to build theme in the “WordPress-iest” way, _s is a great choice.

With basically all “starter themes”, you as the developer take full control over all the code in it immediately. In Genesis you just tweak via child themes and leave Genesis intact to handle compatibility with WordPress for you. In an _s theme, you’ve branched off and are doing that on your own.

Fancy, Highly-Marketed Builder Themes

I linked it earlier, but most of the “frameworks” in this aThemes article entitled “15 Best WordPress Theme Frameworks 2016” (unironically, that’s some well-executed SEO content ideation right there…) are actually page-builder themes like X Theme or Divi. These are the least-close to the Wikipedia definition or my casual understanding when I say “framework” in the context of WordPress. But in some ways they fit the mold perfectly.

The core thing about page-builder and other themes that are neither parent themes nor starter themes is that they’re not really meant for developers who are relatively comfortable with PHP, HTML, and CSS.

The core thing about page-builder and other themes that are neither parent themes nor starter themes is that they’re not really meant for developers who are relatively comfortable with PHP, HTML, and CSS. If you’re not comfortable with those things, these feature-full themes can give an average user abilities they previously only dreamed of. The ability to seamlessly move into a theme, and click lots and lots of interface buttons to deeply change the way pages and sites look can be really good for a lot of people.

But it’s not for me. And it’s not exciting to a lot of other developers. So I have a tendency to turn my nose up at people talking about using these themes. I’m not saying that I’m right to do that — I pretty categorically think that’s a small-minded reaction — but it is something I and many others will instinctively do.

Part of the reason I turn up my nose when seeing these themes called “frameworks” is that they fall far afield of our Wikipedia definition. The Wikipedia definition typifies what “framework” means in software, and because it doesn’t match this use, this use often feels like pure marketing lingo.

It is worth saying: because they don’t have the parent-theme nature of something like “Genesis”, some of these themes can be customized with childing theming. Because of the builder-nature I wouldn’t expect that to be super common, but it would be possible.

Many Alternatives, Fuzzy Language

Part of the reason that “theme framework” is a complicated term for many people who aren’t well-versed in the WordPress intricacies involved is that “parent theme” is a bunch of technical mumbo-jumbo until you start to get to the root of what a theme is and how it works. So too with the idea of a starter theme. And when you’re new to it, just having an interface that promises to enable to do whatever you want sounds like a pretty excellent “framework” on which to build your website.

Even after discussing it, I can’t say with certainty before I do a little research where in these three buckets something being called a “framework” fits without further research.

This is the heart of this issue. Even after discussing it, I can’t say with certainty before I do a little research where in these three buckets something like Sage (which used to be called “Roots” I think) fits. But from a quick perusal of their page, I see a “Why Sage, not Underscores?” button, and now I know. Sage is a starter theme, the basis upon which a developer would make their theme (as if from scratch).

But with an ecosystem as large as WordPress, it’s impossible for anyone to keep track of every alternative “framework” and what they really mean by that under the hood. Understanding that there are three big buckets: parent themes, starter themes, and page-builders can help a lot. Each type will be labeled as a “framework” somewhere in the WordPress world. And that’s the way it is.

Image credit: Dakota Roos via Unsplash.com


2 Responses

Comments

  • Valentina Smith says:

    Hey David! thats a really thoughtful article on theme builders. Yet i would like to suggest another rising theme development framework which is classy yet complete development tool! its called TemplateToaster. Hope peeps like it!

  • Great write-up!
    My personal favorite starter theme is _s. I find it very forward thinking.

    As far as WordPress frameworks go – not sure if you’ve heard of the recently released project, meant to serve as a leader-board for open-source frameworks for WordPress plugin & theme developers. It’s called IncludeWP – https://includewp.com/

    After the WordPress.org plugins review team issued a statement that frameworks are no longer allowed in the official plugins repository I feel like this is super relevant.
    If anyone knows of any framework that should be there but isn’t – please send a pull request to add it.