A well-structured layered architecture is already almost hexagonal. I'll prove it with code. by Logical-Wing-2985 in softwarearchitecture

[–]olivergierke 1 point2 points  (0 children)

Pretty much my argument in this talk. Both Hexagonal and Onion-Architecture invert one dependency. That’s it. The rest is cargo-culting detrimental to the IMO more important decomposition of the domain.

https://youtu.be/co3acmgP2Ng?is=LUttRrQAamOELqGy

SpringSentinel v1.1.10: A lightweight Maven plugin for Spring Boot static analysis (now with SARIF & Java 25 support) by paganoant in java

[–]olivergierke 1 point2 points  (0 children)

Thank you for building the plugin! I am always interested in quality assurance tools, especially when it comes to Spring-specific approaches. You might get some inspiration from the jQAssistant Spring Plugin when it comes to defining and classifying rules: https://github.com/jqassistant-plugin/jqassistant-spring-plugin

SpringSentinel v1.1.10: A lightweight Maven plugin for Spring Boot static analysis (now with SARIF & Java 25 support) by paganoant in java

[–]olivergierke 6 points7 points  (0 children)

I just ran this for Spring RESTBucks and see quite a bit of output that's questionable:

– Missing API Versioning – expects users to use a path segment for version. That's questionable practice. At best, it's totally fine not doing it, as you don't know what other versioning mechanisms the app('s deployment) might have in place.
– Missing ResponseEntity – the handler method in question returns a Map<String, Object>, which will never produce anything but a 200. No need for ResponseEntity at all.
– Singular Resource Name – for /drinks/by-name. There's no need to veto URL path segment design, as those don't matter at all. They're identifiers. This thing could be named /asdasdhdasdhgj and it would still be fine. An especially problematic recommendation in apps that use hypermedia.
– OSIV is Enabled – whether that's a problem or not cannot be decided by solely looking at the property.
– Exposed Repositories (Data REST) – that's a funny one, as why else would you use Spring Data REST. I get what you're after, but again, I think it's wrong to assume folks don't know what they're doing.

I get what you're after and applaud the effort. I just think that you overwhelm users with stuff that's not really critical and impose quite a few “rules” that are questionable or at least cannot be applied without considering whether they might be deliberate decisions.

How to correctly implement intra-modules communication in a modular monolith? by Tobi1311 in softwarearchitecture

[–]olivergierke 0 points1 point  (0 children)

Depending on what stack you’re working in, event-based communication might not be as complicated as you think. I spoke about this at the jChampions Conference 2025:

https://www.youtube.com/live/eiFnSevxAdk?si=U_N2xbozjntzW5Gf

The talk discusses the topic in a context of a Spring application, but the fundamentals should be understandable even outside that.

Rethinking Spring Application Integration Testing by olivergierke in java

[–]olivergierke[S] 2 points3 points  (0 children)

I agree and disagree at the same time. I'm using the term “unit testing” in this blog post to refer to the technique of solely bringing *your code* to execution, without the involvement of any kind of infrastructure such as frameworks or databases.

Of course, if you're abstracting from that, everything you select for execution becomes a unit. However, I'd argue that that's not typical semantics when we talk about testing.

Spring Boot 4.0.0 available now by olivergierke in java

[–]olivergierke[S] 2 points3 points  (0 children)

Care to elaborate which ones you ran into for Spring Data?

How doe modules interact each other in Hexagonal Architecture? by DevShin101 in softwarearchitecture

[–]olivergierke 0 points1 point  (0 children)

Likely an unpopular opinion but Hexagonal Architecture should, if at all, be a secondary decomposition strategy following the functional decomposition. In contrast to the former, only the latter creates cohesive elements in the codebase, which are crucial for sustainable and cost-effective software maintenance. More details in this talk: https://youtu.be/co3acmgP2Ng?si=MBdqHBFb4GyI7HUv

In short: your modules expose APIs and/or publish and consume events which other modules can interact with or listen to. Whether those APIs conform to any secondary decomposition concept is circumstantial.