I’m new to Axon and recently found it while looking for better ways to deal with complex business logic in a Java application. What I found interesting is that it supports CQRS and Event Sourcing which seemed a perfect fit for projects where you want to alleviate the scaling issues… clean separational of the concerns seems like a great idea!
I’ve read the basic documentation, but I’m still not quite sure how to kick off a small project from scratch using Axon Framework. I would love to be able to build a simple inventory management system – something lightweight I can learn how Axon handles commands, events, and aggregates.
While working on a separate project which involved a rails course I realized how helpful frameworks can be when they provided clear patterns and community patterns/support, this is my hope for Axon to provide this to my Java application care of the framework.
Can someone point me in the direction of:
Recommended setup / project structure?
Integrating with Spring Boot?
Any best practices for amateurs trying Event Sourcing?
Common traps to avoid?
Thanks in advance and I’m looking forward to learning from this community!
Hey @mathew_25, I’ll give you some contents to get started with Axon Framework.
First, some video options. Here is a series of shorts explaining how to start an Axon Framework project. Note the at these are five years old, so the versions definitely don’t align with what we’d recommend right now. The rough flow is still the same, though.
Next to that, AxonIQ also has an academy, for which there are also some free courses. The free courses are about DDD, CQRS, and Event Sourcing, and the basics of Axon Framework. Besides those, there is of course a lot more to watch, if you are up for those.
Second, some written material.
For an Axon Framework 4 application, AxonIQ’s Docs has a Getting Started you can follow. If you want to be on the bleeding edge, you can also do the Axon Framework 5 Getting Started, which should be released fully somewhere this year. Concerning Spring Boot integration: the docs have configuration samples for both plain Java and Spring at all places. For more details on the Spring Boot integration itself, you can check this page.
Lastly, we have some sample projects you can look at.
I have my own, called the game rental app, for which the README.md guides you through the steps. I have used this application during conferences, so there are more videos to watch on those if you want. Next to that, you can take a look at the Bike Rental app (from Allard, the CTO of AxonIQ). Takes a slightly different angle than my sample app, but still worthwhile to check it if you want to get inspiration. Besides those, AxonIQ also has a code samples repository, which contains more detailed samples on how to tackle certain things.
I hope all this data helps you further, @mathew_25! Be sure to post follow-up questions if you need any guidance.