Defining Minimum Viable API

Learn to build a minimum viable API by using the smallest set of macros possible.

We'll cover the following

Designing the API

Now that we know the kind of DSL we would like to build, we need to decide how to design our API. The HTML spec includes some 117 valid tags, but we need a smaller surface area to begin our DSL. At this point, we might be tempted to fire up our editor and start defining all 117 tags as individual macros. There’s a better way. Since we define a mini-language with macros when creating DSLs, the best way to begin is to define the smallest set of macros possible to serve as a basis for the broader macro DSL.

Instead of immediately planning to support the entire HTML spec as macros, let’s start with a refined set of macros that can still speak the HTML language.

Get hands-on with 1200+ tech skills courses.