DEV Community

Cover image for What's new in Piral #3
Florian Rappl
Florian Rappl

Posted on

What's new in Piral #3

Piral is an open-source framework for microfrontends based on React. It brings everything to create amazing frontends using a scalable development approach.

This is the third blog post about our progress on Piral. We will continue to describe our progress and future plans here on dev.to.

The agenda should be almost identical in each post. We'll use

  • Current progress to explain what has been done since the last post
  • Future plans to explain what we are currently working on or have in our direct pipe
  • Other thoughts to list some of the thoughts for future development

Please reach out to us in case of any feedback, ideas, or criticism. We'd love to improve!

Current Progress

Last week we shipped new updates for the 0.9 version of Piral. Nearly every day we provided an update to improve user experience on the 0.9 track:

  • 0.9.4: Brought many of the backwards compatible enhancements of the 0.10 to 0.9
  • 0.9.5: Included support for submodule handling in shared dependencies
  • 0.9.6: Improved cache handling and scaffolding files convenience

There is also a 0.9.7 to be released either today or tomorrow.

Certainly the coolest thing about the patches for the 0.9 series is the switch to the new logo already (instead of waiting for the 0.10 version). For instance, in the NPM view, the Piral homepage, or the repository.

Sweet!

As far as the version 0.10 is concerned we are now close to reach feature completeness. The only thing which is still in flux is the generation of the TypeScript declarations for the Piral instance.

In general the generation already works fine, however, a few things still need to be optimized:

  • Types from shared dependencies should not be copied but rather just referenced (as these shared dependencies will anyway be still "copied", i.e., installed via NPM)
  • It is possible to also custom define "virtual" shared dependencies; the declaration generation should also handle that

We are optimistic that the 0.10 will be rolled out within the next week.

Future Plans

For the v1 of Piral, we have some polishing to be done. The most notable addition will be the first-class support of import maps.

Another area of improvement for the v1 is stronger isolation - if needed. Right now Piral offers some isolation, such as dedicated API objects per pilet, automatically inserted lazy loading and error handlers per pilet component, as well as dedicated state containers. But the DOM is still shared.

Isolation

While there are certainly options in that space (e.g., using an iframe, worker threads, shadow DOM, ...) they all come with their own problems and may not be applicable for the pilet. For instance, running in an iframe requires all the dependencies to be available in that iframe, too. And even if that problem is solved - how is global styling applied there?

While a Proxy would allow us to gracefully handle some of the issues, the consequent browser compatibility issue should not be left unhandled, too.

Nevertheless, we'll certainly try to find a sweet spot that allows us to support most kinds of scenarios while being efficient and backward compatible (not only in Piral but also with at least reaching IE 11).

Still betting on IE11

Other Thoughts

Right now we also expand on the tooling section. We've started development of the Piral Inspector, which will be a browser extension available for all major browsers. This extension will allow enhanced debugging capabilities with the ease of a graphical interface.

Additionally, we will hopefully soon start with a VS Code extension. This extension should simplify the VS Code setup as well as allow controlling the Piral CLI from within the IDE.

Oh Yeah!

But we won't stop here. After 0.10 is released our full effort will be put into finishing everything for the v1 release. This includes our product placed on top of Piral - the Piral Cloud. This backend service will not only feature the feed service, but also other commodity services such as a translation service or a feedback service.

Furthermore, our online service platform will include advanced functionality like a pilet scaffolding UI - to generate a full pilet for a GraphQL schema or a Swagger specification.

Conclusion

We've come a long way since we started Piral. Our goal was to make the best framework for microfrontends and I think we are close. The Siteless UI nature of Piral makes it possible to start without any backend service (or even CI/CD); serverless for the win! All you need is some storage and there you go.

With some of our clients already running Piral in production, we are sure of its stability and potential. We would love to see more community contributions, interest, and questions. In the end, our goal is not only to provide an outstanding framework but also build a welcoming community around microfrontends in general.

Top comments (0)