Introduction

When you start using Shiny, it’ll take you a long time to make even small apps, because you have to learn the fundamentals. Over time, however, you’ll become more comfortable with the basic interface of the package and the key ideas of reactivity, and you’ll be able to create larger, more complex applications. As you start to write larger apps, you’ll encounter a new set of challenges: keeping a complex and growing code-base organized, stable, and maintainable. This will include problems like:

Overview of “Best practices” chapters

In this, the “best practices”, part of the book, you’ll learn some key concepts and tools from software engineering that will help you overcome these challenges:

  • 17  General guidelines introduces you to the big ideas of software engineering.
  • 18  Functions shows you how to extract code out of your Shiny app into independent apps, and discuss why you might want to do so.
  • 19  Shiny modules teaches you about Shiny’s module system, which allows you to extract coupled UI and server code into isolated and reusable components.
  • ?sec-chap20 shows you how to turn your app into an R package, and motivate why that investment will pay off for bigger apps.
  • ?sec-chap21 explains how to turn your existing informal tests into automated tests that can easily be re-run whenever your app changes.
  • ?sec-chap22 discusses how to make sure an attacker can’t access any sensitive data.
  • ?sec-chap23, explicates how to identify and resolve performance bottlenecks in your apps, ensuring they remain speedy even when used by hundreds of users.

Of course you can’t learn everything about software engineering in one part of one book, so there are also some pointers to good places to learn more.