Over a million developers have joined DZone.

Google's Simple is the new BASIC

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Google has released a simple, BASIC-like programming language called Simple. However, while the original BASIC language implementation was created as an educational tool to teach programming, Simple is intended for developing Android applications.

"Bringing an easy to learn and use language to the mobile world and the Android platform is the goal of the Simple project." - Herbert Czymontek.

According to Google, Simple programs are form definitions (which contain components) and code (which contains the program logic). The interaction between the components and the program logic happens through events triggered by the components. The program logic consists of event handlers which contain code reacting to the events.

Here is part of the Simple Tetris-like game source code:

' -----------------------------------------------------------------------------

' Analyze keyboard input

' -----------------------------------------------------------------------------

Event Tetris.Keyboard(keycode As Integer)

If keycode = Component.KEYCODE_BACK Then Finish()



If IsGameActive() Then

Select keycode

Case Component.KEYCODE_PAD_LEFT

BrickMoveLeft()



Case Component.KEYCODE_PAD_RIGHT

BrickMoveRight()



Case Component.KEYCODE_PAD_UP

BrickTurnRight()



Case Component.KEYCODE_PAD_DOWN

BrickTurnLeft()



Case Component.KEYCODE_PAD_CENTER, Component.KEYCODE_SPACE

BrickDropDown()

End Select

End If

End Event

Simple is available for Linux, Mac, and Windows. The source code for the implementation is freely available, along with sample applications.

(Please note that Simple is still a work in progress.)

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}