How to organize modular web app
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.

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

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.

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.
How to organize modular web app
===

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.

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

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.

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.