Blockly

Blockly is a client-side JavaScript library for creating visual block programming editors. It is a project of Google and is open-source under the Apache 2.0 License.[1] It runs in a web browser, and resembles Scratch.

Blockly uses blocks that link together to make writing code easier, and can generate JavaScript, Python or Dart code. It can also be customised to generate code in any computer language.[2]

History

Development of Blockly started in summer of 2011, and the first public release was at Maker Faire in May 2012. Blockly was originally designed as a replacement for OpenBlocks in App Inventor.[3] Neil Fraser started the project with Ellen Spertus and Mark Friedman as contributors.

User interface

The user interface of a Blockly program consists of a toolbar, which holds all the available blocks and a workspace, where you place the blocks. There is a trashcan on the workspace which deletes any blocks dragged onto it.[4]

Customising Blockly

Blockly comes with a basic set of blocks for common instructions, but can be customized by adding more blocks. New blocks require a block definition and a generator. The definition tells Blockly how the block should look and the generator tells it how to make it's output code. There is an example program called Block Factory which makes writing the block definition easier by using Blockly blocks to construct a new block.

Applications using Blockly

Blockly has been used to build Blockly Games, a set of educational games that teach programming concepts such as loops and conditionals.[5][6]

Blockly is used by Code.org to teach introductory programing to millions of students in their Hour of Code program.[7]

More examples can be found in the Blockly Documentation

Features

References

External links