forked from hadley/mastering-shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes hadley#415
- Loading branch information
Showing
6 changed files
with
89 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
# (PART\*) Shiny in action {-} | ||
# (PART\*) Shiny in action {.unnumbered} | ||
|
||
# Introduction {#action-intro .unnumbered} | ||
|
||
The following chapters give you a grab bag of useful techniques. | ||
I think everyone should start with Chapter \@ref(workflow), because it gives you important tools for developing and debugging apps, and getting help when you're stuck. | ||
|
||
After that, there's no prescribed order and relatively few connections between the chapters: I'd suggest quickly skimming to get the lay of the land (and so you might remember these tools if related problems crop up in the future), and otherwise only deeply reading the bits that you currently need. | ||
Here's a quick run down of the main topics: | ||
|
||
- Chapter \@ref(action-graphics) shows you how to add direct interaction to your plot and how to display images generated in other ways. | ||
|
||
- Chapter \@ref(action-feedback) covers a family of techniques (including inline errors, notifications, progress bars, and dialog boxes) for giving feedback to your users while you app runs. | ||
|
||
- Chapter \@ref(action-transfer) discusses how to transfer files to and from your app. | ||
|
||
- Chapter \@ref(action-dynamic) shows you how to dynamic modify your apps user interface while it runs. | ||
|
||
- Chapter \@ref(action-bookmark) shows how to record app state in such a way that your users can bookmark it. | ||
|
||
- Chapter \@ref(action-tidy) shows you how to allow users to select variables when working with tidyverse packages. | ||
|
||
Let's begin by working on your workflow for developing apps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# (PART\*) Getting started {-} | ||
# (PART\*) Getting started {.unnumbered} | ||
|
||
# Introduction {#basic-intro .unnumbered} | ||
|
||
The goal of the next four chapters is to get you writing Shiny apps as quickly as possible. | ||
In Chapter \@ref(basic-app), I'll start small, but complete, showing you all the major pieces of an app and how they fit together. | ||
Then in Chapters \@ref(basic-ui) and \@ref(basic-reactivity) you'll start to get into the details of the two major parts of a Shiny app: the frontend (what the user sees in the browser) and the backend (the code that makes it all work). | ||
We'll finish up in Chapter \@ref(basic-case-study) with a case study to help cement the concepts you've learned so far. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
# (PART\*) Mastering reactivity {-} | ||
# (PART\*) Mastering reactivity {.unnumbered} | ||
|
||
# Introduction {#reactivity-intro .unnumbered} | ||
|
||
You now have a bundle of useful techniques under your belt, giving you the ability to create a wide range of useful apps. | ||
Next we'll turn our attention to the theory of reactivity that underlies the magic of Shiny: | ||
|
||
- In Chapter \@ref(reactive-motivation) you'll learn why the reactivity programming model is needed, and a little bit about the history of reactive programming outside of R. | ||
|
||
- In Chapter \@ref(reactive-graph), you'll learn the full details of the reactive graph, which determines exactly when reactive components are updated. | ||
|
||
- In Chapter \@ref(reactivity-objects), you'll learn about the underlying building blocks, particularly observers and timed invalidation. | ||
|
||
- In Chapter \@ref(reactivity-components), you'll learn how to escape the constraints of the reactive graph using `reactiveVal()` and `observe()`. | ||
|
||
You certainly don't need to understand all these details for routine development of Shiny apps. | ||
But improving your understanding will help you write correct apps from the get go, and when something behaves unexpectedly you can more quickly narrow in on the underlying issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
# (PART\*) Best practices {-} | ||
# (PART\*) Best practices {.unnumbered} | ||
|
||
# Introduction {#scaling-intro .unnumbered} | ||
|
||
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: | ||
|
||
- "I can't find the code I'm looking for in this huge file." | ||
|
||
- "I haven't worked on this code in 6 months and I'm afraid I'm going to break it if I make any changes." | ||
|
||
- "Someone else started working with me on the application and we keep standing on each others toes." | ||
|
||
- "The app works on my computer but doesn't work on my collaborator's or in production." | ||
|
||
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: | ||
|
||
- In Chapter \@ref(best-practices), I'll briefly introduce you to the big ideas of software engineering. | ||
|
||
- In Chapter \@ref(scaling-functions), I'll show you how to extract code out of your Shiny app in to independent apps, and discuss why you might want to do so. | ||
|
||
- In Chapter \@ref(scaling-modules), you'll learn about Shiny's module system, which allows you to extract coupled UI and server code into isolated and reusable components. | ||
|
||
- In Chapter \@ref(scaling-packaging), I'll show you how to turn your app in R package, and motivate why that investment will pay off for bigger apps. | ||
|
||
- In Chapter \@ref(scaling-testing), you'll learn how to turn your existing informal tests into automated test that can easily be re-run whenever your app changes. | ||
|
||
- In Chapter \@ref(performance), you'll learn 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 I'll also point you to good places to learn more. |