Implementing A, Dynamic, Widget-Based Dashboard

Hi!

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 user can add/remove widgets dynamically. Also drag-n-drop them, but that’s just javascript;

  • 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.

Ideas, anyone?

Thanks!

I am going with the path 1: CWidgets that provide Actions.

I am starting with a tech proof-of-concept, that includes:

  • Dashboard with add, remove, drag-n-drop, and all of the good stuff;

  • Widget classes that extend CWidget and provide actions that answer to Ajax calls from the widget;

  • Bacon;

If I am happy with the implementation, I’ll share the code with the world.