MapMate - Core Library

MapMate is a modern mapping framework in the scope of mapping data in Json, XML, or YAML format into DTOs composed and vice versa.

License

License

GroupId

GroupId

com.envimate.mapmate
ArtifactId

ArtifactId

core
Last Version

Last Version

1.6.26
Release Date

Release Date

Type

Type

jar
Description

Description

MapMate - Core Library
MapMate is a modern mapping framework in the scope of mapping data in Json, XML, or YAML format into DTOs composed and vice versa.
Project Organization

Project Organization

envimate GmbH

Download core

How to add to project

<!-- https://jarcasting.com/artifacts/com.envimate.mapmate/core/ -->
<dependency>
    <groupId>com.envimate.mapmate</groupId>
    <artifactId>core</artifactId>
    <version>1.6.26</version>
</dependency>
// https://jarcasting.com/artifacts/com.envimate.mapmate/core/
implementation 'com.envimate.mapmate:core:1.6.26'
// https://jarcasting.com/artifacts/com.envimate.mapmate/core/
implementation ("com.envimate.mapmate:core:1.6.26")
'com.envimate.mapmate:core:jar:1.6.26'
<dependency org="com.envimate.mapmate" name="core" rev="1.6.26">
  <artifact name="core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.envimate.mapmate', module='core', version='1.6.26')
)
libraryDependencies += "com.envimate.mapmate" % "core" % "1.6.26"
[com.envimate.mapmate/core "1.6.26"]

Dependencies

compile (2)

Group / Artifact Type Version
io.github.classgraph : classgraph jar 4.8.53
org.junit.jupiter : junit-jupiter-engine jar 5.5.2

provided (3)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.10
com.fasterxml.jackson.core : jackson-databind jar 2.10.1
com.fasterxml.jackson.dataformat : jackson-dataformat-xml jar 2.10.1

test (8)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.5.2
com.google.inject : guice jar 4.2.2
com.google.code.gson : gson jar 2.8.6
com.fasterxml.jackson.dataformat : jackson-dataformat-yaml jar 2.10.1
org.yaml : snakeyaml jar 1.25
com.sun.mail : javax.mail jar 1.6.2
xstream : xstream jar 1.2.2
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

Maven Central CII Best Practices

MapMate

MapMate solves the problem of (de)serialization and validation of Custom Primitives and general Serializable Objects in a clean and non-invasive way. MapMate enables you to

  • Keep validation of your domain in your domain - the factory methods
  • Register your validation exceptions and report them aggregated upon deserialization
  • Stay independent of the final format of your serialization (YAML/JSON/XML/... - you control)

Rationale

Almost any modern application nowadays is dealing with mapping incoming requests to a subset of Domain Objects and outputting the resulting subset of Domain Objects to a specific format (be that json, yaml, xml, ...).

As a result, we keep writing the "same" code over and over again. We

  • parse the Strings into Domain Objects,
  • we validate those upon initialization,
  • we process the requests and
  • we do the mapping again to output a certain Response.

While there are numerous frameworks that help you on some of the stages of this process, we believe there is a need for a simple, non-invasive library that would allow you to integrate this process into your application seamlessly and concentrate on your Business logic.

For an introduction article checkout envimate blog where we build a small example application and explain the usage of Custom Primitives and Data Transfer Objects.

Highlighted features

Some features MapMate offers:

  • No Magic - MapMate is using your Objects the same way you would use them, which means:

    • MapMate will not
      • read nor write private fields
      • write values into final fields
      • invoke private methods
    • MapMate will not generate dynamic proxies
    • MapMate does not favour the use of annotations
  • Support for validating your domain

    • MapMate allows you to check for validation exceptions and aggregates them accordingly.
    • You will know precisely which field of which domain was faulty.
    • MapMate also offers ways of detecting redundant validation exceptions.
  • Non-intrusive usage and configuration

    • MapMate instance can be configured in a single place and offers detection of Custom Primitives and Serialized Objects without the use of annotations.
    • As mentioned above, MapMate creates and validates your Objects the way you would; hence you don't need to change anything in your domain when using MapMate. Since automatic configuration always requires conventions, MapMate allows you to follow your conventions, instead of the ones it's coders came up with.
    • That means your domain stays free of dependencies(direct or conventional) to the (de)serialization and validation frameworks.
  • Highly customizable

    • MapMate is highly configurable, allowing configuration for
      • whitelisting and blacklisting packages and/or classes(or even disable the whole classpath scanning and configure objects one-by-one)
      • the detection mechanism of Custom Primitives and Serialized Objects
      • manual definition of Custom Primitives and Serialized Objects
      • customizing the Validation Errors

Resources

Check out these resources, and let us know if you don't find the information you are looking for, we'll be happy to address that.

Also, take a look into these articles to get an idea of why we created MapMate in the first place:

Contributing

General Contribution Guidelines

MapMate is quite young, and the best contribution is using it and giving us feedback.

Open issues, or drop an email to [email protected], let us know how you use it and which features you would like to see.

com.envimate.mapmate

envimate

Versions

Version
1.6.26
1.6.23
1.6.22
1.6.21
1.6.20
1.6.19
1.6.18
1.6.17
1.6.15
1.6.14
1.6.13
1.6.10
1.6.9