forked from ThinkR-open/engineering-shiny-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep-by-step-prototype.Rmd
30 lines (17 loc) · 1.54 KB
/
step-by-step-prototype.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# (PART) Step 2: Prototype {-}
# Building an "ipsum-app" {#stepprotopype}
## Prototyping is crucial
// TODO
> Rule of Optimization: Prototype before polishing. Get it working before you optimize it.
http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#rule_of_optimization
## The "UI first" approach
// TODO
I like to go “UI first”. For two main reasons:
+ Once the UI is set, there is no “surprise implementation”. Once we agree on what elements there are in the app, there is no sudden “oh the app needs to do that now”.
+ A pre-defined UI allows every person involved in the coding to know which part of the app they are working on. In other words, when you start working on the backend, it’s much easier to work on a piece you can visually identify and integrate in a complete app scenario.
So yes, spend time writing a front-end prototype in lorem ipsum.
And good news, we’ve got a tool for you: it’s called `{shinipsum}`.
The main goal of this package is to create random Shiny elements that can be used to draw a UI, without actually doing any heavy lifting in the backend.
Hence, once you’ve got a draft of your app on a piece of paper, you can then move to the “ipsum-UI” stage: building the front-end of the app, and filling it with random Shiny elements, with functions like `random_ggplot()` or `random_DT()`.
Another package that can be used to do that is `{fakir}`.
This package is designed to create fake data frames, primarily for teaching purposes, but it can also be used for inserting data into a shiny prototype.