Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.narbase.kunafa:core-jvm

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.narbase.kunafa:core-jvm

Easy to use, high level framework in Kotlin for front-end web-development

  • 0.3.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
3
Source

Awesome Kotlin Badge Maven Central

Kunafa logo

Kunafa

Easy to use, high level framework in Kotlin for front-end web-development


Create web apps without using HTML, CSS, or JavaScript.

Documentation

Find Kunafa Documentation here (Work in progress).

Philosophy

Web apps framework without using HTML, CSS, or JavaScript.

Problem

  • Web technologies are pain. Html is verbose, CSS is unexpected, and javascript is.. javascript.
  • The no. of technologies a developer needs to learn to write web apps is big. That is, HTML, CSS and JavaScript at the least. Then there are javascript frameworks (react, angular, vue), LESS, SCSS, Haml. There are also packaging tools, gulp, webpack.
  • Modern javascript frameworks solve the JavaScript problem, not the front end problem. React use JSX (embedded HTML in javascript) while Angular requires CSS and HTML.

Proposal

An easy to use, high level framework in Kotlin for web development. You do not need to learn the web stack, only the framework to be able to write web apps.

Developer experience

Developers only need to use Kotlin for development.

  • You write the view (similar to Android xml layouts) in Kotlin DSL. e. g.
            verticalLayout {
                style {
                    width = matchParent
                    height = matchParent
                    backgroundColor = Color(240, 240, 240)
                }
                button {
                    text = "Click me"
                }
            }

  • The view component (similar to Android activity or iOS ViewController) implements certain life cycle functions.
  • The framework views contains easy to understand and familiar components and layouts managers. i. e. Button, TextView, TextInput, HorizontalLayout, VerticalLayout and so on.
  • The framework makes laying out objects easy, e. g. match parent, wrap content.
  • You can wrap any html, css, and js into a framework component to use it inside the framework.

Features

  • Intuitive DSL for creating views
  • Type safe CSS DSL for complete control of views appearance
  • Automatic CSS rule sets caching
  • Flexible Components to abstract any logic
  • Full Routing support (Links, URL params, Redirecting, Navigation control)
  • Very easy to wrap any 3rd party library as Kunafa component

Implementation

  • Kotlin transpiles to javascript, and is well designed to support DSLs.
  • Code is turned to javascript at compile time, and a basic HTML file loads the generated .js file.
  • At runtime, the js file will generate the required HTML, and CSS files containing the whole application.

Getting started

Hello Kunafa! Getting started guide.

To add Kunafa to your project, first you need to add it to your build.gradle file as a dependency.

compile 'com.narbase.kunafa:core:<latest_version>'

If you have Kotlin Js plugin configured, then you can directly use it the code and Webpack will include Kunafa in the generated bundle.

Now you are ready to use Kunafa in any Kotlin-js project.

For a complete example, check the Kunafa Todo repository


Your feedback is most welcomed. Let us know how is your experience with Kunafa.

FAQs

Package last updated on 14 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc