Skip to content

slim-gears/slimrepo

Repository files navigation

Slim Repo

Build Status Maven Repository License Android Arsenal Join the chat at https://gitter.im/slim-gears/slimrepo

Light-weight modular ORM for Java and Android

The library was inspired by GreenDAO and Microsoft Entity Framework Code First

Slim Repo is intended to completely decouple data persistence logic in your application from the underlying storage. CRUD operations performed using simple, readable, intuitive and type safe syntax. Because of Slim Repo's modular design, it's possible to add any other SQL, NoSQL or In-memory storage support, without changing the user code.

Features (design goals)

  • Ease of use - intuitive, type-safe and highly readable syntax
  • Performance - annotation processing based, fast, no reflection usage in run-time, proguard-friendly
  • Bulk operations support - Bulk update and bulk delete are supported
  • Light-weight - simple and has a low package footprint
  • Modularity - Underlying storage providers (e.g. SQLite) are extensions. Other SQL or NoSQL storage providers can be used without changing the user code

Gradle configuration for Android project

Step 1. Enable annotation processing for your project (if not enabled yet)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

apply plugin: 'com.neenbedankt.android-apt'

configurations {
    apt
}

Step 2. Add jCenter repository (if not added yet)

repositories {
	jcenter()
}

Step 3. Add dependencies

dependencies {
    compile 'com.slimgears.slimrepo:slimrepo-android:0.9.0'
    apt 'com.slimgears.slimrepo:slimrepo-apt:0.9.0'
}

Usage

Architecture

Layer diagram

License

This project is distributed under Apache License, Version 2.0