Giter VIP home page Giter VIP logo

dom99's Introduction

dom99

npm bundle size minified + gzip npm Chat on Miaou


What is dom99 ?

dom99 is a JavaScript framework focused to make web development faster. Select HTML elements, add event listeners, synchronize state with the view, clone HTML templates with your data and insert it directly in the document.

Installation

npm install dom99

Basic Use

Data-binding

<!-- The input and the paragraph as well as the js variable always have the same value -->

<input data-variable="text">
<p data-variable="text"></p>

<script>
    d.feed({text : "Hello dom99"});
    d.activate();
    console.log(d.variables.text);
</script>

Design philosophy

Optimized for page-load

By default dom99 is optimized for first page load, that means the size is small.

HTML for mark-up, JS for logic

Get up an running fast. dom99 does not attempt to invent for the nth time how to write if statements and for loops inside HTML. Put logic in JS, and mark-up that you already know in HTML.

Separation of concerns

Designers and Developers can work on the same files. Elements in the mark-up linked to the DOM use data-* instead of the overused class and id. The benefits to this approach is that the developers can safely add data-attributes to stylized components without breaking the styles, and the designers can safely add classes and ids without breaking anything.

Easy to learn

Get up an running fast. Documentation Use a premade starter pack create-dom99-app.

Work with the Web platform

dom99 is a web framework and is an extension to web standards HTML, CSS and JS, and does not intent to be a replacement.

Zero-second compile time

dom99 can be used in a zero-second compile time development set-up with ES-modules.

Avoiding leaky abstractions

No virtual dom is used for maximum possible performance. Explanation from chrismorgan about DOM and VDOM.

Unopinionated

dom99 is unopinionated and bigger frameworks can be built on top of it. That means you can chose your own architecture, state management system, CSS system etc

Locally found in ./documentation/documentation.html

Examples

Graphs

<!--
Define the template for an user
every user has a picture, a short biography, and a contact button
-->
<template data-template="user-element">
    <img data-variable="picture">
    <p data-variable="bio">SHORT BIO</p>
    <button>Contact</button>
</template>

<!--
The list variable name is "users" and the template used is "user-element"
native html elements can also be used to display a list
-->
<div data-list="users-user-element"></div>
<script type="module">
    import * as d from "./node_modules/dom99/built/dom99ES.js";

    d.feed({users :
        [
            {
                picture: "usera.jpg",
                bio: "Loves biking and skating"
            },
            {
                picture: "userb.jpg",
                bio: "Drinks tons of café."
            }
        ]
    });
    d.activate();
</script>
HTML Result

<div data-list="*users-user-element"> <img data-variable="*picture" alt="user-picture" src="usera.jpg"> <p data-variable="*bio">Loves biking and skating</p> <button>Contact</button> <img data-variable="*picture" alt="user-picture" src="userb.jpg"> <p data-variable="*bio">Drinks tons of café.</p> <button>Contact</button> </div>

Other examples

Discussion

Chat on Miaou

Issues reports

Contributing

Contributing and things to do

Dev

npm run buildAll to run all scripts in package.json in one go

open tests/specification/SpecRunner.html to run unit tests

License

Boost License

dom99's People

Contributors

bettoarcaya avatar grossacasac avatar jfstn avatar liquorburn avatar robertmatkulcik avatar vigneshmurugan avatar

Watchers

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