Design an OOD notification template engine
Reported in Delivery Hero European engineering loops. Object model design for template rendering and channel-specific formatting.
Interview scenario
Context for Delivery Hero candidates:
Render personalized templates for email, SMS, and push with reusable placeholders.
Model answer
Try answering aloud first
Cover trade-offs, structure, and a concrete example before revealing the baseline response.
How to frame this at Delivery Hero: Connect your answer to measurable impact, clarity of thought, and trade-offs the team cares about. Below is a strong baseline response you can adapt with your own project examples.
Model Template, TemplateVersion, PlaceholderResolver, and Renderer abstractions. Keep rendering pipeline open for channel-specific formatters while sharing common validation and variable substitution flow.
Use strategy or chain-of-responsibility for placeholder resolution from user profile, event payload, and fallback defaults. Add strict validation so missing mandatory placeholders fail fast before send.
Discuss versioning and backward compatibility: once a template version is used in production campaigns, treat it as immutable and create new versions for edits.
Discussion
Comments (0)
Share how this question came up in your loop, or add tips for others preparing.
Log in to comment on this question.