Skip to content

Commit

Permalink
Add Whac-A-Mole reference
Browse files Browse the repository at this point in the history
  • Loading branch information
ploeh committed Dec 11, 2023
1 parent c4591a0 commit b89a5e0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h3 id="ddac03fba5134f0da9e613c29888ce83">
language pragma and then tell the compiler to automatically derive <code>Generic</code> for the DTO in question. You'll see an example of that shortly.
</p>
<p>
It's a fairly flexible system that you can tweak in various ways, but if it's possible to do it directly with the above <code>Table</code> type, please leave a comment explaining how. I tried, but couldn't make it work. To be clear, I <em>could</em> make it serializable, but not to the above JSON format.
It's a fairly flexible system that you can tweak in various ways, but if it's possible to do it directly with the above <code>Table</code> type, please leave a comment explaining how. I tried, but couldn't make it work. To be clear, I <em>could</em> make it serializable, but not to the above JSON format. <ins datetime="2023-12-11T11:06Z">After enough <a href="/2023/10/02/dependency-whac-a-mole">Aeson Whac-A-Mole</a> I decided to change tactics.</ins>
</p>
<p>
In <a href="/2021/06/14/new-book-code-that-fits-in-your-head">Code That Fits in Your Head</a> I explain how you're usually better off separating the role of serialization from the role of Domain Model. The way to do that is exactly by defining a DTO for serialisation, and let the Domain Model remain exclusively to model the rules of the application. The above <code>Table</code> type plays the latter role, so we need new DTO types.
Expand Down

0 comments on commit b89a5e0

Please sign in to comment.