Blockly roadmap

92 views
Skip to first unread message

Rachel Fenichel

unread,
Apr 22, 2020, 2:13:48 PM4/22/20
to Blockly

Hi folks,


I’d like to share the Blockly team’s 1-2 year plan for development on Blockly.


The state of the world


Blockly is a mature (8 year old) JavaScript library with a strong community and a wide range of uses. We add features to the core library based on long-term trends in developer requests, with a strong bias toward educational uses. We aim to reach as many students as possible by supporting a wide range of browsers and browser versions. Developers help each other and share code snippets on our forum, but there is no unified way to publish or share Blockly-related code. Major developers often fork Blockly and make significant changes to support custom use cases.


The big news


Blockly is moving to a plugin model for new features, while continuing to maintain and publish the core library.


What is a plugin?


A plugin is a self-contained piece of code that adds functionality to Blockly using public APIs. 


Plugins can:

  • add new field types (e.g. @blockly/field-slider, @blockly/field-date)

  • define themes (e.g. @blockly/theme-modern)

  • add UI widgets to workspaces (e.g. @blockly/plugin-workspace-search)

  • add or override block definitions

  • create renderers

  • and much more!


First-party plugins are written by the Blockly team and published on npm under the @blockly scope. Third-party plugins are written by you, and can be published on npm or used locally.


Why?


We have four major goals in making this change:


  1. Maintain a stable core library, such that developers are comfortable regularly updating to the most recent release.

  2. Improve developer ergonomics, including integration with modern development tools and processes.

  3. Make it easy to experiment with Blockly features--both for you as developers, and for us as the Blockly team.

  4. Build and sustain a strong ecosystem that makes it easy for you to customize Blockly and share your code with each other.


Splitting our code into a core library and a set of plugins has a lot of benefits. We can experiment with new features without fear of breaking the core library. Plugins can take advantage of other libraries without introducing extra dependencies in core Blockly. And you can write your plugins in ES6 or Typescript!


Publishing on npm lets us take advantage of a well-supported packaging, versioning and distribution system. 


Does this mean you’re not developing core Blockly anymore?


Not at all: we will continue to maintain and publish core Blockly on a quarterly schedule.  In addition to standard maintenance work, we’ll have our hands full adding APIs to the core library to enable plugins.


We will still add features to core Blockly, but we may build and validate them as plugins before moving them to the core library.


Who publishes plugins?


The Blockly team writes first-party plugins in our blockly-samples repository on GitHub and publishes them on npm under the @blockly scope. Third-party developers can publish plugins on npm and tag them with `blockly` and `blockly-plugin`.  


We have templates to help you write and publish plugins in a consistent way.


How do I find plugins?


Searching on npm will be the best way to find plugins. We will publish tagging conventions to help organize these searches.


What if the function I want to call isn’t public?


File a bug (or a pull request!) on core Blockly to add new functions or make existing functions public, and update your plugin to use the public function as soon as it is released.  As a team, we expect much of our work in the next few quarters will involve adding new APIs or tweaking existing ones to make them public and safe. 


If you use private and package APIs, there’s a chance that we will unknowingly break your plugin during a refactor. In a similar vein, plugins should not monkeypatch Blockly.


In summary


This is a significant change in Blockly’s development process, and we think it will be a positive one. As a team we’ve put a lot of thought into this design, and we’ll keep tweaking it as we find new uses. You can help shape our new ecosystem by building out and using plugins. We’re excited to see what you make!


Cheers,

Rachel and the Blockly team


Reply all
Reply to author
Forward
0 new messages