Create your own Lumia apps with TouchDevelop

Published by Boc Ly on February 4, 2013

apps465

How difficult can it be for a complete novice with no programming experience to create an app? 

In the last couple of weeks I have spoken to a Computer Science student and a university lecturer who teaches software development.

In their own ways, both of them seemed to imply that developing for Windows Phone was extremely accessible and fairly easy to get to grips with.

In fact, every developer I’ve interviewed for Conversations have all made the observation that creating for Windows Phone is relatively ‘straight forward.’ 

It’s time to put that theory to the test.

touchdeve220

TouchDevelop (free)

Obviously, I am not going to create an app from scratch.

If that were the case then this post would be either very short (”Sorry, I can’t do it”) or very, very, very long (“Let’s start with the basics of coding and go step by step from there…”).

Instead I am going to use a nifty little app from Microsoft called TouchDevelop.

TouchDevelop boasts that by simply tapping on the screen you can create simple programmes, apps and games.

There are tutorial videos and you can search for commands, or say what you want to achieve, and the app will write the code for you. 

It sounds too good to be true and yet TouchDevelop’s reviews are also pretty encouraging:

“Fantastic, all the complex bits hidden away.”

“This is really cool. It’s so easy just to make scripts to do everyday tasks, just on a whim! This really needs to be publicised more, hell why not just package it with the phone?”

“Major step forward in programming history.”

Take the Tour

Feeling just a little bit scared, the first thing I did after installing TouchDevelop was to take the tutorial.

TouchDevelop

The tour was very quick, the onscreen instructions are easy to follow and within a couple of minutes I had completed the task of creating a small script that played a random song whenever I shook my Lumia!

The tutorial is no guarantee that you’ll soon be making millions from your own apps but it does give you a flavour of how TouchDevelop works.

At each stage of the tutorial you’re selecting from simple options on the screen and there is never any coding or programming involved. 

TouchDevelop

Getting started

To make the most of TouchDevelop, you’ll need to sign in with a Windows Live ID, Facebook or Google account. This will let you look at, download and share scripts.

I spent a fair amount of time looking around to see what other people had done with TouchDevelop. You do this by swiping through the New, Top, Featured and Tags screens.

TouchDevelop

There was a tremendous amount of variety and some of the programs were very slick indeed – many were apps that I could well imagine downloading from the Windows Phone Store.

Others are more akin to nifty little features that you may want to incorporate into a larger app. Think of the whole thing as a toolkit for you to choose and pick from.

If there’s something you like, you can download it and examine its inner workings. I found this a useful way of seeing how things had been done or created.

Making scripts

Tap the + button at the bottom and the first thing you’ll need to do when creating a script is give it a name.

On the next screen you’ll see the options with which you can start building your script. It looks daunting when you first read through it but after playing around with it for a little while, it’ll make more sense.

TouchDevelop

I found that the easiest place to start was with ‘events’ – this is an action that starts, such as playing music or displaying a picture, when you do something to your phone, such as shaking it or putting it face down.

Tap the + sign to the right of events and you’ll be presented with a list of the different actions that can trigger an event.

TouchDevelop

Tap the action you require and next you’ll see a blank screen with some words at the top. 

For example, if you selected ‘phone face down’ you’ll see this:

TouchDevelop

As you can see, the current action is that when the phone faces down, the script will do nothing.

Tap on the words, “event phone face down” to bring up more options and select edit.

TouchDevelop

The next screen is where the fun really starts.

A series of boxes will appear with different options. Selecting one option will bring up more boxes until you drill right down into executing an action.

TouchDevelop

If you select through the boxes: Media > Songs > Random > Play and then use the Back button to save your work – whenever you run this script and your phone is facing down (remember this is the event you selected right at the beginning) then your Lumia will play a random song. 

After playing around and familiarising myself with TouchDevelop for an hour or so, I felt confident enough to build on top of this basic script by creating a couple of other events where they could all work together.

  1. Phone face down to start playing a random song
  2. Shake the phone to play another random song
  3. Each time a new song starts display a different random picture

