Thinking Outside The Marketing Box: Campaign Patterns [Exercise]

In software engineering, a design pattern describes a general, reusable solution to a commonly occurring problem.

Photo by Brian Suh on Unsplash

The playing field

How should we think about Campaign patterns?

Image source:

Creational patterns: The Constructor & The Factory

class Cat { 
constructor(name, voice, favFood) { = name;
this.voice = voice;
this.favFood = favFood;

feedCat() {
return `Your beloved ${} says ${this.voice}. It's time to give ${} some {this.favFood}.`
const saki = new Cat('Saki', 'Miau!', 'Sheba Creamy Snack');
const klein = new Cat('Kleintje', 'Maaaauww', 'Crantanele');
console.log(saki.feedCat()); // Your beloved Saki says Miau! It's time to give Saki some Sheba Creamy Snack.console.log(klein.feedCat()); // Your beloved Kleintje says Maaaauww! It's time to give Kleintje some Crantanele.
/* Incorrect code coming, focus is on the idea */campaign (persona, industry, {
channels: [...]
contentTypes: [...]
class MktCampaign { 
constructor() {
this.createCampaign = function(type) {
let goal;
if (type === 'leads') goal = new LeadGenCampaign();
else if (type === 'traffic') goal = new TrafficCampaign();
return goal;
class LeadGenCampaign { constructor() { ... } }
class TrafficCampaign { constructor() {...} }

Structural patterns: The Adapter & The Composite

Practical application / Challenge

Content strategist working with SaaS companies. Front end developer. Passionate about health, forensics.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store