• Engineering Production-Grade Shiny Apps with R Book Club
  • Welcome
    • Book club meetings
  • 1 About Successful {shiny} Apps
    • 1.1 Introduction
      • 1.1.1 Motivation for the book (& the bookclub)
      • 1.1.2 Audience for the book
      • 1.1.3 What is “Production”?
    • 1.2 Intro to {shiny}
    • 1.3 What is a complex {shiny} application?
    • 1.4 Types of complexity
    • 1.5 Code complexity
    • 1.6 App complexity?
    • 1.7 What is a successful {shiny} app?
    • 1.8 Meeting Videos
      • 1.8.1 Cohort 1
  • 2 Planning Ahead
    • 2.1 Prepare for Success
    • 2.2 Develop with the KISS principle
    • 2.3 Working as a team: Tools and structure
      • 2.3.1 From the tools point of view
      • 2.3.2 From the team point of view
    • 2.4 Reference
    • 2.5 Meeting Videos
      • 2.5.1 Cohort 1
  • 3 Structuring Your Project
    • 3.1 {shiny} app as a package
      • 3.1.1 What is in a production-grade {shiny} app?
      • 3.1.2 Resources
    • 3.2 Using {shiny} modules
      • 3.2.1 Why {shiny} modules?
      • 3.2.2 When to use {shiny} modules
      • 3.2.3 A practical walkthrough
      • 3.2.4 Communication between modules
    • 3.3 Structuring your app
      • 3.3.1 Small is beautiful (bis repetita)
      • 3.3.2 Conventions matter
    • 3.4 Meeting Videos
      • 3.4.1 Cohort 1
  • 4 Introduction to Golem
    • 4.1 Meeting Videos
      • 4.1.1 Cohort 1
  • 5 The Workflow
    • 5.1 Meeting Videos
      • 5.1.1 Cohort 1
  • 6 User experience - UX
    • 6.1 Introduction
    • 6.2 Simplicity is gold
      • 6.2.1 How we read the web: Scanning content
      • 6.2.2 Building a self-evident app (or at least self-explanatory)
    • 6.3 The danger of feature-creep
      • 6.3.1 What is feature-creep?
      • 6.3.2 Too much reactivity
      • 6.3.3 Too much interactivity
    • 6.4 Web accessibility
      • 6.4.1 About accessibility
      • 6.4.2 Making your app accessible
      • 6.4.3 Evaluating your app accessibility and further reading
    • 6.5 References
    • 6.6 Meeting Videos
      • 6.6.1 Cohort 1
  • 7 Don’t Rush into Coding
    • 7.1 Meeting Videos
      • 7.1.1 Cohort 1
  • 8 Setting Up for Success with {golem}
    • 8.1 Setting up for Success with {golem}
    • 8.2 Create a {golem}
    • 8.3 Setting things up with dev/01_start.R
      • 8.3.1 Fill the DESCRIPTION and set options
      • 8.3.2 Set common files
      • 8.3.3 Use recommended elements
      • 8.3.4 Add utility functions
      • 8.3.5 Changing the favicon
    • 8.4 Setting infrastructure for prototyping
      • 8.4.1 Add modules in dev/02_dev.R
      • 8.4.2 Add CSS and JS files
    • 8.5 Meeting Videos
      • 8.5.1 Cohort 1
  • 9 Building an Ipsum App
    • 9.1 Learning Outcomes
    • 9.2 Tools
    • 9.3 Prototyping is crucial
      • 9.3.1 Prototype, then polish
      • 9.3.2 The “UI first” approach
    • 9.4 Prototyping {shiny}
      • 9.4.1 Fast UI prototyping with {shinipsum}
    • 9.5 Building with RMarkdown
      • 9.5.1 Define the content of the application
      • 9.5.2 Using the Rmd files as a laboratory notebook
      • 9.5.3 Rmd, Vignettes, and documentation first
    • 9.6 Meeting Videos
      • 9.6.1 Cohort 1
  • 10 Building the App with {golem}
    • 10.1 Learning Outcomes
    • 10.2 Tools / Packages Used
    • 10.3 Add dependencies
      • 10.3.1 Package dependencies
      • 10.3.2 Importing packages and functions
    • 10.4 Submodules and utility functions
    • 10.5 Add tests
    • 10.6 Documentation and code coverage
      • 10.6.1 Vignette
      • 10.6.2 Code coverage and Continuous Integration
    • 10.7 Using {golem} dev functions
    • 10.8 Meeting Videos
      • 10.8.1 Cohort 1
  • 11 Build Yourself a Safety Net
    • 11.1 Learning Objectives
    • 11.2 Tools and Resources
    • 11.3 Testing Your App
      • 11.3.1 Testing the business logic
      • 11.3.2 shiny::testServer
      • 11.3.3 Testing the interactive logic
    • 11.4 Further sections
    • 11.5 Meeting Videos
      • 11.5.1 Cohort 1
  • 12 Version Control
    • 12.1 Introduction
    • 12.2 Using version control with Git
      • 12.2.1 Why version control?
      • 12.2.2 Git basics: add - commit - push - pull
      • 12.2.3 About branches
      • 12.2.4 Issues
    • 12.3 Git integration
      • 12.3.1 With RStudio
      • 12.3.2 As part of a larger world
      • 12.3.3 About git-flow
    • 12.4 Automated testing
    • 12.5 Conclusions
      • 12.5.1 Resources
    • 12.6 Meeting Videos
      • 12.6.1 Cohort 1
  • 13 PLACEHOLDER
    • 13.1 Slide 1
    • 13.2 Meeting Videos
      • 13.2.1 Cohort 1
  • 14 The Need for Optimization
    • 14.1 Build first, then optimize
      • 14.1.1 Identifying bottlenecks
      • 14.1.2 Do you need faster functions?
      • 14.1.3 Don’t sacrifice readability
    • 14.2 Tools for profiling
      • 14.2.1 Profiling R code
      • 14.2.2 Profiling {shiny}
      • 14.2.3 Profiling web pages
    • 14.3 Resources
    • 14.4 Meeting Videos
      • 14.4.1 Cohort 1
  • 15 Optimazing Shiny - Common Application Caveats
    • 15.1 Introduction
    • 15.2 Reactivity anti-patterns
      • 15.2.1 observe vs observeEvent
      • 15.2.2 Building triggers and watchers
    • 15.3 Using R6 as data storage
    • 15.4 Logging reactivity with {whereami}
      • 15.4.1 What is logging? - What is a reactive logging?
    • 15.5 R does too much
      • 15.5.1 Rendering the UI from the server side
      • 15.5.2 Too much data in memory
    • 15.6 Reading data
      • 15.6.1 Reading external datasets
      • 15.6.2 Including data in your application
      • 15.6.3 Using external databases
      • 15.6.4 Data-source checklist
    • 15.7 Conclusions
      • 15.7.1 Resources
    • 15.8 Meeting Videos
      • 15.8.1 Cohort 1
  • 16 Optimizing {shiny} code
    • 16.1 Resources
    • 16.2 Caching Elements
      • 16.2.1 What is Caching
      • 16.2.2 Native caching in R
      • 16.2.3 Caching in {shiny}
    • 16.3 Asynchronous in {shiny}
      • 16.3.1 Asynchronously ease cross-session issues
      • 16.3.2 Asynchronously ease within-session issues
      • 16.3.3 Common Pitfalls
    • 16.4 Meeting Videos
      • 16.4.1 Cohort 1
  • 17 Using JavaScript
    • 17.1 Introduction
    • 17.2 A quick introduction to JavaScript
      • 17.2.1 Including JavaScript code in your app
      • 17.2.2 Understanding HTML, class, and id
      • 17.2.3 Querying in Vanilla JavaScript
      • 17.2.4 About DOM Events
      • 17.2.5 About jQuery and jQuery selectors
    • 17.3 Client-Side JavaScript
      • 17.3.1 Common Patterns
      • 17.3.2 Where to put them: Back to JavaScript Events
    • 17.4 JavaScript <-> {shiny} Communication
      • 17.4.1 From R to JavaScript
      • 17.4.2 From JavaScript to R
    • 17.5 About {shinyjs} JS functions
    • 17.6 One last thing: API calls
    • 17.7 Learn more about JavaScript
      • 17.7.1 {shiny} and JavaScript
      • 17.7.2 JavaScript basics
      • 17.7.3 jQuery
      • 17.7.4 Intermediate/advanced JavaScript
    • 17.8 Meeting Videos
      • 17.8.1 Cohort 1
  • 18 A Gentle Introduction to CSS
    • 18.1 What is CSS
      • 18.1.1 Default CSS for {shiny}
    • 18.2 Getting started with CSS
    • 18.3 Integrate CSS files in your {shiny} app
      • 18.3.1 Inline
      • 18.3.2 Using tags$style()
      • 18.3.3 Using external files
    • 18.4 External Resources
    • 18.5 Meeting Videos
      • 18.5.1 Cohort 1
  • Published with bookdown

Engineering Production-Grade Shiny Apps Book Club

2.4 Reference

Lemaire, Maude. 2020. Refactoring at Scale. Henry Holt. NOTE: Paid Service