Nar (eng. pomegranate) because I never manage to consume these as a whole...
Nar is a design pattern for working with partially initialized objects. Think GraphQL, but much smaller in scope and at the same time more versatile. Although this repository represents a Java library, there is nothing Java-specific in Nar and it can be easily ported to any language that supports concepts like enums, sets and interfaces with default methods (or any similar concept). Also, it's GWT compatible, so it can be used on both backend and frontend.
See official website for more details.
Core Nar interfaces and some generic implementations.
<dependency>
<groupId>com.steatoda.nar</groupId>
<artifactId>nar-core</artifactId>
<version>1.0.0</version>
</dependency>
Useful utils for (de)serializing Nar objects to/from JSON using Jackson.
<dependency>
<groupId>com.steatoda.nar</groupId>
<artifactId>nar-jackson</artifactId>
<version>1.0.0</version>
</dependency>
Base implementations of NarService
and NarCRUDService
backed by relational database using
jOOQ.
<dependency>
<groupId>com.steatoda.nar</groupId>
<artifactId>nar-jooq</artifactId>
<version>1.0.0</version>
</dependency>
Run demo with:
./gradlew :nar-demo:run --console=plain
Java 11 is required on path or in JAVA_HOME.