Chimney
MapStruct
Our great sponsors
Chimney | MapStruct | |
---|---|---|
13 | 23 | |
1,090 | 6,752 | |
1.8% | 1.3% | |
9.6 | 7.8 | |
3 days ago | 3 days ago | |
Scala | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Chimney
-
Chimney 0.7.0 released
Hello, if you have some nice examples could you please check if it's something that would fit any of issues planned for 0.7.1 or create a new one?
-
Smithy4s 0.15.0, now with Smithy 2.0 support
Thankfully, there are some solutions that can help reduce the boilerplate of these manual conversions. For instance, chimney : https://scalalandio.github.io/chimney/
-
Is it possible to get runnable generated scala code from a macro (chminey to be specific)?
I want to upgrade one project to Scala 3.1, but I'm using the macro heavy chimney (https://github.com/scalalandio/chimney) to reduce the boilerplate, which is not available for Scala 3 yet. My idea was to copy and paste the code that chimney generates on 2.13, and after that uncomment the uses of chimney for now.
-
From ES6 to Scala: Basics
In my $dayjob we originally used Scala, but I pushed for a couple of new services to be written in TypeScript/Node as it was really hard to hire Scala developers. I'd say it worked well, we even took a somewhat functional approach to building things. We tried fp-ts but that was a bit hardcore (when you are trying to hire TypeScript developers who don't know functional programming), so just built Either and Option types which provided 99% of what we needed.
There are still a few things I miss though:
* Pattern matching and exhaustive checking. Using a switch statement it is possible to define a function that can emulate the compile-time exhaustive checking, but it's still rather weak compared to what you can do in Scala.
* Implicits. Being able to define something that can convert say a UUID to a String or vice versa automatically just feels like magic, especially when dealing with data from third party systems.
* Compiler macros and metaprogramming. It enables tools like Chimney (https://scalalandio.github.io/chimney/) to be built, which I don't think are possible with TypeScript right now.
-
Ideas for a Scala 3 MapStruct library?
Hi! Are you aware of https://github.com/scalalandio/chimney? I think that's what you are trying to do. Sorry if I misunderstand your message.
MapStruct
-
Feedback on a new annotation processor api
Done right i can look something like mapstruct for example. But like any other feature you need to get a feeling for when it's a good idea to use it.
-
must known frameworks/libs/tech, every senior java developer must know(?)
You all beat me to MapStruct and Testcontainers. Honorable mention to RxJava, which I use in Desktop apps.
- Ask HN: What are your “scratch own itch” projects?
-
We released a new version of ShapeShift (0.6.0) - A lightweight, modular, performant and extensible object mapping library
Just use MapStruct...
-
We released a new version of ShapeShift (0.4.0) - A lightweight Kotlin first library for Object Mapping. Would love to hear your thoughts!
Object mapping is not a new concept. Java libraries like mapstruct (https://github.com/mapstruct/mapstruct), dozer (https://github.com/DozerMapper/dozer) and modelmapper (https://github.com/modelmapper/modelmapper) have been doing it for a long time with a large crowd of developers behind them. We just brought it to Kotlin and improved it where we found the need.
-
Spring Warehouse - A quest to learn more Java and Spring boot
Also, don't expose your entities, it's insecure, use a pojo and map the classes in your services, use mapstruct to avoid creating the mapper by hand all the time (https://mapstruct.org/)
-
Source generators and a boilerplate code
During my work on different cloud-native applications with a various tech stacks I’ve paid attention to Java’s widely used mapping library MapStruct, where developers define mappings using Java annotations (in C# attributes). The SourceMapper package uses Source Generators and generates objects mappings based on C# attributes actually during coding. Of course, there is widely used .NET Mapper library AutoMapper, but the main difference between tham, that developer can see (and control) mappings in generated code. The package can be installed using Nuget Package Manager:
-
Do you use code generators in your IDEs or some external ones? If so, which ones?
MapStruct and OpenAPI/Swagger
-
Ideas for a Scala 3 MapStruct library?
When building REST services, mapping Entity Models (EM) to Data Transfer Objects (DTOs) has been an annoying problem in Java. Libs like MapStruct exist for this, but it still feels like an hack.
-
Now that records are official, hoping for expanded support from popular libraries and frameworks
MapStruct supports Records so in theory you can just map to/from whatever it is that can't handle records as another POJO. Besides I most of the time recommend mapping hibernate entities do DTOs anyway.
What are some alternatives?
ModelMapper - Intelligent object mapping
JMapper Framework - Elegance, high performance and robustness all in one java bean mapper
Orika - Simpler, better and faster Java bean mapping framework
Dozer - Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another.
Selma - Selma Java bean mapping that compiles
record-builder - Record builder generator for Java records
Jackson JSON Processor - Main Portal page for the Jackson project
Beanmapper - Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention
Hibernate - Hibernate's core Object/Relational Mapping functionality
Shapeless - Generic programming for Scala
Monocle - Optics library for Scala
jackson-databind - General data-binding package for Jackson (2.x): works on streaming API (core) implementation(s)