Summary
In this chapter, we first looked at our use case and evaluated whether it makes sense to use metaprogramming here. Since we’re building a DSL with clear requirements and proper implementation already done, it was an easy choice to make the interface cleaner by adding a layer of metaprogramming.
Then, we designed our DSL based on what would provide the best experience for developers using our project. Once we had the requirements and design ready, we used the constructs of metaprogramming we learned in Chapter 8 to build DSLs for both Controller
and View
.
Just as we learned in Chapter 8, building a DSL is only half a job done. We proceeded to add introspective features and test helpers to allow for easier adoption, testing, maintenance, and debugging. We also updated the web app from Chapter 7 to work with the new DSL and ensured everything worked the way we expected it to.
Now that we have built a DSL for our Controller
and View
modules, the book’s last...