This project presents a several examples of the database layer realization of a RESTful
service. Each module presents a small simple instance of the different ORM Pattern
realizations.
This is a collection of small and focused instances - each covering a single and well defined approach in the area of the java application development grouped by modules. Each module is supposed to provide a separate simple instance.
In this project each module presents a small simple instance of the database layer realization of a RESTful
service.
A strong focus of these is, of course, the different ORM Pattern
realizations.
This project includes the follows modules:
- active-jdbc - is a simple realization of the
Active Records Pattern
viaActiveJDBC
implementation in thespring-boot
application; - hibernate-jpa - is a simple realization of the
Data Mappting Pattern
viaSpring Data JPA
andHibernate
implementation in thespring-boot
application. - hibernate-jdbc-template - is a simple realization of the
Data Mappting Pattern
viaJdbcTemplate
andHibernate
implementation in thespring-boot
application.
- The simple examples of the different
ORM Pattern
realizations.
- For more information on a releases, a features and a changes, please read the changelog notes.
These instructions allow to get a copy of this project and run it on a local machine.
Before using it, make sure that follows software are installed on the local machine:
- Oracle JDK 8+ - java development kit;
- Maven 3+ - dependency management;
- Docker Compose - tool for defining and running multi-container
Docker
applications.
If any of the listed software is not installed, then it can be installed by instruction as described below.
-
- Install Oracle JDK 8+ according to instructions from an official instruction.
-
- Install Maven 3+ according to instructions from an official source.
-
- Install PostgreSQL 9+ according to instructions from an official source.
In order to install it is quite simple to clone or download this repository.
For the cloning this repository to a local machine, just use the follows link:
https://github.com/ololx/orm-patterns-instances
To use it is necessary to:
1 - Build the project.
2 - Launch the instances.
3 - Instrument if (for the active-jdbc
module).
To do the full build, execute maven goal install
in the root directory by the following command:
mvn clean install
To do the full build, execute maven goal install
in the module directory by the following command:
mvn clean install
To do the run examples, execute maven goal spring-boot:run
in the module directory by the following command:
mvn spring-boot:run
This is a multi-module project. Each model is supposed to provide a separate example. That's why when you're working with an individual module, there's no need to import all of them (or build all of them) - you can simply import that particular module in either Eclipse, NetBeanse or IntelliJ IDEA and run each example in IDE.
The module active-jdbc
must be instrumented before launching via maven instrumentation plugin
- Oracle JDK - java development kit;
- Maven - dependency management;
- PostgreSQL 9+ - database management system;
- Docker Compose - tool for defining and running multi-container
Docker
applications.
- Alexander A. Kropotin - project work - ololx.
This project is licensed under the MIT license - see the lisence document for details.