Shiny is a framework for building web applications that can communicate with R. No knowledge of HTML, CSS or JavaScript is required.
Shiny is perfect if you need to create Data Science prototypes rapidly.
It can also be used in production, but it then becomes more complex.
Simplicity is the key.
'Simplicity is the most difficult thing to secure in this world.'
Adopt an app structure and choose tools that will allow multiple peoples to work safely (and efficiently) on the same application.
Create an app that is robustly tested, maintainable, and deployable into production.
A big Shiny app might be used by people who are not “tech literate”, and need a simple, easy to use and easy to understand application.
Building a big shiny app means that several coders will work on that app. Choose tools and structure that will fit collaborative work.
Most of the time, building a big Shiny App means that it will be scaled to numerous users, that it will be used for a (relatively) long time, and that you might implement new things on it in the future.
Once your app is in production, you need to make it maintainable.
Making a software maintainable is:
Don't rush into coding the app.
Start simple: maybe just with a pen and a piece of paper. Draw the app here, and define the content.
Rmd are your friends.
Go “UI first” - define the outline of the app, whithout focusing on the backend.
The {shinypsum} package has been especially created for that: https://github.com/ThinkR-open/shinipsum. See also {fakir}: https://github.com/ThinkR-open/fakir.
Now that the UI is designed, time for building the hardcore backend.
Use continuous integration and tests.
You can't just put the app on a server and run it as is.
What do I need?
Building your app as a package allows you to make your application self-contained, with documentation, dependencies, tests, and to be served in any R session.
Git is a version control system that allows people to collaborate on code by tracking changes, and allows to work together on the same project but in different branches.
Using Shiny Modules allows to work on small, self contained features. Everybody can then work on their own module. It also allows to implement or remove feature easily.
The {shinipsum} package allows to create random shiny UI elements so that it's easy to prototype an application interface. See also {fakir} for fake datasets.
{golem} is the future version of {shinytemplate}, a package providing a template for robust shiny apps, with a series of tools for integrating new elements to the application.
(We're still working on it).
Several tools exist to do continous integration: gitlab CI, travis, appveyor...
The {testthat} package is also used to test the code of the "business logic" functions from the Shiny App.
Find a reliable testing environment for stable / scalable application
{shinytest} / {katalon} / {shinyload}
These tools allows you to scale your Shiny Application, so that it can be used by hundreds of people.