Giter Club home page Giter Club logo

klutter's Introduction

Kotlin Maven Version CircleCI branch Issues DUB Kotlin Slack

klutter

Random small libraries, usually extensions making other libraries happier.

Please send contributions, fork the repo, issue a pull request and write a comment in the pull request granting the rights for the code to be used in Klutter.

Maven Dependency

Each module has its own set of dependencies. There is a main dependency which is always the most current JDK version of the module, and also a version suffixed by the JDK version for which it is compatible (that version or newer). Include the dependency in your Gradle / Maven projects, ones that already have Kotlin configured.

For example, for the whole package (one of klutter-all (lastest JDK), klutter-all-jdk6, klutter-all-jdk7, or klutter-all-jdk8) and using an open-ended dependency number while Klutter is in early active development:

Gradle:

compile "uy.klutter:klutter-all:1.15.+"

Maven:

<dependency>
    <groupId>uy.klutter</groupId>
    <artifactId>klutter-all</artifactId>
    <version>[1.15.0,1.16.0)</version>
</dependency>

See all modules and current versions on Maven Central search (or the raw repo)

Modules

     Maven‑Artifact      Size Topic Injekt
aws-s3 tiny Amazon AWS SDK S3 helper extensions Yes
aws-core tiny Amazon AWS SDK helper extensions No
config-typesafe medium Typesafe Config easier loader and access to configuration No
core small Core extension methods on strings, numbers, dates, URI Builder, better URL Encoding/Decoding No
db-jdbi-v2 small Adds Kotlin parameter binding and RestulSet mapping to JDBI versions 2.x No
db-jdbi-v3 small Adds Kotlin parameter binding and RestulSet mapping to JDBI versions 3.x No
elasticsearch medium Extensions to ElasticSearch client library No
json-jackson tiny Jackson JSON Data Binding extensions + loading of Kotlin module Yes
netflix-graph medium In memory graph building and compression/serialization. A wrapper adding schema, ordinal tracking, serialization with ordinals, and is much easier to use API No
vertx3 medium Vert.x-3 helpers and integration with Kovenant Promises Yes

Modules marked with "yes" for Injekt, are modules that have intergration with Kohesive/Injekt and provide prebuild injectable modules that you can easily import providing factories or singletons for dependency injection. Using an Injekt module looks something like:

class MyApp {
    companion object : InjektMain() {
        // my app starts here with a static main()
        platformStatic public fun main(args: Array<String>) {
            MyApp().run()
        }

        // the Injekt system will call me back here on a method I override.  And all my functions for registration are
        // easy to find on the receiver class
        override fun InjektRegistrar.registerInjectables() {
            // add my singletons, factories, keyed factories, per-thread factories, ...
            ...
 
            // import prebuilt Injekt modules
            importModule(AmazonS3Injektables)  
            importModule(JacksonWithKotlinAndJdk8Injektables)
        }
    }

    ...
    // later, use them in properties in any class
    val s3: AmazonS3Client by Delegates.injectLazy()
    // or use them anywhere in code
    val myObject: CoolObject = Inject.get<ObjectMapper>().readValue(jsonString)
    // or another form of the same
    val mapper: ObjectMapper = Inject.get()
    // or within constructor or method definitions as default values
    public fun doSomethingWithS3(s3: AmazonS3Client = Inject.get()) { ... }
}

Some of these modules are "tiny" and may not be overly useful yet, but they carry no extra weight, only have required dependencies and can be expanded over time by anyone that wants to send pull requests. Submitted modules or changes to existing module consist of things not conflicting with Kotlin runtime libraries, and things useful to most Kotlin developers.

Recommended libraries:

Other libraries that we recommend a building blocks for Kotlin applications:

  • Injekt - Injekt is a crazyily easy Dependency Injection for Kotlin.
  • Kovenant - promises for Kotlin, easy, fun, and async! (JVM / Android)
  • Kovert - invisible REST framework for Kotlin + Vert.x

With help from...

Collokia Logo

klutter's People

Contributors

apatrida avatar brainoutsource avatar

Watchers

Naveen avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.