By Eric Nantz, Host of the R-Podcast and the Shiny Developer Series

As a long-time R user (since version 2.0.0 back in 2004), I have seen more than a few “game-changing” advancements which transformed my entire workflow and opened the doors to new possibilities I never imagined. One of those came in late 2012 when RStudio released {shiny} to the R community. I was absolutely floored by the very notion that I could create not just a web interface, but a dynamic web interface all through R code! To give a little perspective, the only web interfaces I had built before Shiny were very utilitarian PHP-powered sites wtih a MySQL database backend to summarize local state parks data near my graduate school’s location, and let’s just say those projects would not win any awards for web design!

I certainly experienced the longtime addage of learning the hard way as I began to create Shiny apps at my day job and for personal projects. Over the first year or so of my time with Shiny, I created small apps that revealed the potential it could bring, and it is still amazing that I somehow sitched those together without fully understanding the nuances of reactivity, optimal UI designs, and other software-development principles that a classically-trained statistician and Linux enthusiast never knew about! Things began to click in my mind bit by bit (especially after attending the first (and only) Shiny Developer Conference), and found myself with the task of creating not just simple prototypes, but large-scale software products meant for production use. Oh my, what have I gotten myself into?

While being a frequent visitor to the Shiny mailing list and the shiny tag on Stack Overflow was helpful, I felt a serious lack of resources addressing the optimal techniques, best practices, and practical advice of taking my Shiny apps to production. And then, one of the most transformative events in my R usage occurred. During the 2019 rstudio::conf, I was checking out the excellent poster session and found the Building Big Shiny Apps poster presented by Colin Fay. I had known Colin as a fellow curator for the RWeekly project and knew he had done some work with Shiny, but during his walkthrough I always had this loud voice in my head saying “Hey, Colin knows exactly what I’ve been thinking about!” This was the first time I saw the important challenges any Shiny app developer in this space will undoubtedly encounter stated in language I could relate to, even with me being new to the software development mindset. Needless to say, I had tremendous fun talking Shiny and all things R with Colin & Cervan Girard at the conferences, trying to soak up all of their insights and advice every chance I could.

Colin and I both agreed in our Shiny Developer Series episode that creating resources for this audience was an important step in the evolution of sharing best practices with Shiny. Fast forward to today, and you are now reading a tremendous resource aimed squarely at the R users in our world who have embarked on creating production-level applications. Engineering Production-Grade Shiny Apps contains an excellent blend of both Shiny-specific topics (many of which have not been addressed in previous books about Shiny) and practical advice from software development that fit in nicely with Shiny apps. You will find many nuggets of wisdom sprinkled throughout these chapters. It’s very hard to pick favorites, but certainly one that felt like a moment of enlightenment was the concept of building triggers and watchers to define your own patterns of object invalidation. Now I use that technique in every app I create! Of course, one of the key pillars holding the foundation of this book is the {golem} package, and I have found that the time I invested to learn the ins and outs of creating applications with {golem} has paid off significantly for creating my complex applications especially with multi-person development teams. As I was finishing my writing of this forward, my four-year-old son asked me, “why does {golem} create nice things daddy?” Well, this book is easily the best way to explain that answer! I hope reading Engineering Production-Grade Shiny Apps helps you in your journey of creating large Shiny applications!

ThinkR Website