Magnet.me  -  Het slimme netwerk waarop hbo‑ en wo‑studenten hun baan of stage vinden.

Het slimme netwerk waarop hbo‑ en wo‑studenten hun baan of stage vinden.

Introducing the Axon Framework IntelliJ plugin

Geplaatst 26 sep. 2024
Delen:
Werkervaring
0 tot 7 jaar
Full-time / part-time
Full-time
Functie
Soort opleiding
Taalvereiste
Nederlands (Vloeiend)

Je carrière begint op Magnet.me

Maak een profiel aan en ontvang slimme aanbevelingen op basis van je gelikete vacatures.

By Mitchell Herrijgers March 11 2022

Blog by AxonIQ

2 min

Axon Frameworkprovides the building blocks that CQRS requires and helps developers to create scalable and extensible applications while maintaining application consistency in distributed systems. It helps by handling the communication of messages, such as commands, events, and queries.

However, your IDE does not understand this, and so it will leave finding message handlers or publishers up to your memory. We are introducing theIntelliJ Axon Framework pluginto solve this problem. You can download it via the Jetbrains marketplace within IntelliJ or themarketplace website.

Navigation

You often want to navigate between producers of a message and handlers of that message. The IntelliJ plugin creates line markers at these locations, containing the references to their counterpart. Clicking on the line marker will reveal the options.

Methods annotated with a handler annotation, such as CommandHandlers, will get a line marker to navigate to constructor invocations of that payload. The text describing an option will help you, showing which handler is producing this message. For example, if a @SagaEventHandler publishes the command, that saga will be shown as the publisher of that command. If there are no parent handlers, it will show the method’s name instead. This method can be part of a Spring bean, a controller, or any other class. In the following example, we can see that both a saga and a Spring Controller produce a command.

The plugin will also show handlers when creating a message. The IntelliJ plugin will display a line marker at the locations you instantiate a class if that class is known as a message. The plugin understands inheritance and will show more generic handlers as well. In the following example, we can see a line marker on a constructor invocation of a message that is handled in four different places throughout the application. Of these options, three are projections, and one is the EventSourcingHandler for this aggregate.

When the plugin recognizes a class as a message, it shows a line marker at the class declaration that contains both the handlers and constructor invocations. Here, we can see that the command is published by a saga and some controllers. We can also see that the command is handled in the Room aggregate.

Last but not least, it can sometimes be hard to find related aggregate members or the parent aggregate of an entity. The plugin shows a line marker on all aggregates and entities with related classes. For example, if Booking is an @AggregateMember of Room, a line marker is shown to navigate easily.

These navigational features will undoubtedly improve your productivity with Axon Framework and help new people to understand the framework more easily.

Inspections

Axon Framework has specific requirements when working with aggregates or entities. These can be easy to miss for new users of the framework.

The plugin adds inspections to highlight these errors to users. One of these scenarios is when a developer forgets to add an empty constructor to the aggregate. The class definition will show a warning that it’s missing while required by Axon Framework.

Other inspections are also in place. For example, an error is shown when entities have no @EntityId annotation or an aggregate has no @AggregateIdentifier annotation.

Conclusion

The plugin is designed to make working with Axon Framework in your favorite IDE much easier. We at AxonIQ will continue to support and expand the plugin to make usage of the Axon Framework as easy as possible!

We would love for you to report any features you’d like to see at our Github issue tracker. We are always happy to receive feedback and hope this plugin is just what you were looking for!

You can download it via the Jetbrains marketplace within IntelliJ or themarketplace website!

Mitchell Herrijgers

Solutions Architect for Axon Framework at AxonIQ Mitchell is a software craftsman, passionate coder, and eager to learn. He likes complex challenges and he doesn't get discouraged easily. He is interested in the following topics; Kotlin/Java, Event-Sourcing / CQRS / Axon Framework, Cloud/AWS/Infrastructure as Code, and performance tuning. After his study, in Computer Science at the Rotterdam University of Applied Sciences, he worked as a software engineer at ING Bank, Codecentric, and the Port of Rotterdam.

Share:

Tweet

Axon Framework, IntelliJ

Looking for something else?

The 5 fundamental challenges AxonIQ helps you solve

Blog by AxonIQ

3 min

Read now

Rethinking Microservices Architecture through Dynamic Consistency Boundaries

Blog by AxonIQ

5 min

Read now

Introducing Axon Server 2024.1

Blog by AxonIQ

2 min

Read now

Axon provides a unified, productive way of developing Java applications that can evolve without significant refactoring from a monolith to Event-Driven microservices. Axon includes both a programming model as well as specialized infrastructure to provide enterprise ready operational support for the programming model - especially for scaling and distributing mission critical business applications.
Axon is a platform consisting of the…


Axon provides a unified, productive way of developing Java applications that can evolve without significant refactoring from a monolith to Event-Driven microservices. Axon includes both a programming model as well as specialized infrastructure to provide enterprise ready operational support for the programming model - especially for scaling and distributing mission critical business applications.

Axon is a platform consisting of the popular Axon Framework and the new, built-for-purpose Axon Server. For companies that are scaling up and require additional features the Axon Enterprise is targeted towards mission-critical, medium to large scale production deployments. In addition Axon includes targeted feature packs for specific use cases such as the big data pack, the scale pack and the security and compliance pack.

Axon is being used by a wide range of companies in highly demanding sectors such as healthcare, banking, insurance, logistics and public sector. AxonIQ offers extensive tooling, professional support and education.

Founded in 2017, AxonIQ is based in Utrecht, The Netherlands.

ICT
Utrecht
25 medewerkers