A Kotlin framework for building web applications in Javascript.

Related tags

Kotlin yested
Overview

Yested

Yested is a Kotlin framework for building single-page web applications in Javascript.

Important

This project is no longer maintained. Please check: https://github.com/jean79/yested_fw

Project and Demo page

Demo page: demo.yested.net

Demo page is whole written in Yested framework.

Main features

  • Strongly typed development of Web applications
  • Minimalistic code
  • DSL for layout construction
  • Debugging within browser
  • Component style of development
  • Simple re-use of 3rd party Javascript libraries
  • Simple creation and re-use of custom components
  • Built-in support for Twitter Bootstrap for a quick start

Status

Under the development, API can change. Feedback and contributions welcome.

Author

Jan Kovar ([email protected])

Comments
  • Upgrade to Kotlin 1.1.2

    Upgrade to Kotlin 1.1.2

    I'm thinking of using Yested in a toy project, so I had a go at upgrading to the latest Kotlin, 1.1.2.

    For now I've made the minimum changes needed to get the demo site to work for me. I may make a sub-branch with "tidy-up" changes suggested by IntelliJ, including switching to using JQuery derived with ts2kt from DefinitelyTyped.

    opened by HughG 13
  • Enhancing HTML Component design

    Enhancing HTML Component design

    This is the idea behind class hierarchy - feel free to comment, we can change it:
    Component trait just provide HTMLElement
    ParentComponent provides some useful protected methods for manipulating element (add/remove child, attributes setting)
    Content of HTML element is created by the Component code, not by the user of the component (TextInput, Grid, ...)
    HTMLParentComponent
    inner content of the html element can be created by DSL
    example: div, span, ...
    

    So If I undestand well, ParentComponents are the components which for we don't want to allow the user to add any kind of child elements explicitly. So for example the Grid: It is a table with many child elements, but these elements are added and controlled by the Grid itself, not the user of Grid, so she can't do like this:

    Grid {...
       div {...} // It is prohibited for 'ParentComponents'
    }
    

    I think then that the name 'ParentComponent' is misleading. In my opinion, we need only two base classes:

    • abstract Component class with the protected helper methods of ParentComponent. The classes that now are inherited from ParentComponent, would be the child of this Component. These child classes can control which elements can a user add to themselves.
    • HTMLParentComponent, but with an another name, e.g. "ComponentContainer", which for the user can freely add any elements (div, ul, etc.)
    Can you use 4 spaces as indent?
    

    Of course.

    Was thinking about adding id and class as optional parameters to all HTML DSL functions, namely HTMLParentComponent.div an .span.
    So that instead of 
    div {
    id = "bla"
    ul { }
    }
    we can write 
    div(id="bla") {
    ul { }
    }
    

    I think it is a good Idead, but the default value should be an empty string.

    enhancement 
    opened by bbodi 5
  • Make table scrollable

    Make table scrollable

    Allow user to set max height of a whole table and have a scrollbar for tbody only.

    It is possible to have div with scrollbar: div { "style".."overflow-y: scroll; max-height: 300px" +grid } but this does not make header fix.

    Unfortunately it is not possible to set this value for tbody. When I encapsulate tbody within such div as above, it causes that columns width of tbody are different than widths of header columns.

    Anybody have some idea? Should we implement some 3rd party grid javascript library?

    opened by jean79 2
  • Problem with button handler if there is some text after it

    Problem with button handler if there is some text after it

    Sample code:

    div {
      btsButton(label = {+"click me"}) { //this handler is not called if button is clicked}
      +"This line causes that handler doesn't work"
    }
    

    somehow it is caused by element.innerHTML += this:

    public fun String.plus(): Unit {
            element.innerHTML += this
    //but it works with  //element.addText(this) - but this prevents entering html code inside a string 
    }
    
    opened by jean79 2
  • Make it possible to add different device classes to columns

    Make it possible to add different device classes to columns

    With this change you can achieve the following example from the Bootstrap website with Yested

    <div class="row">
      <div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
      <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
    </div>
    
    row {
        col(ExtraSmall(12), Medium(8)) {
            + ".col-xs-12 .col-md-8"
        }
        col(ExtraSmall(6), Medium(4)) {
            + ".col-xs-6 .col-md-4"
        }
    }
    
    opened by bbodi 2
  • CanvasI is not defined

    CanvasI is not defined

    Hi,

    Using the 0.0.104 build of Yested and Kotlin 1.0.2. I have a graph on one of the pages in my app. I'm getting an error on line 2113 in Yested.js (return (Kotlin.isType(tmp$0 = this.element, CanvasI) ? tmp$0 : Kotlin.throwCCE()).getContext(id);) that stated CanvasI is not defined. Is the the 104 build not compatible with Kotlin 1.0.2?

    Thanks

    opened by jjdestef3 1
  • Implement setChild(element) via Facebook React library

    Implement setChild(element) via Facebook React library

    Should this significantly improve performance? Description of FLUX / React https://www.youtube.com/watch?v=nYkdrAPrdcw&list=PLb0IAmt7-GS188xDYE-u1ShQmFFGbrk0v#t=638 http://www.infoq.com/articles/reactjs-codecademy

    opened by jean79 1
  • Better home page

    Better home page

    Make it shorter, to provide better overview of what Yested is. Demonstrate main features of the framework, each in a few lines. Proposal for sections: Kotlin vs Javascript - strongly typed language Components - how to create components and how to compose them together DSL language for quick layout (strongly typed!) Out of box Bootstrap wrappers

    opened by jean79 1
  • Internet Explorer issue

    Internet Explorer issue

    There is probably issue with Internet Explorer: When some HTTPElement was already part of the DOM, we can't set him as a child to another part of the DOM. Let's try to first remove the HTTPElement from it's previous parent ELEMENT and only then add it as child to another element. Methods affected: HTMLComponent.plus, appendChild

    opened by jean79 1
  • Hierarchy change

    Hierarchy change

    Remove ParentComponent

    • appendChild, appendContent etc moved to HTMLComponent (original HTMLParentComponent)

    Component trait should be kept simple:

    public trait Component {
        val element : HTMLElement
    }
    

    So that if you somebody create non-DSL component like Breadcrumb or Grid, user of the component cannot call some unexpected methods of the component.

    All components implementation must provide element value:

    public class Tabs : Component {
        public override val element = createElement("div")
    

    if user wants to manipulate with element, he must do it directly: element.appendChild(...) element.setAttribute(..)

    Also removing some inconsistencies, some components now extend Component instead of HTMLParentComponent.

    method rename: replace -> setContent, setChild

    opened by jean79 1
  • adding nav to the Bootstrap example page with scrollspy + affix

    adding nav to the Bootstrap example page with scrollspy + affix

    I added a nav list to the right of the Bootstrap example page, with Affix (always on top of the page, cannot scroll out) and scrollspy(menu items are activated automatically while scrolling through their sections) functionality.

    I changed the separator character from "/" to "_" in the URL hash, because the scrollspy plugin/JQuery complains about it.

    I removed the default ID value for the navbar. My opinion is that it is too valuable information to set it implicitly and hide from the programmer.

    Unfortunately I used tab character instead of spaces, which caused some unwanted modifications. I didn't find any coding convetion for the projects, so please choose one of them, and I will use it.

    Thanks, Balázs

    opened by bbodi 1
  • Suggestion: Support GraphQL for server-side communication

    Suggestion: Support GraphQL for server-side communication

    It looks like Facebook's GraphQL will revolutionize the way in-browser web-apps communicate with the server, replacing REST.

    There is an actively developed Java library for server-side GraphQL - however it's schema definition is quite verbose, seems like a great candidate for Kotlin builders.

    I'd love to be able to quickly create a project where I can code in Kotlin both client-side and server-side, perhaps using GraphQL to communicate between both parts of the app.

    opened by sanity 0
  • Master/detail: validation got stuck at failed state

    Master/detail: validation got stuck at failed state

    1. Open master/detail example
    2. Click add button -> form appears
    3. Enter text to name field
    4. Click to "Save" button (ensure you haven't clicked anywhere) -> You get validation failed error

    to fix validation you have to edit text, click somewhere at free space and after that press save

    opened by cy6erGn0m 0
  • Smart Grid filter text field inaccessible via mouse

    Smart Grid filter text field inaccessible via mouse

    1. Open Smart Grid example
    2. Click filter icon at any column -> a text field appear
    3. Click to text field -> focus not getting to the text field
    4. Use to get focus at the text field
    5. Type something to the text field
    6. Try to select text in the text field -> you can't
    bug 
    opened by cy6erGn0m 5
  • Consider adding Size-auto

    Consider adding Size-auto

    https://github.com/donquixote/bootstrap-autocolumns/blob/master/bootstrap-autocolumns.css example of usage:

    <div class="row">
      <div class="col-xs-auto">Left</div>
      <div class="col-xs-auto-right">Right</div>
      <div class="col-middle">Middle</div>
    </div>
    

    fiddle: http://jsfiddle.net/9wzqz/

    opened by jean79 0
Owner
Jan Kovar
Jan Kovar
Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript

Projeto da disciplina de Linguagem de Programação Funcional 2021.1 (jan/2022) ??

Alex Candido 3 Jan 10, 2022
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Codename One 1.4k Jan 9, 2023
JavaScript evaluation from kotlin common code for android & iOS

Mobile Kotlin javascript This is a Kotlin MultiPlatform library that allows you to run JavaScript code from common Kotlin code Table of Contents Featu

IceRock Development 14 Aug 29, 2022
A Template for a Github Actions Pipeline for building and publishing Gradle-JVM Applications

github-actions-cd-template-jvm A Template for a Github Actions Pipeline for building and publishing Gradle-JVM Applications It build a executable shad

Raphael Panic 0 Dec 5, 2021
🚀 Native iOS- and Android- Apps with JavaScript

Titanium Welcome to the Titanium open source project. Titanium provides a mature platform for developers to build completely native cross-platform mob

Team Appcelerator 2.6k Jan 4, 2023
Uproot-JS - Extract JavaScript files from burp suite project with ease

Extract JavaScript files from burp suite project with ease. Disclaimer I am not

Dexter0us 50 Aug 8, 2022
Framework for quickly creating connected applications in Kotlin with minimal effort

Ktor is an asynchronous framework for creating microservices, web applications and more. Written in Kotlin from the ground up. import io.ktor.server.n

ktor.io 10.7k Jan 9, 2023
Provides Kotlin libs and some features for building Kotlin plugins

Kotlin Plugin Provides Kotlin libs and some features for building awesome Kotlin plugins. Can be used instead of CreeperFace's KotlinLib (don't use to

null 3 Dec 24, 2021
An experimental tool for building console UI in Kotlin using the Jetpack Compose compiler/runtime

An experimental tool for building console UI in Kotlin using the Jetpack Compose compiler/runtime

Jake Wharton 1.4k Dec 28, 2022
A sample project that helps to start building a Mobile Kotlin Multiplatform application

Mobile Kotlin multiplatform project template A sample project that helps to start building a Mobile Kotlin Multiplatform application. It establishes a

Dizel 0 Oct 16, 2021
A set of highly-opinionated, batteries-included gradle plugins to get you started building delicious multi-module Kotlin projects

Sourdough Gradle What is Sourdough Gradle? Sourdough is a set of highly opinionated gradle plugins that aim to act as the starter for your Kotlin proj

Backbone 0 Oct 3, 2022
A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

Varabyte 349 Jan 9, 2023
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022
A Kotlin library providing a simple, high-performance way to use off-heap native memory in JVM applications.

native_memory_allocator A library which uses sun.misc.Unsafe to allocate off-heap native memory. Motivation The goal of this project is to provide a s

Target 5 Dec 8, 2022
A small DSL to make building a conversation in Bukkit easy.

Konversation Konversation provides a simple builder to construct chains of prompts to be used in the conversation API present in Bukkit. Bukkit only p

Tim Hagemann 2 Dec 4, 2022
Name of your app is an android app that allows building a todo list

Project 1 - SimpleToDo Name of your app is an android app that allows building a todo list and basic todo items management functionality including add

Javier Nazario 0 Nov 23, 2021
A library for building Java only Zygisk/Riru modules.

A library for building Java only Zygisk/Riru modules.

Kr328 19 Dec 17, 2022
Embeddable custom voice assistant for Android applications

Aimybox voice assistant Open source voice assistant built on top of Aimybox SDK iOS version is available here Key Features Provides ready to use UI co

Just AI 176 Jan 2, 2023
🚀Optimizer for mobile applications

Overview | 概览 Booster is an easy-to-use, lightweight, powerful and extensible quality optimization toolkit designed specially for mobile applications.

DiDi 4.3k Dec 29, 2022