Deno.js for Volto Users: A Modern and Secure JavaScript Runtime

Volto is a modern open-source frontend for the Plone content management system. It's built using React and Redux, and it provides a flexible and extensible way to create custom themes and add-ons for Plone. While Volto is a modern and powerful tool, it still relies on Node.js for its JavaScript runtime. In this article, we'll explore how Deno.js, a modern and secure JavaScript runtime, can be used with Volto to create a more modern, secure, and easy-to-use JavaScript development environment.

What is Deno.js?

Deno.js is a modern JavaScript runtime created by the same developer who created Node.js, Ryan Dahl. Unlike Node.js, Deno.js is secure by default, has built-in TypeScript support, and can run JavaScript and TypeScript code without a build step. These features make Deno.js an attractive option for web developers who want a more modern and secure runtime for their JavaScript and TypeScript projects.

Benefits of using Deno.js with Volto

By using Deno.js with Volto, developers can take advantage of its built-in TypeScript support, secure-by-default approach, and module system to create a more modern and secure JavaScript development environment. Additionally, Deno.js can simplify the management of dependencies, making it easier to share code between different parts of a Volto project. This can help reduce the likelihood of errors and make code easier to maintain over time.

Examples of using Deno.js with Volto

Here are a few examples of how Deno.js can be used with Volto:

  1. Writing a custom theme using TypeScript: By using Deno.js's built-in TypeScript support, developers can write type-safe code for a custom Volto theme. This can make it easier to maintain the theme over time and reduce the likelihood of errors.
  2. Creating a custom Plone add-on: Developers can use Deno.js to write a custom Plone add-on that includes JavaScript or TypeScript code. For example, a developer could use Deno.js to write a custom Plone widget that displays data from an external API.
  3. Sharing code between different parts of a Volto project: By using Deno.js's module system, developers can share code between different parts of a Volto project. For example, a developer could write a utility function in TypeScript that is used by both a Volto theme and a custom Plone add-on.

Conclusion

In conclusion, using Deno.js with Volto can provide a more modern and secure JavaScript development environment for Plone CMS development. By using Deno.js's built-in TypeScript support and module system, developers can write type-safe code and manage dependencies more easily. While Deno.js is still a relatively new JavaScript runtime, it's worth considering as a tool for Volto development. With its modern features and secure-by-default approach, Deno.js can help make Volto development more efficient, secure, and enjoyable.

If there's "shooting for the moon", this is shooting for the other galaxies.

Volto itself is rather conservative with technology. Better tried and true then investing a ton of effort to something that proves to be a niche. By the time we finish moving everything to deno, the "next big thing" is already two generations old.

1 Like

Thank you for your comment. We can update to React 18 instead of Deno. This can improve performance and add new features. Therefore, Volto can stay up-to-date with the latest technology trends ( not unstable trends ) while still maintaining a tried and true approach.
I understand your opinion , and it's may be not trure

Volto is already up to date with Node 18 LTS and latest Webpack in Volto 17 (currently in alpha stage).

Thanks for the suggestions.

Sorry I haven't revised the react version. I assumed it would be an old version.I should have made sure first.