GithubHelp home page GithubHelp logo

peekandpoke / kraft Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 37.45 MB

KRAFT = Kotlin Rapid App Framework & Toolkit. Build single page apps in Kotlin based on Preact.

Kotlin 99.73% JavaScript 0.27%

kraft's Introduction

                                                             
                          _/    _/  _/_/_/      _/_/    _/_/_/_/  _/_/_/_/_/   
                         _/  _/    _/    _/  _/    _/  _/            _/        
                        _/_/      _/_/_/    _/_/_/_/  _/_/_/        _/         
                       _/  _/    _/    _/  _/    _/  _/            _/          
                      _/    _/  _/    _/  _/    _/  _/            _/           
                                                             

Kotlin CodeFactor Maven Central Snapshot

K.R.A.F.T. = Kotlin Rapid App Framework & Toolkit

Build single page apps with pure Kotlin.

Kraft bridges the gap between Kotlin code and the DOM by using Javascript VDom-engines like the very light-weight Preact.

It uses kotlinx/html for markup-rendering, so no template engine is needed.

It comes with a handy DSL for the FomanticUI Css Framework.

Check out the examples

Hello-World example

Try it out | See the code | Or run it locally

./gradlew -t --parallel :examples:hello-world:run

SemanticUi / FomanticUi examples

Writing beautiful web-apps without a css framework is very hard. Kraft comes with a handy DSL from the FomanticUI Css Framework.

Check out the examples, with lots of example code waiting to be copied and pasted.

Try it out | See the code | Or run it locally

./gradlew -t --parallel :examples:fomanticui:run

Addon examples

The addon examples show the usage of other Javascript libraries within a Kraft-App.

Try it out | See the code | Or run it locally

./gradlew -t --parallel :examples:addons:run

Example projects / repos

Hello World Demo
A minimal project.

Router Demo
A minimal example of how to write an app with multiple pages.

Remote Demo
An example project that shows how to consume rest apis and display the results.

Motivations for this project

Why Kraft ?

Why Kraft when there already is KotlinJS/React?

This project takes a different approach. It does not try to wrap around React. Instead, it uses very light weight VDom-engines like Preact.

This reduces the Javascript dependencies to a minimum. In fact, Preact has zero dependencies of its own! This makes the whole project much more stable in the long run.

Why FomanticUI ?

This project currently focuses on FomanticUI (previously SemanticUI) as a css framework. FomanticUI / SemanticUI uses a very "semantic" approach to writing styled markup. And as it turns out, this perfectly maps to a Kotlin DSL:

ui.segment {
    ui.button {
        +"Click me"
    }
}

Working with kotlinx/html happily removes the necessity for a template engine! Great!
Kraft::Fomantic adds another typesafe and IDE-assisted layer on top of that. Sweet!

kraft's People

Contributors

peekandpoke avatar alinamaliarenko avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.