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.