With the block concept coming into WordPress, we will see new opportunities to share content. Services like Gutenberg Cloud will most likely pop up, and of course the WordPress.org plugin repository will also be available. One thing about something like Gutenberg Cloud is that you could potentially just grab blocks directly from within the editor. Pretty neat.
Due to Drupal also adopting the Gutenberg editor, any CMS that implements blocks the WordPress way, will be able to leverage the content from both ecosystems. This is very exciting and interesting.
For the most part, I am excited about this new idea. Unfortunately, there are people with malicious intention, and I definitely fear that with an explosion of small reusable pieces, we will see an increase of security vulnerabilities around the sharing of blocks. More on that later.
There will be many niche blocks, but there will also be general purpose blocks. Much like the internal parts of WordPress itself, the nav menus, widgets, shortcodes, etc. are all reasons why we use WordPress. They allow us to create content quickly and with relatively minimal headache. Blocks will supplant the need for a lot of these core APIs. There has been worry over the reduced role of meta boxes, but most likely it will all succumb to a block based implementation, which will probably be better anyways.
Currently, which we haven’t touched on too much in Gutenberg is the concept of reusable blocks. This is where I am the most excited about block sharing.
Right below is the first reusable block I am using on my site.
- Advent of Gutenberg 1 – Introduction
- Advent of Gutenberg 2 – Text
- Advent of Gutenberg 3 – Media
- Advent of Gutenberg 4 – Block fiesta
- Advent of Gutenberg 5 – UI Overview
- Advent of Gutenberg 6 – Block Sharing
- Advent of Gutenberg 7 – Keyboard Efficiency
There is a weird bug, currently where I get an extra list item. Oh well not too big of a deal. The main exciting part is that I can use this across all of my posts now. Click on any of the links to see the same list being used across all. We get to share content within our own WordPress install. Pretty cool. But with things like the REST API available, we can potentially even provide content that can be widely distributed as a “reusable block”. I think there is a lot of room for innovation around this. Essentially since the reusable block is also essentially just a custom post type.
Although there is a lot of potential for creativity and sharing, I am somewhat concerned about the potential negatives.
There are a two main downsides that are apparent to me: security, and code sprawl.
As mentioned above, security, and education around security is going to be critical. If we make it too easy to grab whatever block from wherever, we are most likely in big trouble. This isn’t necessarily anything new, as you could make the argument that the WordPress.org plugin repository can be a major attack vector as well. This is definitely a reasonably fair assessment. The only difference with blocks, is that they will most likely be more prolific than plugins.
We are probably in an era of immense code sprawl already. It might get worse. We will most likely see a lot of blocks that are pretty much the same block. Does this benefit the users? Will we be able to encourage new coders if there are clear winners already established for certain blocks? I think the ability to share blocks will potentially cut down on the creation of the same blocks, but I can definitely see the flip side where it increases. Maybe this isn’t a bad thing at all either. I tend to think that it is, but maybe it really does not matter all that much.
With the rise of distributed computing platforms, I think it will matter, as we will want a way to condense the amount of information we are sharing amongst each other to only what is necessary. The efficiency gains in distributed computing won’t mean very much if everyone has a slightly different file that does 99.9% the same thing. We will need some sort of block unifier, that can take the contributions of many and turn it into one singular block.
Gutenberg really opens up a lot of unique opportunities that were not previously possible. I am excited for the future and to see what comes. We will definitely need to be aware of the potential pitfalls ahead and start implementing some safeguards or strategies against them.