The TouchDevelop logo
Available in English
Owner Microsoft Research
Slogan(s) Create your apps on your phone, tablet or laptop
Alexa rank 191,281 Increase ##
Commercial Yes
Registration Optional
Launched 2011-07-21
Written in TypeScript

TouchDevelop[1] is an interactive development environment and a visual programming language being developed at Microsoft Research.

TouchDevelop is used to develop application programs for mobile devices, including smartphones and tablet computers. It can also be used on any computer which has a suitable web browser. In addition to its use as a tool for creating application programs, TouchDevelop has been used to teach programming and mobile device technology at schools, colleges and universities.[2]

Development environment

TouchDevelop runs entirely in-browser and provides an interactive environment for developing, testing and running programs. The programs are coded in the TouchDevelop scripting language which is described below. A new program is entered onto the device via a syntax-directed editor which has been designed for use with the small touch-sensitive screen that is normally found on a smartphone. A user can also choose to download existing scripts, published on the TouchDevelop website by other users, and edit these scripts. The editor displays choices of actions (such as language elements to insert or code refactoring changes) which change according to context. A single tap, or mouse click, on a dynamically labeled key performs the action.

The development environment includes a facility for testing and debugging the program's user interface which avoids the need to restart the program from the beginning after each change.[3] There is a debugger[4] for analyzing and tracing program execution, as well as separate facility for running unit tests on components of the program.

When a script is complete, the user has the option of publishing it on the TouchDevelop website and, additionally, of making the script accessible to others through keyword search. Scripts may also be submitted to the application store for possible sale to others. The environment can be installed on a variety of platforms which include Apple iOS devices (iPhone and iPad), Android devices (phones and tablets), Windows devices (phones and tablets) and computers where a suitable web browser has been installed. Appropriate browsers include recent versions of Internet Explorer, Firefox and Safari. The primary requirement is that the browser must support Javascript and HTML5. A script developed on one platform can be installed on a different platform provided that it too possesses an appropriate browser, and the script uses only the capabilities which are accessible on that platform.

Scripting language

The scripting language is designed to be terse in style, since code may need to be viewed on small screens. Symbols are used instead of keywords in many places to achieve that brevity. The language is imperative in nature, although some of the language syntax is similar to that used in object-oriented languages. The basic datatypes are numbers, strings and booleans. Compound datatypes include lists, arrays and other datatypes supported by the API library. The control flow constructs include if-then-else statements, for loops, while loops and function calls. (In TouchDevelop, a function is called an action.)

The language is both strongly typed and statically typed. Local variables are not explicitly declared, their types are instead inferred from their first use which must be an assignment statement that initializes the variable. The type system has value types where storage is allocated on the stack, and reference types where storage is allocated on the heap. The heap is garbage collected.

Scripts have a single thread of execution. Events, such as shaking the device or tapping the screen, can be associated with events in the script (provided that the device has the appropriate capabilities). An event will interrupt a running script to execute an associated action. However, an event action cannot interrupt another event but will be held until the action for that event has completed execution.

The TouchDevelop scripting language introduces a feature called "cloud types".[5] A global variable with a cloud type has, or will have, its value synchronized with storage provided in the cloud. This feature enables scripts to interact safely and reliably with scripts running simultaneously on other devices.


The TouchDevelop API is a library which provides resources and extra datatypes, each with an appropriate set of associated actions. A partial list of the capabilities provided by the API is as follows.[6]


  1. "TouchDevelop". TouchDevelop. Retrieved 1 September 2013.
  2. "TouchDevelop - In Classrooms - Microsoft Research". Retrieved 2015-06-27.
  3. Burckhardt, Sebastian; Fahndrich, Manuel; De Halleux, Peli; Kato, Jun; McDirmid, Sean; Moskal, Michal; Tillmann, Nikolai (June 2013). PLDI, ed. "It's Alive! Continuous Feedback in UI Programming". Microsoft Research. ACM SIGPLAN. Retrieved 24 June 2014.
  4. Nguyen, Tuan; Csallner, Christoph; Tillmann, Nikolai (May 2013). Proc. 35th ACM/IEEE International Conference on Software Engineering (ICSE), New Ideas and Emerging Results (NIER) track, ed. "GROPG: A graphical on-phone debugger". TouchDevelop. Retrieved 24 January 2014.
  5. Burckhardt, Sebastian; Fahndrich, Manuel; Leijen, Daan; Wood, Benjamin (15 June 2012). Proceedings of the 26th European Conference on Object-Oriented Programming (ECOOP), ed. "Cloud Types for Eventual Consistency, in Proceedings of the 26th European Conference on Object-Oriented Programming (ECOOP)". TouchDevelop. Springer. Retrieved 24 January 2014.
  6. "TouchDevelop - documentation - api". TouchDevelop. Retrieved 2015-06-27.

Further reading

This article is issued from Wikipedia - version of the 1/28/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.