DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Ways To Pass Time On Window Phone – TouchDevelop

Ways To Pass Time On Window Phone – TouchDevelop

Tim Murphy user avatar by
Tim Murphy
·
Dec. 22, 11 · Mobile Zone · Interview
Like (0)
Save
Tweet
3.50K Views

Join the DZone community and get the full member experience.

Join For Free

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

application Pass (software) Windows Phone Data (computing) Event Syntax (programming languages) Concept (generic programming) app c++

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Build Microservices With Node.js
  • 12 Modern CSS Techniques For Older CSS Problems
  • JIT Compilation of SQL in NoSQL
  • The Power of Enum: Make Your Code More Readable and Efficient [Video]

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo