Monday, May 20, 2013

Mobile Development Options - Part 5: Processing

by Mark Giglione 

Part 5: Processing

“Processing” is an accessible, open source language that is a popular programming project choice for many artists, educators, students and “maker” hobbyists (as well as professionals).

Processing has an optional capability of supporting Android application development directly.  Additionally, Processing can also support app development for most major mobile devices “indirectly” using “Processing.js.”  Processing.js, a sibling Javascript implementation of the original Processing language, now includes support for mobile device “touch” events; touch event support allows Processing to be useful in the development of mobile device optimized web sites.

Processing was originally designed to be an introductory programming language targeted for students in the media arts.  It is particularly well suited for programming graphics, data visualization and interactivity.  Processing is an easy to learn language and beginners at an early stage are typically able to write simple programs (often incorporating graphics) using only a few lines of code.  Processing is sufficiently feature rich to progressively encompass more sophisticated projects as the user’s experience and interests grow.  However, even advanced Processing projects are generally simpler and more approachable for non-technical users as compared to other “professional” programming languages.  (Additionally, a closely related customized version of Processing is the primary tool available for programming the “Arduino” open hardware prototyping system for embedded computing and electronics. Learning general Processing programming can provide a head start in learning to program Arduino based hardware projects.)

The Processing language and development environment depends on the Java Virtual Machine (“JVM”); effectively Processing is a non-Java syntax language that runs under the JVM.  Earlier versions of Processing only produced programs that either ran under the desktop Java runtime or as Java applets suitable for embedding on a web page.  Later versions of the Processing development environment added two additional “modes” and output “targets.” First, a Processing project can be compiled as an Android app (that can run either on an Android device or under an Android emulator).  Second, the Processing development environment now includes integrated support for Processing.js and can output a standalone Processing.js bundle that can be added to a web page.  

Processing can thus be leveraged to facilitate the following options for mobile application development:

1. Direct development and generation of an Android application (using Processing and the Processing development environment).

2. Processing.js based Javascript that can be incorporated into a web site that is optimized for mobile devices.

3. Processing.js code embedded as part of a PhoneGap or Titanium Appcelerator project; both PhoneGap and Titanium projects can be deployed to iOS, Android and several other mobile device platforms.



OpenProcessing (examples & shared code)

YouTube: Processing 101 (series of 11 introductory video tutorials)

Khan Academy: Computer Science (features Processing.js pedagogically)

Processing for Android

Getting Started with Processing for Android

Mobile App Development [Processing, Android, Tutorial]

Processing.js Mobile App Concept


Arduino Software