Back to Blog
Danijel Dragičević

4 minutes read

Exploring the future of integration: A developer’s dive into Anypoint Code Builder (BETA)

Danijel Dragičević

Anypoint Code Builder is a new integrated development environment provided by MuleSoft for building APIs and integrations. It’s designed to streamline and simplify the development process, offering tools and features that enhance the efficiency of developers. Currently, it is in the open beta phase. Users are allowed to test and explore the functionalities of this tool.

In contrast to MuleSoft’s old IDE – Anypoint Studio, which is based on Eclipse, Anypoint Code Builder is based on Visual Studio Code. It comes as a service in the browser and as a standalone desktop application, providing flexibility in how developers choose to engage with the Anypoint platform. Although this tool has shown great promise during its beta phase, we must exercise caution when considering it for production-ready code in our projects. It’s worth noting that there are minor bugs present in the tool, along with some stability concerns.

Key features of Anypoint Code Builder

In contrast to Anypoint Studio, this tool brings several key changes, introducing innovative features that cater to developers’ evolving needs:

Canvas layout

The canvas layout has transitioned from horizontal to vertical. This change allows developers to seamlessly switch between graphical and code representations of integrations within a single window.

Command palette

A new command palette has been introduced, enabling developers to perform tasks such as publishing new assets, importing assets, or deploying applications. These actions can be executed using built-in commands, eliminating the need to navigate away from the main working window.

The new API-led approach

There’s a slight modification in the API-led connectivity approach. Developers can now implement API specifications without first publishing them in Anypoint Exchange. Now, we can directly import specifications while they are in the design phase, write the implementation, conduct testing, and publish the specifications as the “final” version of our API.

Code snippets

Code snippets are predefined fragments of XML or DataWeave code that we can utilize or create our own. This feature enhances development speed, minimizes errors, and ensures project uniformity.

How Anypoint Code Builder improves developer productivity

To get my hands dirty, I use the American Flight API as an example to try the new IDE. I followed an iterative process, progressing from design to development, API publication, and ultimately redeploying the app. This iterative process allowed me to preview how our everyday work unfolds, and the experience has indeed been satisfying. If you are interested in the source code of the projects I was working on, please check out these two repositories:

American Flights System API

American Flights System App

The seamless choice between cloud and desktop version

First, the ability to choose between a cloud or desktop version of the same IDE proved to be wonderful. Opting for the cloud version meant zero installation and zero configuration. Just a simple click to run and start with the implementation of our tasks. Everything was running on a remote machine, sparing my Mac from spinning up its fans at over 2000 rpm. That’s just won my heart.

Unified workspace in Canvas Mode

Unified workspace in Canvas Mode
Canvas Layout

In development mode, the significant change was in the Canvas itself. The capability to simultaneously view graphical and code representations helped me make my flows more concise and reusable. Creating a unified workspace where API specification and API implementation projects were open together contributed to a remarkable development speed. Quickly checking the API contract, testing it within the Console, and verifying its implementation was effortlessly streamlined, resulting in a seamless process.

Currently, IDE lacks a Properties window for configuring connectors via GUI, as in Anypoint Studio. This adds a slight challenge, especially for beginners who might find the learning curve a bit steep. However, it’s essential to note that this is still a BETA version, and not all options are available. Additionally, there’s no support for MUnit tests at the moment. It is anticipated that this will be included in the 2024/2025 timeframe.

Simplified workflow with the Command palette

Simplified workflow with the Command palette
Command Palette

A feature I particularly appreciate is the Command Palette. With a simple “Cmd+P” shortcut, we can access a list of embedded commands facilitating various tasks such as publishing assets, importing dependencies, deploying applications, or configuring our IDE. This feature, among others, contributes to a more pleasant overall work experience.

Debugger’s Watch panel

Debugger’s Watch panel
Watch Expressions

Another noteworthy addition is the Debugger’s Watch panel. It allows us to create multiple watch expressions during debugging. We are able to monitor the state of our payload or variables throughout the application runtime.

The inclusion of Code Snippets

The inclusion of Code Snippets
Code Snippets

Yet another feature that can make our work better is the inclusion of Code Snippets. As ready-made building blocks for our code, these snippets provide predefined XML or DataWeave code fragments that we can easily use or customize in our MuleSoft projects. They act as shortcuts, accelerating our coding process, ensuring code consistency, and reducing errors. By quickly inserting these snippets, we save time and make our development more efficient, eliminating the need to start from scratch for common tasks. Consider a scenario where we want a Logger component to log raw payload each time we use it. Defining one in the “mule-xml.json” file and calling it instead of writing it by hand showcases the efficiency of this feature.

Git support

Git support
Git Plugin

Last but not least, the Git support is astonishing! Our projects are automatically connected to the Anypoint Git instance, allowing us to use Git out of the box. Moreover, with the simple “git remote add,” we can easily add our personal Git repository and commit changes to one or both of them if we like.

Anypoint Code Builder is backward-friendly. The developed project is backward compatible with Anypoint Studio.You can import everything developed in ACB into Anypoint Studio without any “workspace version” limitations, facilitating smooth transitions between two different IDEs.

Conclusion

In the realm of API and integration development, Anypoint Code Builder emerges as a transformative force. It seamlessly replacing Anypoint Studio and setting new standards in this low-code platform arena. The unified workspace and innovative features elevate our development experience, making it more intuitive and enjoyable. Its forward-thinking design positions it as a future-ready tool, promising not just efficiency but an extraordinary development environment. As we eagerly await its official release, Anypoint Code Builder stands as a testament to MuleSoft’s commitment to shaping the future of API and integration development.

Danijel Dragičević

Danijel Dragičević

Danijel has been a member of our family since April 2014. He has spent the last few years developing integrations using Java and MuleSoft’s Anypoint Platform by following the API-led connectivity strategy.


Related posts.