Skip to content
0:00 / 0:00

#chimney#scala#macros

Data Juggling - Part 1 - Getting Started with #Chimney

DevInsideYou

13K subscribers • 51 videos on Hallway

YouTube

Beginner. No background in the topic needed.

3K views6 years ago2 recommendations

Programming languagesSoftware designScalaDesign patterns

How to use the Chimney library in Scala for boilerplate-free, compile-time safe data transformations between case classes.

In this video we are going to play around with Chimney - a Scala library for boilerplate-free data transformations. It uses macros behind the scenes and therefore reports all errors at compile time. Chimney website: scalalandio.github.io/chimney/ My .dotfiles: github.com/agilesteel/.dotfiles This video is part of the following playlist: youtube.com/playlist?list=PLJGDHERh23x9Wzcbc7j9ZDl03tKQF5QDN Table of Contents Introduction SBT project setup Chimney tutorial Larger example Limitations Validation with Cats Use chimney for Isomorphisms Website: devinsideyou.com Patreon: patreon.devinsideyou.com Discord: discord.devinsideyou.com Telegram: telegram.devinsideyou.com Twitter: twitter.devinsideyou.com GitHub: github.devinsideyou.com LBRY: lbry.devinsideyou.com Install scripts: install.devinsideyou.com Giter8 templates: g8.devinsideyou.com Spotify concentration playlist: code.radio.devinsideyou.com Cheers and Happy Coding! #Scala #tutorial

Why it's here

2 people recommend this

What people say. Recommended as a great tutorial for using Chimney to map between case classes and handle data transformations cleanly in Scala.

u/agilesteelin r/scala • Recommends

Data Juggling - Part 1 - Getting Started with Chimney

u/elastiknnin r/scala • Recommends

On “Ideas for a Scala 3 MapStruct library?”

\+1 for Chimney for this type of problem. There's a good tutorial here: [video Chimney will map between case classes with elegant ways to handle renamed fields, computed fields, and static fields. I've used it successfully for mapping from database row representations to DTOs to external response structures. No reflect (it's using macros), and the compiler errors are generally very helpful.