29 What to do next?

If you’re still alive by reaching this part, well, congrats! Hopefully, you now have a better understanding of how you may quickly and without too much pain deeply customize your shiny apps. This book has quite a lot of content, yet we just scratched the surface of what you may do with a bit of technique. There are many other topics that could have been covered. Below we give some references that you probably want to explore, should you like to go even further.

29.1 Multi-page Shiny apps

As shown all along this book, Shiny is not natively designed to end up with a multi-page website. Packages like {shiny.router} (Stachura, Krzemiński, and Igras 2021) or {blaze} (Teetor 2021) provide sorts of workarounds by playing with the url to mimick the multi-page layout. Yet this is not an authentic multi-page experience! A recent in-development package, namely brochure (Fay 2021) aims at filling this gap, offering a real multi-page solution.

You may have a try:

remotes::install_github("ColinFay/brochure")
library(brochure)
library(shiny)

brochureApp(
  # First page
  page(
    href = "/",
    ui = fluidPage(
      h1("This is my first page"), 
      plotOutput("plot")
    ),
    server = function(input, output, session){
      output$plot <- renderPlot({
        plot(cars)
      })
    }
  ), 
  # Second page, without any server-side function
  page(
    href = "/page2", 
    ui =  fluidPage(
      h1("This is my second page"), 
      tags$p("There is no server function in this one")
    )
  )
)

When you run the above example, the app opens on the first page. Typing /page2 in the search bar goes to the second page. Each page corresponds to a new Shiny session, requiring cookies if you want to exchange information from page to page. Everything is still experimental but promising for sure!

29.2 Web design best practices for Shiny

You may wonder why there was not even one chapter about UI conception best practices. In this book, we chose a opinionated approach where we focused on building tools to customize interfaces rather than building the interface itself. Yet, after having a custom design, you probably want to organize it better in a well-polished interface. We cannot better recommend you to go through these two chapters: UX Matters and Don’t rush into coding from (Fay et al. 2020), as well as read the layout basics from Mastering Shiny (Hadley 2021).
Keep in mind, your design should follow the two golden rules: simplicity and usability!

29.3 Conclusion

Your journey doesn’t stop here. Web development hides tons of further opportunities. Great advice is to regularly check the recent innovation in the field and experiment yourself. Don’t be afraid of failing, as this is the usual price to learn new things!