How to organize modular web app
<p>I have a web site, which has multiple modules on a typical "dashboard" page. All of them communicate with the same database, and same set of tables, some of them do the job of writing, some display, etc.</p>

<p>Should I use iframe to achieve that or combine all the codes or is there other options?</p>

<p>Those modules can interact with each other on a client-side javascript level. For example, I click a button in module A, a textbox in module B will be hidden.</p>

<p>Moreover, how do you achieve such that, when I use module A to write things to the database, module B will know it's time to fetch new data again.</p>
