A dearth of third-party applications has always been the ‘Achilles heel’ of the Windows Phone 8 platform. Since its inception, users of Microsoft’s bronze medal OS have found that they need to do without some of the cooler apps that are found on Windows Phone 8’s cooler siblings, including Vine and Instagram.
Redmond’s Microsoft Research has apparently taken note of this, and has responded by releasing TouchDevelop; a curious combination of IDE, programming language and app store. Seemingly inspired by Pimp My Ride’s Xibit, it allows you to write aoos for your phone, on your phone.
As schools are gearing up to introduce computer science lessons into the classrooms, and as more and more people are getting enthusiastic about software development, I wondered if TouchDevelop is the panacea for making app-development mainstream.
What is TouchDevelop?
TouchDevelop really is a tool of two parts. The first is the Windows Phone 8 application, which this article focuses on. It comprises a mostly finger-friendly development environment, alongside access to a wealth of documentation and user developed applications. The second part is a web application that allows you to create your scripts in the browser.
Scripts cannot be installed onto a device, but they can be run within the TouchDevelop app or as web apps on many browsers, including mobile browsers on iOS and Android. In other words, they are cross-platform compatible. Despite running from the browser, the scripts do have some of the functionality of native applications, including access to the accelerometer. This means that developers can create games that have the look and feel of big-budget productions, such as Doodle Jump.
A great number of people are starting to get excited about TouchDevelop, and it seems that there’s a genuine momentum building around it. In recent months, it has started to attract a significant user base who regularly use it to create, publish and share their own applications for the platform. Even venerable computer science publishing house Apress has recently published a book about TouchDevelop, which is currently available for free on the Amazon Kindle Marketplace.
Significantly, TouchDevelop has reached a milestone and is now on its third iteration. This has brought to the table a number of features that will delight developers of every calibre, including the ability to add speech recognition to your applications. Crucially, for those who wish to monetize their Windows Phone apps, it comes with the ability to publish to the fledgling Windows Phone 8 marketplace as well having embedded advertising from Microsoft’s pubCenter advertising network.
Getting Started and First Impressions
Once you have downloaded and installed TouchDevelop from the Marketplace and you run it for the first time, you will get prompted to sign in using either your Google, Facebook or Microsoft accounts. The reason given for this is that Microsoft proactively saves all code written using TouchDevelop on its servers.
Upon registering and signing in, you are presented with a menu that looks very similar to the home screen on the XBox 360. Here, you will find a great number of links to tutorials and documentation, applications that have been created by other users and the place where you will be writing your own code.
When you look at one of the many third party applications, you are presented with information that doesn’t feel too out of place in an app store, including screenshots and reviews. It’s worth noting that any applications that you install are not present in the start screen. To use them, you have to actually open TouchDevelop.
However, where TouchDevelop differs from the Android and iOS app stores, is that once the user has downloaded and installed an application, they are granted access to the entirety of the source code of each installed application, meaning you can tweak whatever you install to your hearts content.
Ironically, it seems like Microsoft has created the first ever app store that mandates open source software. Although this is only true if you download and access applications from the TouchDevelop app store, rather than the Windows Marketplace, where TouchDevelop apps can later be published.
Some applications make use of your phone’s GPS and microphone facilities. You have to give your consent for this to happen, which feels reassuring from a privacy perspective. That, and being able to view the source code to each application means you can be assured that any app you install contains no malicious behavior.
The available programs are diverse; they range from the bizarrely esoteric to the incredibly helpful, and everything in between. There are also a great number of games that you can download, including one that resembles Atari’s legendary arcade game, Breakout. Remarkably, this was created in less than two thousand lines of code. This suggests that Microsoft engineered this platform with ease of app development in mind.
When you look at the language used to create apps for the platform, you’ll see that it’s something totally different. It definitely looks nothing like the behemoth that is C#, which Windows Phone 8 applications are created in. Nor is it anything like Objective-C or Java. Rather, the language behind TouchDevelop has been purpose-developed and compiles down to HTML5. As a result, you can write your code once and then have the ability to run your code across all platforms, regardless of whether it is on Windows Phone 8, or for the web.
When you create a new project, you’ll notice that there are a great many templates available. Some of these are tutorials that allow the user to learn more about the language used by TouchDevelop, as well as others that create the boilerplate code for complex applications. This is handy if you want to get your feet wet, but don’t fancy reading mountains of documentation and guides.
One of the many templates available is called Turtle, and it is very similar in nature to Logo, the graphical programming language which was incrediby pervasive in IT classes in British high schools in the 2000’s. In this, you move a bright purple chelonian across the screen, which leaves a trail as it walks. This gives a gentle introduction to the platform to novice programmers, as well as showing that programming, in its simplest form, is the execution of instructions in a specific order.
When writing code, you’ll notice some of the tasks that you do frequently, such as writing ‘if statements’ and declaring variables are reduced to a single press of a button. This significantly reduces the amount of keystrokes you have to make, which is handy given that you can only write code using your thumbs.
Helpfully, TouchDevelop also proactively informs the user when he or she makes a mistake. This type of error handling is common on many IDEs that are found on desktop computers, and it is incredibly refreshing to see it on a phone. It seems like Microsoft put a great deal of effort into making programming fun, and less frustrating for those of us who are yet to take an undergraduate computer science class.
Unfortunately, despite all of this, the fact remains that you are still writing software on a cell phone. I found it’s difficult to be a productive programmer when you have access to such a small screen, and no physical keyboard. After 30 minutes, I found myself pining for the spacious keyboard on my MacBook Pro and Vim.
I noticed that most applications on the TouchDevelop store tend to run into the thousands of lines. Even the most ardent texter will struggle to avoid getting the most crippling thumb-strain, if they try to write a full game in one sitting.
Disappointingly, I felt that there are parts of TouchDevelop that aren’t as clean and flat as that of Windows Phone 8. In particular, the app authoring tools seem to be as cluttered as a hoarder’s bedroom, with numerous floating help bars and buttons. In future releases of the product, I’d love to see them further simplify this aspect of the program.
So, am I about to quit my job at MakeUseOf to embark upon a life of writing TouchDevelop apps? Perhaps not. I do, however, think that it’s an amazing way to get people interested in software development. You can build a basic ‘Hello World’ application in just a few lines of code. You get instant feedback when you write something that works, and something that doesn’t work. Sharing your creations is simple, and there is a growing, active community based around the product.
Evidently, Microsoft Research has created something genuinely delightful in TouchDevelop. It seems that it has the potential to drastically change how we train our young coders, and the makers ought to be commended for that. Given their pedigree for making amazing products that have a long shelf-life, I’m pretty confident that TouchDevelop will continue to make waves for years to come.
Are you interested in writing apps with TouchDevelop? Let me know in the comments!