Yii Framework Forum: Implementing A, Dynamic, Widget-Based Dashboard - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Implementing A, Dynamic, Widget-Based Dashboard Rate Topic: -----

#1 User is offline   TiagoA 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-March 11

Posted 15 March 2013 - 11:29 AM

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!
0

#2 User is offline   TiagoA 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 23-March 11

Posted 18 March 2013 - 05:04 AM

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users