Code Monkey home page Code Monkey logo

doodle's Introduction

doodle

A pure Kotlin, UI framework

Kotlin 1.7.21 License: MIT Chat: on slack

Single Language

Doodle is written entirely in Kotlin and so are its apps. Doodle Web Applications do not use HTML, CSS styles or Javascript libraries. In fact, apps are not aware of the Browser (or Browser concepts) at all, and can be written entirely as common (cross-platform) code in multi-platform setups.

Multiple Platforms

Doodle supports both JS (Browser) and JVM (alpha) targets; so common code apps are able to run in the Browser and Desktop (with other platforms planned) without modification. This means you write widgets once and use them on either platform. The only difference is how apps are launched on each platform.

Expressive

Creating expressive, intuitive apps is natural with Doodle. It makes complex rendering easy with powerful, vector-oriented rendering, provides fully customizable layouts and simplifies pointer and keyboard handling.

Simply define your View hierarchy and business logic, then go.

Vector Oriented

It is easy to build beautifully detailed UIs with Doodle. All rendering in Doodle is vector-oriented; so ellipses, paths, lines, gradients, affine transforms etc. are as simple to use as images and rectangles.

Precise

Doodle gives you control over all aspects of the UI presentation, including pixel-level positioning, making it easier to precisely control rendering.

Modular

Doodle has several libraries and a collection of modules. This allows selective adoption of various features and helps with bundle size. Apps written with Doodle are also dependency-injected; and there are no global objects or state to make mocking challenging.

Hello World

import io.nacular.doodle.application.Application
import io.nacular.doodle.application.application
import io.nacular.doodle.core.Display
import io.nacular.doodle.core.plusAssign
import io.nacular.doodle.core.view
import io.nacular.doodle.drawing.Color.Companion.Black
import io.nacular.doodle.drawing.text
import org.kodein.di.instance

class HelloWorld(display: Display): Application {
    init {
        display += view {
            size   = display.size
            render = {
                text("Hello, world!", color = Black)
            }
        }
    }

    override fun shutdown() {}
}

fun main() {
    application {
        HelloWorld(display = instance())
    }
}

Documentation

Check out the documentation site for more details and examples.

Tutorials

You can find helpful tutorials as doodle-tutorials.

Feedback

Doodle is still under active development, so there are going to be gaps and bugs. Please report issues, and submit feature requests.

You can also join the discussion on the #doodle Kotlin Slack channel.

doodle's People

Contributors

bodiam avatar drzoddiak avatar hiperbou avatar jacoobes avatar pusolito 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.