Monday, October 15, 2007 11:10 PM Central Time
Posted by Justin
I've changed my mind and decided that a Date Tracker will be the Vista Sidebar Gadget that will be the subject of my series on gadget development.
Yes, again the concept is simple. The goal is show people how simple gadget development can be and encourage others to make their own creations and submit them to the Windows Live Gallery.
I have mocked up what the gadget will look like in Photoshop. We will be using a combination of images and HTML for placement based on different parameters. More to come soon!
While writing this, I was listening to "Under Pressure" by David Bowie
Sunday, October 14, 2007 11:10 PM Central Time
Posted by Justin
One of the cool new features of Windows Vista, is the Windows Sidebar. The Sidebar is an application that runs as part of the Windows shell on the right portion of the screen. This Sidebar contains different mini web applications known as gadgets. These web applications contain HTML and scripting language either in the form of Javascript or VBScript.
A Sidebar gadget may consist of a very simple design and function like displaying the date or time, or may be relatively complex like a stock ticker that has to access the Internet at regular intervals to retrieve stock quote updates. That's the beauty of a Sidebar gadget, something so simple can wind up being a great gadget idea.
Case and point ... Christmas happens to be my favorite holiday. Around this time of the year I start to get a little excited as temperatures cool, Fall prepares for Winter and the snow to fly. What is more exciting than planning for the holiday season and knowing how many days exactly till Christmas? That seemed my the perfect idea for a gadget. How about if I can display the days, hours, minutes, and seconds till December 25, 2007. Such a simple concept. My "Christmas Countdown" gadget was posted on October 10 and has seen over 1,400 downloads in four days. That's pretty funny considering what it does, but proves the fact that something so simple can be interesting to lots of people.
The whole purpose of this series is to educate those interested in the development of Sidebar Gadgets. I had a background in .NET development both for the desktop platform as well as the web. I did have to educate myself on Javascript, but if you have a C# background, you'll find the syntax to be very similar.
As part of this series, we'll dissect the development process that was involved in creating the "Christmas Countdown" gadget from the ground up. Stay tuned for Part 2 where we will cover what makes up a gadget package and its contents.
Thursday, September 27, 2007 4:09 PM Central Time
Posted by Justin
One of the first things that I noticed when learning how to develop sidebar gadgets was that the code behind them was a combination of HTML and JavaScript. The biggest problem is that it was JavaScript, something that I am not well versed in. I looked through several samples and tried some different samples and pretty much have learned the basics of what I need to know, but some of the commands still require me to reference the web or Google certain topics.
I developed a gadget to display specific weather data from my weather station and leveraged what I learned about JavaScript to use XMLHTTP. It worked fine unto a couple days ago when the gadget stopped responding and couldn't connect to the datasource even though I can do some from a browser. From what I can tell, I must be hitting some sort of connection limit, or I have an object that is not being nulled out. I did change my code to use synchronous processing on the XMLHTTP object, and that seemed to work, but the gadget will sometimes lock up the whole sidebar. Now, that is a nice bug!
So ... not a big fan of JavaScript, but making it work. I do like the error handling against what is available using VBScript. Needless to say, it would be nice if gadgets supported C# or VB.NET natively instead of requiring some type of COM access.