mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

347K
active users
Marián Varga<p>How to avoid concurrent updates overwriting each other&#39;s data in a ports&amp;adapters architecture?</p><p><a href="https://dev.to/marianvarga/hexagonaloptimistic-may-not-be-easy-3g50" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">dev.to/marianvarga/hexagonalop</span><span class="invisible">timistic-may-not-be-easy-3g50</span></a></p>
Marián Varga<p>See my blog post about why investing in specification-first makes your API more future-proof<br /><a href="https://dastalvi.com/blog/what-is-your-favourite-standard/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">dastalvi.com/blog/what-is-your</span><span class="invisible">-favourite-standard/</span></a><br /><a href="https://mastodon.social/tags/api" class="mention hashtag" rel="tag">#<span>api</span></a> <a href="https://mastodon.social/tags/openapi" class="mention hashtag" rel="tag">#<span>openapi</span></a> <a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a></p>
Marián Varga<p>&quot;What is a URL?&quot; My blog post showing why you should not design REST API endpoints blindly<br /><a href="https://dev.to/marianvarga/what-is-a-url-4jfn" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">dev.to/marianvarga/what-is-a-u</span><span class="invisible">rl-4jfn</span></a></p>
Marián Varga<p>12 overlooked API details that can get you in trouble<br /><a href="https://youtu.be/MgXMiG7a9ss" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="">youtu.be/MgXMiG7a9ss</span><span class="invisible"></span></a><br />My talk about <a href="https://mastodon.social/tags/API" class="mention hashtag" rel="tag">#<span>API</span></a> details worth paying attention to, this time a little bit longer at the Bratislava <a href="https://mastodon.social/tags/Java" class="mention hashtag" rel="tag">#<span>Java</span></a> Meetup</p>
Marián Varga<p>With modern distributed applications where communication and integration via <a href="https://mastodon.social/tags/API" class="mention hashtag" rel="tag">#<span>API</span></a> is essential, simple unit tests most developers are familiar with (mostly <a href="https://mastodon.social/tags/JUnit" class="mention hashtag" rel="tag">#<span>JUnit</span></a> for <a href="https://mastodon.social/tags/Java" class="mention hashtag" rel="tag">#<span>Java</span></a> / <a href="https://mastodon.social/tags/Kotlin" class="mention hashtag" rel="tag">#<span>Kotlin</span></a> developers) are not enough. We need integration tests. </p><p>I learned about the Karate framework from the Andres Sacco&#39;s talk. </p><p>I was curious to find out more, so I asked Andres to do an interview with me to discuss the topic in a broader context.</p><p><a href="https://youtu.be/PjwvMbEBf5w" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="">youtu.be/PjwvMbEBf5w</span><span class="invisible"></span></a></p><p>And the talk: <a href="https://www.youtube.com/watch?v=oZhR1o60ArI" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=oZhR1o60ArI</span><span class="invisible"></span></a></p>
Marián Varga<p>Today I found this old podcast episode from ThoughtWorks and some points resonated with me:<br />- protect interfaces (not implementations) over time<br />- use field names in your APIs that make sense in your business context<br />- Integration is not just the &quot;glue code&quot;<br />- something is worth making reusable if it does not change frequently<br />- be prepared to throw away low-code tools and replace them by a multi-purpose language with good support for refactoring, versioning etc.<br /><a href="https://www.thoughtworks.com/insights/podcasts/technology-podcasts/you-cant-buy-integration" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="ellipsis">thoughtworks.com/insights/podc</span><span class="invisible">asts/technology-podcasts/you-cant-buy-integration</span></a></p>
Marián Varga<p>My informal discussion with Danilo de Luca as a follow up to his talk about Circuit Breaker pattern at the Open Community Experience spontaneously evolved into a demonstration of the importance of communication between technology and business oriented people. </p><p><a href="https://www.youtube.com/watch?v=R6gtdw36S7E" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=R6gtdw36S7E</span><span class="invisible"></span></a></p><p><a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a> <a href="https://mastodon.social/tags/integration" class="mention hashtag" rel="tag">#<span>integration</span></a> <a href="https://mastodon.social/tags/jakartaee" class="mention hashtag" rel="tag">#<span>jakartaee</span></a></p>
Marián Varga<p>In one of last talks at Open Community Experience Mads Opheim💻 who uses <a href="https://mastodon.social/tags/kotlin" class="mention hashtag" rel="tag">#<span>kotlin</span></a> but also keeps an eye on what happens in <a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a> enterprise world like <a href="https://mastodon.social/tags/quarkus" class="mention hashtag" rel="tag">#<span>quarkus</span></a> and <a href="https://mastodon.social/tags/jakartaee" class="mention hashtag" rel="tag">#<span>jakartaee</span></a> showed that <a href="https://mastodon.social/tags/connecting" class="mention hashtag" rel="tag">#<span>connecting</span></a> them is just a matter of a few details.</p>
Marián Varga<p>While I am still enjoying the last day of OCX24, I would like to invite you to the next conference I will be speaking at. This time it is online, so you have no excuse to miss it wherever you are. It can be free for you if you are quick! <a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a> <a href="https://mastodon.social/tags/rest" class="mention hashtag" rel="tag">#<span>rest</span></a> <a href="https://mastodon.social/tags/api" class="mention hashtag" rel="tag">#<span>api</span></a> <a href="https://mastodon.social/tags/integration" class="mention hashtag" rel="tag">#<span>integration</span></a></p>
Marián Varga<p>Do you know what a vendor-neutral Java runtime means? I asked Eclipse Foundation&#39;s Hendrik Ebbers to explain it to all <a href="https://mastodon.social/tags/Java" class="mention hashtag" rel="tag">#<span>Java</span></a> developers interested: <a href="https://www.youtube.com/watch?v=05vhdfzYh-I" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=05vhdfzYh-I</span><span class="invisible"></span></a></p>
Marián Varga<p>My interview about OpenRewrite (<a href="https://docs.openrewrite.org/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="">docs.openrewrite.org/</span><span class="invisible"></span></a>) with Simon Verhoeven at OCX24<br /><a href="https://www.youtube.com/watch?v=pn0DDO8eVxw" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://www.</span><span class="">youtube.com/watch?v=pn0DDO8eVxw</span><span class="invisible"></span></a> <a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a></p>
Marián Varga<p>It is very easy to start adding Kotlin to your existing Java project and use its great syntax without waiting for new Java versions: <a href="https://dastalvi.com/blog/adding-kotlin-to-java-project/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">dastalvi.com/blog/adding-kotli</span><span class="invisible">n-to-java-project/</span></a></p>
Marián Varga<p>When the structure changes and you need to make a breaking change, it will help the business people understand the cost of delaying such decisions. It will also help &quot;fail-fast&quot; and identify inconsistencies at the explicit API level instead of unexpected bugs suddenly starting to occur due to some hidden code not handling your &quot;generic&quot; structure properly.</p>
Marián Varga<p>So when the time comes to add or remove some of the fields/attributes/keys, formally it won&#39;t be a breaking change, however the logic dealing with your API&#39;s key-values, buried in your clients&#39; code will actually be broken.</p><p>Especially if the API is consumed within a company, by being explicit about the current structure defined by the business, you are being more honest with your consumers instead of faking genericity.</p>
Marián Varga<p>But there is a difference between &quot;it can be anything anytime&quot; and &quot;it is this now, but we don&#39;t know what it will be in the future&quot;. You are just transferring the burden of the lack of information from your business people to the consumers of your API. </p><p>The consumers may need to write a more complex code than necessary to parse this &quot;generic&quot; structure and even map values for hardcoded keys they are interested in into some other structures.</p>
Marián Varga<p>Note that this usually also means you use some &quot;common denominator&quot; type for the values, typically a string.</p><p>You could say you are being honest with your API consumers because you tell them the truth that they should expect any attribute to be present in such an object.</p>
Marián Varga<p>My tech instinct usually leads me to try to avoid breaking API changes and suggest a generic structure that is some variant of &quot;a list of key-value pairs&quot; so that any such changes can fit into the schema:</p><p>&quot;productParameters&quot;: [<br /> { &quot;key&quot;: &quot;weight&quot;, &quot;value&quot;: &quot;3 kg&quot; },<br /> { &quot;key&quot;: &quot;colour&quot;, &quot;value&quot;: &quot;black&quot; },<br /> { &quot;key&quot;: &quot;size&quot;, &quot;value&quot;: &quot;XL&quot; },<br /> { &quot;key&quot;: &quot;batteriesIncluded&quot;, &quot;value&quot;: &quot;false&quot; }<br />]</p>
Marián Varga<p>But at the same time they tell you there can be other attributes coming in the future and what is worse, some of the parameters may stop being used (maybe in some use cases, whatever...).</p>
Marián Varga<p>A common situation (I am facing it right now in my project) when designing an API is that you are told by business guys they need a set of fields for an entity. For example, product parameters can include these attributes:</p><p>&quot;productParameters&quot;: {<br /> &quot;weight&quot;: { value: 3, &quot;unit&quot;: &quot;kg&quot; },<br /> &quot;colour&quot;: &quot;black&quot;,<br /> &quot;size&quot;: &quot;XL&quot;,<br /> &quot;batteriesIncluded&quot;: false<br />}</p>
Marián Varga<p>Lazy to write DTOs?<br />See what can happen...<br /><a href="https://dastalvi.com/blog/lazy-to-write-dtos/" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">dastalvi.com/blog/lazy-to-writ</span><span class="invisible">e-dtos/</span></a><br /><a href="https://mastodon.social/tags/java" class="mention hashtag" rel="tag">#<span>java</span></a> <a href="https://mastodon.social/tags/spring" class="mention hashtag" rel="tag">#<span>spring</span></a> <a href="https://mastodon.social/tags/api" class="mention hashtag" rel="tag">#<span>api</span></a> <a href="https://mastodon.social/tags/rest" class="mention hashtag" rel="tag">#<span>rest</span></a></p>