Pros/Cons of using Theme instead of Plugin for customization

With the addition of Splitting up theme Javascript into multiple files, you can effectively do everything a plugin can do with Ember via a theme.

So if you don’t need to create routes, modify serializers, or store custom data, you can likely accomplish your outcome with just a theme.

The biggest challenge we see with custom plugins from a support perspective is site outages. This is usually because the plugin patches into a Rails class or method in core that’s changed and the plugin hasn’t been updated to account for it yet. If something changes on the Ember side and thus breaks the theme or theme component, the site may not render correctly but it can be quickly disabled using /safe-mode.

I can see your point here. I’d also say that gem enables you to develop on your theme locally and sync it to any Discourse site you have an API key to, including theme-creator.discourse.org. You don’t even need a local dev environment set up if you have that one gem running.

10 Likes