Introduction to Blockly applications
Stay organized with collections
Save and categorize content based on your preferences.
A Blockly application is a web application that contains a Blockly editor
(workspace). This document gives examples of what Blockly applications are used
for and looks at typical UI features.
If you haven't already done so, be sure to read the visual
glossary and basic application
steps before continuing with
this document.
What do Blockly applications do?
Blockly applications help users write programs in a variety of fields, from
video games to robotics to data analysis. Users write their programs using
blocks, which the application uses to generate text-based code, such as
JavaScript or Python. The application then runs the generated code directly
or the user downloads and runs it on another platform, such as a robot or
hand-held video game controller.
Here are some examples of the kinds of programs users write with Blockly
applications:
Puzzle solutions, animation, or music: The generated code solves a
puzzle (like a maze), displays an animation, or plays music. For an example,
see Code.org's Music Lab.
Video games: The generated code runs a video game. For example, create
the first two levels of "Whack the Mole" in MakeCode
Arcade and download the game to a controller
or play it in the simulator.
Robotics: The generated code directs a robot. For example, program a
robot with Ozoblockly
and download it to a real robot or run it in the simulator.
Drawing: The generated code draws a 2D or 3D drawing. For an example,
see BlocksCAD.
Data analysis: The generated code analyzes data and creates a graph. For
an example, see this demonstration of the Dialogic
Platform.
Application-specific code: The generated code performs a task specific
to a particular application. For example, Blockly Developer Tools is a tool for designing new Blockly blocks. It generates
block definition code, which users copy and paste into their own Blockly
application.
User interfaces
A good way to understand the typical components of Blockly applications is to
look at their user interfaces.
Basic UI components
Almost all Blockly applications share a few basic components: a Blockly editor
(workspace), an output panel, and a "Run" button. For example, here is the UI of
the Maze in Blockly Games.
A few Blockly applications omit the "Run" button and instead update the output
panel every time the user makes a change. For example, the
Graph
application in Blockly's samples has two output panels (one for the graph and
one for the equation) that it updates on every change.
Some applications don't have an output panel. This is most common in hardware
applications, such as those for programming robots. While some of these
applications include a hardware simulator, many of them just let users download
and run the generated code directly on the target device.
Additional UI components
Most applications have additional UI components. Some of these meet general
needs, such as saving the user's work, while others fulfill application-specific
needs, such as designing a GUI. Here are some examples:
Scratch, an application for creating animations
and video games, has graphics and sound editors; panels to create new
sprites and backdrops; and file, edit, and settings menus:
MakeCode Arcade, an application
for creating video games, has output controls, code and graphics editors, a
settings menu, and download and save buttons. Its output panel simulates a
handheld game controller.
MIT App Inventor, an application for
creating phone apps, has separate screens for its GUI designer and Blockly
editor, as well as file, connection, build, and settings menus. Instead of
an output panel, users test generated code on their phone.
Which additional components you should include depends on your application's
goals and the abilities of your users. Some common components are:
Administration:
- File management (new, open, save, save as, delete)
- Account management (create, login, logout)
- Settings (language, UI configuration)
Programming:
- Edit commands (undo, redo, copy, cut, paste, duplicate)
- GUI designer
- Graphics and sound editors
- Code editor or read-only code display
Testing
- Output configuration (start/stop, playback speed, volume, screenshot,
etc.)
- Debugger (breakpoints, run, step, block highlighting)
- Set test parameters
Hardware
- Connection (USB, Bluetooth, QR code)
- Configuration (choose model, choose accessories, assign component names)
- Control (manually control robot, record robot position)
- Download code
Help
- Documentation
- Interactive tutorials
- Context-sensitive help
Where do I go from here?
If you're still thinking about your application, continue reading about design
considerations.
If you want to see what it's like to build a simple application, try the
Getting started with Blockly
codelab.
And if you're ready to write your application:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-10 UTC."],[],[],null,["A Blockly application is a web application that contains a Blockly editor\n(workspace). This document gives examples of what Blockly applications are used\nfor and looks at typical UI features.\n\nIf you haven't already done so, be sure to read the [visual\nglossary](/blockly/guides/get-started/workspace-anatomy) and [basic application\nsteps](/blockly/guides/get-started/workspace-creation) before continuing with\nthis document.\n\nWhat do Blockly applications do?\n\nBlockly applications help users write programs in a variety of fields, from\nvideo games to robotics to data analysis. Users **write their programs using\nblocks** , which the application uses to **generate text-based code** , such as\nJavaScript or Python. The application then **runs the generated code directly**\nor the user **downloads and runs it on another platform**, such as a robot or\nhand-held video game controller.\n\nHere are some examples of the kinds of programs users write with Blockly\napplications:\n\n- **Puzzle solutions, animation, or music:** The generated code solves a\n puzzle (like a maze), displays an animation, or plays music. For an example,\n see [Code.org's Music Lab](https://studio.code.org/projects/music/new).\n\n- **Video games:** The generated code runs a video game. For example, create\n the first two levels of \"Whack the Mole\" in [MakeCode\n Arcade](https://arcade.makecode.com/) and download the game to a controller\n or play it in the simulator.\n\n- **Robotics:** The generated code directs a robot. For example, program a\n robot with [Ozoblockly](https://games.ozoblockly.com/shapetracer-freeform)\n and download it to a real robot or run it in the simulator.\n\n- **Drawing:** The generated code draws a 2D or 3D drawing. For an example,\n see [BlocksCAD](https://www.blockscad3d.com/editor/).\n\n- **Data analysis:** The generated code analyzes data and creates a graph. For\n an example, see [this demonstration of the Dialogic\n Platform](https://dialogiconderzoek.nl/diadashboard/platform/demo1.gif).\n\n- **Application-specific code:** The generated code performs a task specific\n to a particular application. For example, [Blockly Developer Tools](https://google.github.io/blockly-samples/examples/developer-tools/index.html) is a tool for designing new Blockly blocks. It generates\n block definition code, which users copy and paste into their own Blockly\n application.\n\nUser interfaces\n\nA good way to understand the typical components of Blockly applications is to\nlook at their user interfaces.\n\nBasic UI components\n\nAlmost all Blockly applications share a few basic components: a Blockly editor\n(workspace), an output panel, and a \"Run\" button. For example, here is the UI of\nthe [Maze](https://blockly.games/maze?level=4) in Blockly Games.\n\nA few Blockly applications omit the \"Run\" button and instead update the output\npanel every time the user makes a change. For example, the\n[Graph](https://google.github.io/blockly-samples/examples/graph-demo/index.html)\napplication in Blockly's samples has two output panels (one for the graph and\none for the equation) that it updates on every change.\n\nSome applications don't have an output panel. This is most common in hardware\napplications, such as those for programming robots. While some of these\napplications include a hardware simulator, many of them just let users download\nand run the generated code directly on the target device.\n\nAdditional UI components\n\nMost applications have additional UI components. Some of these meet general\nneeds, such as saving the user's work, while others fulfill application-specific\nneeds, such as designing a GUI. Here are some examples:\n\n- [Scratch](https://scratch.mit.edu/), an application for creating animations\n and video games, has graphics and sound editors; panels to create new\n sprites and backdrops; and file, edit, and settings menus:\n\n- [MakeCode Arcade](https://www.microsoft.com/en-us/makecode), an application\n for creating video games, has output controls, code and graphics editors, a\n settings menu, and download and save buttons. Its output panel simulates a\n handheld game controller.\n\n- [MIT App Inventor](https://appinventor.mit.edu/), an application for\n creating phone apps, has separate screens for its GUI designer and Blockly\n editor, as well as file, connection, build, and settings menus. Instead of\n an output panel, users test generated code on their phone.\n\n\nWhich additional components you should include depends on your application's\ngoals and the abilities of your users. Some common components are:\n\n- Administration:\n\n - File management (new, open, save, save as, delete)\n - Account management (create, login, logout)\n - Settings (language, UI configuration)\n- Programming:\n\n - Edit commands (undo, redo, copy, cut, paste, duplicate)\n - GUI designer\n - Graphics and sound editors\n - Code editor or read-only code display\n- Testing\n\n - Output configuration (start/stop, playback speed, volume, screenshot, etc.)\n - Debugger (breakpoints, run, step, block highlighting)\n - Set test parameters\n- Hardware\n\n - Connection (USB, Bluetooth, QR code)\n - Configuration (choose model, choose accessories, assign component names)\n - Control (manually control robot, record robot position)\n - Download code\n- Help\n\n - Documentation\n - Interactive tutorials\n - Context-sensitive help\n\nWhere do I go from here?\n\nIf you're still thinking about your application, continue reading about [design\nconsiderations](/blockly/guides/design/applications).\n\nIf you want to see what it's like to build a simple application, try the\n[Getting started with Blockly\ncodelab](https://blocklycodelabs.dev/codelabs/getting-started/index.html).\n\nAnd if you're ready to write your application:\n\n- [Build your editor](/blockly/guides/configure/web/configuration_struct)\n- [Build your blocks](/blockly/guides/create-custom-blocks/overview)\n- [Build your application](/blockly/guides/app-integration/run-code)"]]