Skip to content
/ nar Public

Java library for working with partially initialized objects

License

Notifications You must be signed in to change notification settings

gkresic/nar

Repository files navigation

Nar

GitHub Actions status badge License badge

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.

Components

Nar Core

Core Nar interfaces and some generic implementations.

<dependency>
	<groupId>com.steatoda.nar</groupId>
	<artifactId>nar-core</artifactId>
	<version>1.0.0</version>
</dependency>

Nar Jackson

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>

Nar jOOQ

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>

Demo

Run demo with:

./gradlew :nar-demo:run --console=plain

Java 11 is required on path or in JAVA_HOME.

About

Java library for working with partially initialized objects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages