Widget engine

I'm really fired up to start working on widgets. We still have to finish up some other tasks before we do this but I really want to get this tackled in 2.0.

Dave had some good ideas in his mockups. A widget sidebar would be a good idea. What you could do is open up the sidebar, drag widgets from the desktop to the sidebar (and vice versa) and then close it again. A widget layer similar to OSX's or compiz's would be nice too. Developers can make widgets by using the widget API we provide, which will for the most part be used exactly like the window API.

I think we may have to create application types in the database, to keep things neat (as in not having your widgets and applications on one menu, named "apps", that just makes no sense). We're also going to have to figure out some sort of session management, so you can have two instances of widgets with different settings launch at startup, and their instances will be saved to the server. Maybe the session management would spill into standard desktop apps as well, but for now I can only really see it being beneficial when writing widgets. YouOS has implemented this. I think it may slow down their app launching time, and the amount of data they must store in their database, but I'm not all that sure.

When panning this we need to be extremely careful with our design choices. We want as little stored in the database as possible, and as little traffic going through as possible.


Ok, I thought some things

Ok, I thought some things over. Here's my idea:

Widget: Hi, I'm a widget. The user requested that I'd be launched.
Desktop: Ok, let me first check if there is already an instance for you. If not, I'll make a new persistent instance ID for you, and mix that into this.config.instanceId when you're constructed, then add you to desktop.config.startupapps.
Widget: Ok. I'm setting this.config.foo to "bar" and calling this.config.save()
Desktop: Ok, I will write that back to desktop.config.appconfig[appid][config.instance]
Widget: Now I am being closed, and I want to destroy this instance.
Desktop: Ok, I will delete desktop.config.appconfig[appid][config.instance] for you, and remove you from desktop.config.startupapps.

Post new comment

The content of this field is kept private and will not be shown publicly.