Thomas Visser Colorless green ideas sleep Swiftly

Exceptional theming at scale

I wrote a post about some of the work I’ve been doing at NewStore:

Our Shopping App platform is powering 40+ shopping apps across iOS & Android, trusted by brands and rated five stars by millions of users worldwide. […] When we started out, we did the logical thing and defined a list of colors and fonts that could be specified for each brand. Whenever a new brand would join, this list grew to accommodate their requests for specific exceptions from the existing list. They demanded exceptional theming, if you will. To steer clear from a future with an ever growing list of colors and fonts we decided to flip the problem on its head. Instead of having each brand project define a finite theme, we began to annotate all views in our platform frameworks with style id’s and classes. Brand-specific code could then define rules for any selection of these annotated views that specified how these views should be styled. If this sounds familiar, that’s no coincidence. This is how styling on the web works too. Great artists steal. To achieve our goal of enabling faster iteration, we knew we had to decouple the theme from the code. We decided to replace the in-code theme with an external theming definition file. […] With the external theme definition and compiler in place, we turned to improving the developer experience. […] Development mode has been a great improvement in developer experience. It has helped reduce the effort it takes to theme a new brand by 33%. We’re happy with our bet on Kotlin Multiplatform, because it’s getting a lot of traction. The next-gen theming project has laid the foundation for the future of our exceptionally themed shopping apps.

Read the full post over at the NewStore Tech Blog.