Reader small image

You're reading from  Get Your Hands Dirty on Clean Architecture - Second Edition

Product typeBook
Published inJul 2023
PublisherPackt
ISBN-139781805128373
Edition2nd Edition
Right arrow
Author (1)
Tom Hombergs
Tom Hombergs
author image
Tom Hombergs

Tom Hombergs is a software engineer by profession and by passion with more than a decade of experience working on many different software projects for many different clients across various industries. In software projects, he takes on the roles of software developer, architect, and coach, with a focus on the Java ecosystem. He has found that writing is the best way to learn, so he likes to dive deep into topics he encounters in his software projects to create texts that give structure to the chaotic world of software development. He regularly writes about software development on his blog and is an occasional speaker at conferences.
Read more about Tom Hombergs

Right arrow

When to use which mapping strategy?

This is the million-dollar question, isn’t it?

The answer is the usual, dissatisfying it depends.

Since each mapping strategy has different advantages and disadvantages, we should resist the urge to define a single strategy as a hard-and-fast global rule for the whole code base. This goes against our instincts, as it feels untidy to mix patterns within the same code base. But knowingly choosing a pattern that is not the best pattern for a certain job, just to serve our sense of tidiness, is irresponsible, plain and simple.

Also, as software evolves over time, the strategy that was the best for the job yesterday might not still be the best for the job today. Instead of starting with a fixed mapping strategy and keeping it over time – no matter what – we might start with a simple strategy that allows us to quickly evolve the code and later move to a more complex one that helps us to better decouple the layers.

In order...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Get Your Hands Dirty on Clean Architecture - Second Edition
Published in: Jul 2023Publisher: PacktISBN-13: 9781805128373

Author (1)

author image
Tom Hombergs

Tom Hombergs is a software engineer by profession and by passion with more than a decade of experience working on many different software projects for many different clients across various industries. In software projects, he takes on the roles of software developer, architect, and coach, with a focus on the Java ecosystem. He has found that writing is the best way to learn, so he likes to dive deep into topics he encounters in his software projects to create texts that give structure to the chaotic world of software development. He regularly writes about software development on his blog and is an occasional speaker at conferences.
Read more about Tom Hombergs