Kor Repositories Module


License

License

Apache-2.0
GroupId

GroupId

com.sefford
ArtifactId

ArtifactId

kor-repositories
Last Version

Last Version

4.3.2
Release Date

Release Date

Type

Type

jar
Description

Description

Kor Repositories Module
Kor Repositories Module
Project URL

Project URL

https://github.com/Sefford/kor
Source Code Management

Source Code Management

https://github.com/Sefford/kor

Download kor-repositories

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.2.60
com.sefford : commons jar 1.1.0
io.arrow-kt : arrow-core jar 0.7.3
io.arrow-kt : arrow-data jar 0.7.3

test (6)

Group / Artifact Type Version
kor » kor-test-utils jar unspecified
com.google.code.gson : gson jar 2.8.2
junit : junit jar 4.12
org.mockito : mockito-core jar 2.17.0
org.hamcrest : hamcrest-core jar 1.3
com.nhaarman : mockito-kotlin jar 1.5.0

Project Modules

There are no modules declared in this project.

Build Status Kotlin version badge License codecov

Kor

A Clean Architecture Implementation core library.

What is Kor?

Kor is the skeleton of a clean-ish architecture implementation. There are many ways of implementing a clean architecture:

  • Ports and adapters
  • Hexagonal Architecture
  • VIPER Architecture

The aim of Kor is to provide a fast implementation of a proper architecture where the developer can iterate quickly and and with the ability to use good practices as SOLID and TDD from day 0.

Kor is not meant to be a canonical implementation of such architecture, but a personal interpretation of how it should be.

Basic Setup

Make sure to have the latest version of JDK 1.8 installed.

Add the dependencies into the project's build.gradle

dependencies {
    compile 'com.sefford:kor-usecases:4.3.2'
    compile 'com.sefford:kor-repositories:4.3.2'
    compile 'com.sefford:kor-repositories-extensions:4.3.2' // optional 
    compile 'com.sefford:kor-repositories-gson-converter:4.3.2' 
    compile 'com.sefford:kor-repositories-moshi-converter:4.3.2'
}

How is Kor structured?

Read more particular documentation in any of the modules that Kor provides

Migrating to 4.0.0

Many breaking changes were done in 4.0.0, mostly related to how the core works.

  • Now all Kor is separated in individual modules
  • All old Interactor system got deprecated. All delegates must be chopped and separated on each phase.
  • Now Use cases can return Either<Error,Response>. If you use the Postable-compatible method, your Postable will keep receiving these separated response.
  • Save and Get Repository methods will receive an Either<RepositoryError, V> response instead of a null; so the receiving class can have a little information of what went wrong.
  • In order to ease the long signatures and known problems with the error log grouping, you will need to log manually each of the errors.

Interesting literature

Martin, Robert Cecil: The Clean Architecture

Cockburn, Alistair: Hexagonal Architecture

VIPER Architecture

License

Copyright 2014 Sefford.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
4.3.2
4.3.1
4.3.0
4.2.3
4.2.1
4.2.0
4.1.0
4.0.1
4.0.0