Java Bean Mapping

Open-source Java projects categorized as Bean Mapping

Top 9 Java Bean Mapping Projects

  • MapStruct

    An annotation processor for generating type-safe bean mappers

  • Project mention: Is .NET just miles ahead or am I delusional? | news.ycombinator.com | 2024-04-13

    Currently using .NET and ASP.NET for the API of a project that I'm working on, overall it's a pretty lovely experience, especially with the JetBrains Rider as my IDE. Having worked with Java in the enterprise in the past, it feels like a more focused and sometimes more coherent experience (vs the more decentralized nature of Java), that now thankfully runs fine on Linux as well, don't even need to hope that Mono is good enough anymore.

    Entity Framework Core is great, the way how they fetch related data is straightforwards: https://learn.microsoft.com/en-us/ef/core/querying/related-d...

    I also really like the ability to use split queries, when needed: https://learn.microsoft.com/en-us/ef/core/querying/single-sp...

    You can even scaffold your entity mappings from an existing database and manage database migrations separately (which I feel is a must unless you want to pour hours upon hours into learning yet another JPA-like), it's nice when something like that exists in a given ecosystem: https://blog.jetbrains.com/dotnet/2022/01/31/entity-framewor...

    Some of the stuff in the ecosystem is also really nice, like using ActionBlocks from Dataflow for simple queues and task scheduling is very easy to get started with and pretty pleasant: https://learn.microsoft.com/en-us/dotnet/api/system.threadin...

    Honestly, most of the docs that I've come across are rather pleasant and there's plenty of code examples to be had and even LLMs have enough codebases out there to be trained on and give decent output, in addition to the regular autocomplete in the IDE.

    Even some third party stuff like CsvHelper is really well put together: https://joshclose.github.io/CsvHelper/getting-started/#insta...

    That said, I've had issues where trying to deserialize incoming JSON requests ([FromBody]) lead to the whole object being null, due to it not matching the fields 1:1 or violating some nullability constraint, however that happened without a clear error message or as much as a warning in the logs, which felt insane and wasn't very discoverable. Now I just use JObject as the parameter and deserialize at the top of the controller method.

    I've also run into some ecosystem issues where the OpenAPI codegen was a bit lacking and wouldn't actually generate code that works, but maybe that's because the spec was bad: https://openapi-generator.tech/docs/generators/csharp

    I could also not get AutoMapper (https://docs.automapper.org/en/stable/index.html) working satisfactorily, so for now I'm stuck writing mappers by hand with said autocomplete sometimes doing it for me. There were issues with the runtime being unable to register the mappers or something like that, it was a while ago. Overall it felt like the MapStruct library in Java did everything better: https://mapstruct.org/

    On the other hand, I haven't had any of the Spring Boot DI related headaches (needing @Lazy sometimes) with ASP.NET, things there seem way more straightforwards and you clearly define whether something should be a Singleton or Scoped and the rest... just gets out of your way and works.

    Sadly, there have been very hard to track down cases where I try to do a _dbContext.Add(someEntity) and then when I do a save with just the fields in that one entity changed, the performance absolutely seems to slow down to a crawl. Adding _dbContext.ChangeTracker.AutoDetectChangesEnabled = false seemed to help, but I am still not entirely sure what lead to that behavior, the temp directory on my Linux box also started filling up very rapidly, yet the logs had nothing of use, definitely seems like something I'd need to investigate properly.

    Overall, .NET and its ecosystem is pretty good in most cases. And .NET being used in gamedev is also cool, for those who care about that sort of thing, I wonder why jMonkeyEngine never really took off.

  • ModelMapper

    Intelligent object mapping

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Dozer

    Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. (by DozerMapper)

  • Orika

    Simpler, better and faster Java bean mapping framework

  • JMapper Framework

    Elegance, high performance and robustness all in one java bean mapper

  • Selma

    Selma Java bean mapping that compiles

  • reMap

    A declarative mapping library to simplify testable object mappings.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • dOOv

    dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

  • Beanmapper

    Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2024-04-13.

Java Bean Mapping related posts

Index

What are some of the best open-source Bean Mapping projects in Java? This list will help you:

Project Stars
1 MapStruct 6,785
2 ModelMapper 2,225
3 Dozer 2,057
4 Orika 1,286
5 JMapper Framework 221
6 Selma 210
7 reMap 116
8 dOOv 85
9 Beanmapper 27
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com