There is much, much more to be explored in TouchDevelop and, to be honest, I would still struggle to make anything that resembles a proper app!

However, TouchDevelop certainly gave me an insight into the logic and principles behind creating apps. Best of all, it’s a real thrill when you run a script for the first time and you think: “Wow, I did that!”

Find out more about TouchDevelop. Have you created anything with TouchDevelop? Let us know in the comments below.

Comments

  • http://conversations.nokia.com Ian Delaney

    This looks neat. Like Klik’n'Play for smartphones.

  • http://www.geekchoice.com/washington-dc Dagmar Schneitz

    I hope it’s easier to do than the description here.

  • C38S

    This looks like fun! I’d imagine I could make some cool stuff for the kids with this plus some photos of myself :)

  • http://nokia-news.com/ Joao Luis

    Cool, lots of fun ahead.

  • runewake2

    As a student developer, I can vouch for how easy it is to develop for Windows Phone. I’ve personally witnessed how hard it is for my friends to get their apps made on iOS and especially Android. I released my first app within two weeks of starting to learn development for Windows Phone.

    I recommend it to all my friends looking to get into mobile development. Though the 7.8 fiasco was a significant detriment to development for the platform and will now cost me additional hundreds of dollars in order to continue developing for Windows Phone 8.

    Beyond this, the platform has been great. Developing for most Microsoft Technologies has been great.

    • http://seafoodie.me/ Ryan

      I can’t speak for all apps, but I just finished porting a decently large WP7.5 app to WP8 in about 8 hours. They even share 80% of the same code files so ongoing maintenance should be pretty easy

      • runewake2

        My issue is not so much with the difficultly of maintaining a Windows Phone 7.5/7.8 project on WP8, but the fact that as a Windows Phone 7.8 owner I can not fully utilize any of the new API’s that came with WP8. Things such as TellMe integration with Apps and all the other cool things that could have been added to WP7 devices if Microsoft had cared enough.
        Due to the fact that my device does not support these features I can not add them to my applications (even if they are for Windows Phone 8). This is what disappointed me.
        I am not saying that porting from 7.5 to 8 is hard, it’s not. It really takes little more than the press of a button. But it is the fact that those of us that helped try to put Windows Phone’s on the map by investing in WP7 were more or less given the cold shoulder on our investments.
        For students such as myself who can’t go around making $600 investments in products that will not receive support 6 months later is scary to me. For this reason I don’t only advise Windows Phone for new developers, but base my recommendation on what they own. I know Microsoft (and Nokia) have received criticism for months about 7.8, but I think it’s important for someone to hear from a someone who can’t afford to get a new device every new OS release.

        • http://www.nikrolls.com/ Nik Rolls

          You should contact the Developer representatives from Nokia in your region. They are sometimes handy with seeding devices that can assist you in porting your valuable apps to WP8, and create new ones.
          Other than that, there’s always the emulators; for those features like NFC and other real-word applications, you can write Interfaces to inject the data manually during the development period. Obviously on-device testing is great, but at a pinch the emulators work well. You can then launch an invite-only beta for people who actually have devices, and do the testing that way.

          • runewake2

            Yes, when I initially got into the development for Windows Phone, I was stuck using an emulator. However, I found that my app contained bugs that could only be found on actual devices (things like Wifi turning off when phone is locked etc). Further, the emulators are poor at judging performance. For me, that is important and I like to know if I should add that extra particle effect to my game or if I’ve abused an animation. Further, the emulators do not cooperate with my schools network (Hyper-V is weird).

            I’ve also run a beta test on my app. But the issue here is that I know what I am looking for and if an issue occurs I know how to figure it out and solve it. If an issue occurs in a beta test, it might get reported, or it might not. The amount of details I get are often vague (these people are volunteers after all). Instead of getting a report on the details that caused the issue, I get something like “notifications don’t work”. That doesn’t tell me if the issue is my background task, registering the task or that the task runs but doesn’t display anything.

            Thanks for the advise though. I’ll look into something like that. My school used to have a Mobile Developers Club who would provide devices for development on all sorts of devices. But that isn’t around anymore.