Last week I saw a contest on yr.no. Create an application that uses their weather data. They gave away prices for 3 categories; web, desktop and mobile. I had a long time considered making a weather php lib so I decided to join.
First I created a general weather php lib that gathered the weather information from yr.no. Then I had to decide what application I wanted to make. I actually decided to make multiple small applications. One netvibes UWA widget, a facebook application and wordpress widget. I knew I had little time and the other competitors had 5 week head start on me but I wanted at least try.
I started on the UWA widget… and actually never got any time to start on the other applications. It was fun to work with UWA but it have some severe restrictions. To list a few.
- Not allowed with external css and js files. This was a major problem since I decided to use Google Maps to get the longitude and latitude needed of the weather api I had decided to use.
- According to netvibes it is not possible to create a auto completion text box in their preferences. Still think there should be possible to find a way to do it… but haven’t found one yet. If this was allowed I could have used it as way to select location instead of Google Maps. I really didn’t want to use the old fashioned post to get the location, it is just to boring!
- Since you can’t load external js file I was advised to use my Google Maps in an iframe. This would solcethe problem. The only problem was to send the values back from the iframe to the preferences. Since a UWA widget is automatically part of the netvibes.com domain but the iframe is on my domain. There is security restriction that won’t let you access the parent elements functions. This was a major hassle! Thanks to this article I found a solution using javascript and hashes. It work excellent in browsers like Firefox but there are some issues in browsers like IE7. You actually have to change the security settings in IE7 to make it work. And if that wasn’t enough it will not work at all on some browsers if my widget is inside another iframe and thats how netvibes.com add you widget to their page. So on some browsers it works fine in stand alone mode but you have to set the longitude and latitude manually on other browsers.
- The applications in UWA is supposed to automatically work on lots of other platforms like iGoggle, Windows Vista Gadget, Opera Widget, Yahoo Widgets, Mac and more. I have only tried it on iGoogle so far and it doesn’t work and I can’t see I get any error messages. A bit annoying but haven’t really had the time to debug and figure out what is wrong. I’m guessing since I have problems with iGoogle that is supposed to be one of the easier ones it will probably not work on the others either. I will have to try that some other day!
So these problems took way too much time and is the reason why I didn’t manage to create more application. Since I didn’t even manage to make the UWA widget work perfect in all browsers I don’t think I have any chance of winning. Not that my idea was that creative. Probably someone else that have created something better and more creative since they had 6 times as much time
But it was fun to finally try and create an UWA application.
Take a look at my weather page on http://weather.larsolavtorvik.com/. Not the prettiest page but at least I have some more information there, including a download for the whole source code fort he project.