[Design] How to structure a complex application? #135
-
Hi, Let's assume I have a website with separate features, mostly independent (except maybe some user data). If every section of the application is in a separate Ex:
Something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This is a great question. There's no official best way, but the way you described is basically how our website is structured:
As your app grows, you may also want to move out common components to their own files so they can be reused. This includes page templates (so for example you can include a navbar and footer for each page easily). We will update our site docs to include this info. It seems to scale pretty well and is easy to reason about each page independently. |
Beta Was this translation helpful? Give feedback.
This is a great question. There's no official best way, but the way you described is basically how our website is structured:
base_state.py
that has global information, and which all the page states will subclasslanding_page.py
which has the state for that page (inheriting from the base state), along with the code to render the page.styles.py
file with common styles used throughout the app pagesAs your app grows, you may also want to move out common components to their own files so they can be reused. This includes page templates (so for example you can include a navbar and footer for ea…