24 June 2013

My First Experience with the AGENT Smartwatch SDK

If you follow the smartwatch industry at all, it’s likely you’ve heard of at least a couple of up and coming offerings.  One is the Pebble smartwatch, one of Kickstarter’s great success stories.  This project had an initial goal of raising $100,000 and ended up raising over $1,000,000!  I backed the Pebble project and was super excited when it showed up a few months ago.
Although I don’t use an iPhone for day-to-day use (I really love my Nokia Lumia 920), I do own one so I was able to link it with the Pebble and play around.  After trying out several watch faces, and a few apps, I really wanted to create some watch faces of my own.  However, Windows Phone is not currently supported (nor do I know if they have any concrete plans to support it).  I do have my iPhone but I don’t own a Mac so I can’t develop software for the iPhone (Xcode doesn’t run on non-Mac platforms).  I don’t own an Android phone and I really don’t feel the need to purchase one just to create apps for the Pebble.
This is where another Kickstarter project comes in – the AGENT smartwatch.  This project also had an initial goal of $100,000 and managed to raise just over $1,000,000 during the funding period.  What I really like about this watch is that it supports Windows Phone (as well as iOS and Android) and that it’s SDK is based on the .NET Micro Framework.  I don’t exactly need another smartwatch, but this one will support my phone (assuming it actually makes it to production) as well as my geeky urges, so, what the hey!? I decided to go ahead and back the project.
In the meantime, while I’m waiting (months) for my AGENT to show up, I can start experimenting with apps and watch faces now with their AGENT SDK.
Developing watch faces for the Agent watch, which currently run only on an emulator because you can’t get an actual watch yet, is fairly straightforward.  However, before you start, you need to download a few tools.
  1. Visual Studio 2012.  Any edition of Visual Studio 2012 will work – even the free Express edition.
  2. The .NET Micro Framework SDK v4.3.
  3. The AGENT SDK v0.1.1 (June 2013, Preview Release).
Once you’ve installed the above tools, you will see a new set of AGENT templates within Visual Studio:
The AGENT Watch Application template provides a simple “Hello World” starter application whereas the AGENT Watch Face template provides a simple digital watch.  Once you create a new project based on either of these templates, you can immediately run the application (by pressing F5) within the AGENT Emulator.  Here is the AGENT Watch Face template running straight “out of the box”:
This is a very basic app but it does provide a starting point.
In my case, I wanted to design a watch face that might be used to help younger children learn how to read analog watch and clock dials. Before I started, I sketched out a simple mockup of what I was thinking:
WP_20130624_001 (2)
Not very artistic, I know :-)  However, it provided me with a visual and gave me a goal for my first custom watch face for the AGENT smartwatch.
Though I’m not going to go into the code in this post (I’ll save that for subsequent posts) the final result ended up looking something like this:
I designed the watch face to have three modes: “Easy”, “Moderate”, and “Advanced”.  You can cycle through the modes by pressing the middle, right button.  The “Easy” mode provides visual indicators on the hands making it very easy to see what they represent.  There are also numbers at the four main positions on the watch face (the final version would like have all 12 numbers) as well as a digital readout of the time at the bottom.
The “Moderate” mode removes the visual indicators from the hands as well as the numbers from the dial leaving only the digital readout for hints.
“Advanced” mode removes all visual indicators leaving only the hands and the date.
This watch face could definitely stand to be polished a little and it likely will be before the AGENT smartwatch is shipped (to backers) later this year.
If you would like to create your own watch faces and/or apps for the AGENT smartwatch, here are a few links to help you get started.  I will be posting more information as well but these are great starting points.
I have no intentions of getting rid of my Pebble – I still hope for Windows Phone support some day – but at least I now have an easy outlet for my desire to build smartwatch apps and watch faces.  All I need now is just a little more… time :-)

08 June 2013

Demystifying Microsoft’s Git Offering

Although Microsoft is definitely late to the distributed version control (DVC) game, they’re pretty much in the game now and their DVC offering is only getting better. In order to provide distributed capabilities within its current version control offering, Team Foundation Server, the Visual Studio team had to make a decision: build something brand new (possibly proprietary) or build on one of the standard DVC platforms. They decided to go with the latter and build upon Git. A great decision as far as I am concerned.

But, Before That…

Before we get to the Visual Studio offering, let’s take a look at CodePlex. If you’re not familiar with CodePlex, it is Microsoft’s free open source project hosting site. Here, you can create projects to share with others around the world as well as download open source software. In March, 2012, Microsoft made available the capability to create Git-based repositories within CodePlex.  With this, developers now have the capability of choosing between a centralized version control repository, a la TFS, or a distributed version control repository via Git (or Mercurial, which actually came before Git but isn’t nearly as popular).

Moving Forward

Fast forward about ten months and Microsoft announces Git support for Team Foundation Service (TFService, their hosted TFS offering). This update provides a 100% compatible Git repository option for TFService. Not only does this provide typical Visual Studio developers with a great DVC option for TFService it also makes the TFService option much more attractive for non-Visual Studio developers by providing simpler integration for tools such as Xcode.

Along with Git in TFService, Microsoft also provided the Visual Studio Tools for Git. This extension provides Git integration within Visual Studio 2012. If you plan to utilize Git-based repositories within Visual Studio 2012 then you will need to install this extension. Something to note is that this extension allows Visual Studio to work with any standard Git repository such as GitHub, not just TFService.

Still Some Confusion

One of the biggest Git-/Visual Studio-related questions I get today is, what is the difference between the Visual Studio Tools for Git and Git-tf?

The Git-tf command line tools were announced in August, 2012 with the intent of giving developers the capability of using a local Git repository for development that could then be synced up with a TFS repository. In simple terms, you can use Git-tf to clone TFS into a local repository which could then sync your local commits back into TFS. Essentially, it provided a bridge between TFS and clients and/or developers that preferred to work with (or could only work with) Git. Until now, this was essentially your only option for using TFS with tools such as Xcode.

Visual Studio Tools for Git is a Visual Studio Extension (not a set of command line tools) that provides a set of context menus exposing typical Git operations such as Clone, Push, Pull, and Fetch. If you prefer to work within the Visual Studio IDE (as opposed to the command line) then you definitely want to install this extension.

Cheat Sheet

The graphic below depicts the tools you can use to access TFVC as well as TF-Git repositories from various clients.  There are two items to note with this image:

  1. As announced by Brian Harry, Git will be supported in the on-premises version of TFS 2013 starting with the preview version to be released at this years //Build/ conference.
  2. Although TF-Git repositories are depicted, you can substitute any standard Git repository (e.g. GitHub).