I am looking for some architecture advice on how to implement a dynamic, widget-based dashboard. The requirements are:
- Dashboard made of draggable widgets, something like this;
- The widgets should be self contained, i.e., each widget should render itself and deal with user interactions;
- Each widget will interact with the server through ajax calls;
After some research, I and thinking of two paths:
1- Implement the widgets as CWidgets that render the widget content and act as Action Provider for the DashboardController (as seen here);
2- Each widget is a child of CModule, with it's own controller and actions (for renders and ajax calls). The module includes a CWidget that can be included in the dashboard layout.
I think these are both possible ways of implementing the dashboard, but I can't quite foresee which is better.