Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ways To Pass Time On Window Phone – TouchDevelop

DZone's Guide to

Ways To Pass Time On Window Phone – TouchDevelop

· Mobile Zone
Free Resource

A co-worker was showing me an in phone scripting environment on the iPhone and I knew I had seen one mentioned for the Windows Phone before.  TouchDevelop is an app from Microsoft Research that allows you to create small applications that do a wide variety of operations including using most of the capabilities of the device.  So could this be a fun way for us geeks to waste some time while waiting for our oil to be change or a table to open up at your favorite restaurant?

So what does this language look like?  The structure for TouchDevelop applications is broken into three sections: actions, data and events. 

Actions are essentially procedures and can be run independently from the user interface as long as they are not marked private.  One action can also execute another action using the “code” section of “expressions” UI.

Variables that are defined in the Data section.  They are global to the application and are persistent by default.  The variable types include not only basic structures like strings, but also more complex system constructs like JSON, playlist and camera objects.  This isn’t where all of your variables reside as many variables are automatically generated when you create assignment expressions.

The events that can be handled are somewhat limited but are appropriate for the phone.  As with some of the specialized data types the events are based around the different sensors and services of the phone.

Now the syntax is a little strange compared to most of the languages that I have used in the past.  It is very plain English which can throw you when you are used to more terse programming languages.  You have to get used to the concept of a “wall” instead of console which uses syntax like the example below.

var1->post to wall

You also aren’t going to get a WYSIWYG experience with the TouchDevelop environment.  You will have to create your own visual controls through code.  It reminds me of righting for the Win16 API in C++, only with less built in UI abilities.  If you get to this point then you probably want to start by copying an application that already has methods to generate buttons, text boxes and other controls.

Just to give you a flavor of the environment there are a number of screenshots below.

Screen Capture-1Screen Capture-2Screen Capture-3Screen Capture-4Screen Capture-5



Source: http://geekswithblogs.net/tmurphy/archive/2011/12/20/ways-to-pass-time-on-window-phone-ndash-touchdevelop.aspx

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}