TouchDevelop makes Windows Phone 7 easy to program

I attended a great XAPFest meeting last night about TouchDevelop.  This is an app you can download today for your Windows Phone 7 from the Web Marketplace.

What is it?

Many of us were introduced to programming because we had computers at home (and usually lots of free time).  Most machines had built in BASIC or some other language, and there were lots of magazines and books with code you could type in to make your machine do what you wanted.


Today most machines do not have a built in language, or tutorials on how to use the built in tools like Powershell to write programs.  Even then the tools and learning curve is very steep.  Learning to do something like post an image to Facebook means having to learn a LOT of different technologies.

TouchDevelop is a very easy to use programming tool that lets users write applications directly on the phone.  No need to sync to a PC, or learn C# or even know the SDK.  All of the features of the phone are exposed through built in objects in the tool.  The user doesn’t have to know the difference between a JPG and a PNG.  They just say Image.

Demo App to Randomly Play Songs

The demo I watched was building an app to randomly play songs.  If you have ever done this in C# you know this would take more than the 5 minutes it took with TouchDevelop. 

But then features were added like when you flip the phone face down it will stop or start the song.  That was added in seconds (not kidding).

Want to pin this app to the home screen so you can quickly launch it?  Easy.

Update the Pinned Tile to have a custom icon, show the album art, and the name of the song?  Easy.  As someone who as implemented this in an app I can tell you the TouchDevelop approach is WAY easier than doing it in C#!

XAPFest Expanded

So I took the XAPFest demo from last night and expanded it to include some new features.  All scripts can be published up to the script bazaar on the TouchDevelop website.

Here is the version I pushed up this morning:  https://www.touchdevelop.com/oeag

Notice that this shows the other related scripts, screenshots, the full script code and more.  All your apps can be pushed to the cloud for backup, and for sharing.  Others can even write reviews and post their own screen shots.  This is starting to feel a lot like an extension to the marketplace.

So I wanted to add a few features to the original demo.  Shake to choose a new random song.  Count of the number of songs that have been played using the app, and show that on the live tile as the counter. 

How long did this take?  I timed myself.  Having zero experience with TouchDevelop, other than the one demo last night, it took 4 minutes and 35 seconds.

event shake() { code→choose_random_song; code→update_tile(data→song); meta private; }

Added a totalPlayed global variable that is updated everytime a new song is chosen like this.

data→totalPlayed := data→totalPlayed + 1;

The best part is that I did it all on the phone, and published the update so others could see it too.

Education and Entertainment

I firmly believe that people learn WAY more when they are entertained during education.  Anyone building an app will find the sheer joy of controlling their phone a lot of fun.  And the interface makes it really easy to discover what can be done through the UI, and through the other scripts you can download and inspect.

More Information

Script your phone on your phone (Channel 9)

Hello World with TouchDevelop (Channel 9)

TouchDevelop 2.2 Make Your Own Apps (SocialTimes.com)

Pin to Start in Mango (Nikolai Tillman Blog)


Recording from XAPFest Presentation

The recording from the actual presentation I attended was posted online, so I wanted to share the link.



Comments are closed