Monday, June 22, 2009

Creating a Widget framework in ASP.Net

Note: I've added a label: "widget" for all my posts relating to implementing a Widget framework in Asp.Net.

A recent request at my workplace sent me off looking for a Widget framework for ASP.Net similar to IGoogle and PageFlakes. All I found was Dropthings.

Just like everyone else, after downloading the source code, I loaded the project in Visual Studio and tried to run the solution. After messing with the SQL Express DB for a few minutes, the Dropthings solution fired up with no problems. Well, after playing with the example site for a few minutes I shut the site down and started it back up again, this time walking through the code, one line at a time.

After manually stepping through about a gazillion lines of code, the site finally fired up. Wow, was it really that complex to dynamically load a few widgets on a web page? OK, maybe I was so focused on the trees that I could not understand the forest. So, I tried to step through the click event of the minimize button and ... well, lets just say that there is complex and there is COMPLEX.

Before we go any farther, lets start with a few definitions:

1 - Widget: A self contained application that runs in a subsection of the web page. Widgets usually have header area similar to a windows program and just like a windows program usually have minimize and maximize buttons. Other buttons, such as refresh and edit buttons may also be available.

2 - Widget Container: One or more areas, usually columns, where widgets are displayed on the web page and with drag and drop functionality, between which widgets can be moved and re-ordered.

3 - Widget Based Site: A web site with one or more pages that dynamically display widgets that the user can personalize by adding removing and rearranging widgets.

Now, does such a framework have to be soooooo complex as dropthings? After a deep and long look at the source code, there are quite a few things to commend the author for. There is also a ton of things he needs to be castigated for.

As I endeavor to create a widget based site from scratch, I will blog my successes and failures as well as the elements I found in dropthings that I decided to recreate in my site.


Anonymous said...

You can also try

Lee Saunders said...

Thanks! Never heard of this one. I'll give it a try!

Anonymous said...

Sounds like someone's jealous he didn't get a book published. The fact that you don't understand the reason for most of that code (I do understand the reason for most of it) doesn't mean that you understand it's worthless. Try reading :-).

Lee Saunders said...

Jealous? Oh my! Did I hit a nerve? I never said that I did not understand the reason for all that bloat ... you said it yourself, he wanted to publish a book.

No, I actually have to create a site that can be maintained, so I will be working under the one fundamental rule that all good programmers follow, KISS (Keep it simple, Stupid).

And, I am by far not the first to question the use of Workflow in Dropthings, look at all the negative comments at Even the Author has commented that Workflow has not performed up to his expectations.

Anonymous said...

In my opinion selecting workflow foundation for this work is unnecessary. Also, I don't know what a developer gets if he learns how to develop a widget framework ? This is like learning how to develop a MOSS or Biztalk or something like that.

I'm using Kalitte's solution and it really rocks.

Uma said...

That's my question too? why does it have to be so complicated. That's why I have build my KISS solution for widget framework. Check out my open source implementation at and don't forget to leave your comments.

Anonymous said...

Also have a look at Dynamic Dashboards. It contains lots of features.