App architecture (multiple files) and


The current shiny default architecture is either a single file ("app.R") or two ("ui.R" and "server.R" files).
This is confusing personally, since I'm beginning a relatively large project and am expecting having all my code in just two files to become unmanageable.

I know I can run apps locally with any kind of structure I wish but am wondering if, by changing this default layout (to a more traditional Model-view-controller pattern for instance) I'll have issues publishing to

I apologize if this question is fairly obvious or has been answered before but I'm new to the shinny framework

Thank you

hi @frmachadoecosta, you are right that either a single app file or ui/server files need to be available. However, in these files you can import other R files (e.g. source("my-model.R")).
Furthermore you can use modules to restructure your code. I think these constructions give you quite some flexibility in structuring your application code.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.