All Projects â†’ i5ik â†’ Exoteric.js

i5ik / Exoteric.js

Licence: unlicense
🌿 exoteric - JavaScript tool to make front end UI simple. Tools should be simple, because you're not smart enough to debug it. Better and simpler than React.js and Vue.js, et al. Make UI, not opinion. Like demo? https://cutt.ly/full-dumbass

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Exoteric.js

Buymeacoffee
Buy Me a Coffee framework for iOS
Stars: ✭ 145 (-3.97%)
Mutual labels:  framework
Omnigui
A cross-platform GUI framework from scratch just to learn
Stars: ✭ 147 (-2.65%)
Mutual labels:  framework
Tentacle
A multiplexed p2p network framework that supports custom protocols
Stars: ✭ 150 (-0.66%)
Mutual labels:  framework
Mediapipe
Cross-platform, customizable ML solutions for live and streaming media.
Stars: ✭ 15,338 (+10057.62%)
Mutual labels:  framework
Eventflow
Async/await first CQRS+ES and DDD framework for .NET
Stars: ✭ 1,932 (+1179.47%)
Mutual labels:  framework
Custom Pod Autoscaler
Custom Pod Autoscaler base, allows creation of Custom Pod Autoscalers
Stars: ✭ 148 (-1.99%)
Mutual labels:  framework
Miniphp
A small, simple PHP MVC framework skeleton that encapsulates a lot of features surrounded with powerful security layers.
Stars: ✭ 144 (-4.64%)
Mutual labels:  framework
Fos
Web Components to turn your web app into a fake operating system
Stars: ✭ 151 (+0%)
Mutual labels:  framework
Codestar Framework
A Simple and Lightweight WordPress Option Framework for Themes and Plugins
Stars: ✭ 147 (-2.65%)
Mutual labels:  framework
Carry
ClojureScript application framework.
Stars: ✭ 149 (-1.32%)
Mutual labels:  framework
Siris
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Stars: ✭ 146 (-3.31%)
Mutual labels:  framework
Skyve
Skyve is an open-source low-code platform that gives you access to all of the key capabilities needed to build sophisticated, robust and scalable cloud solutions.
Stars: ✭ 145 (-3.97%)
Mutual labels:  framework
Customstage
A JavaFX UI framework to create fully customized undecorated windows
Stars: ✭ 148 (-1.99%)
Mutual labels:  framework
Knockout Spa
A mini but full-fledged SPA framework and boilerplate to build SPAs fast and scalable
Stars: ✭ 145 (-3.97%)
Mutual labels:  framework
Cleverstyle Framework
CleverStyle Framework is simple, scalable, fast and secure full-stack PHP framework
Stars: ✭ 150 (-0.66%)
Mutual labels:  framework
Bodywork Core
Deploy machine learning projects developed in Python, to Kubernetes. Accelerated MLOps 🚀
Stars: ✭ 145 (-3.97%)
Mutual labels:  framework
Lazy
Kule Lazy4 / CSS Framework
Stars: ✭ 147 (-2.65%)
Mutual labels:  framework
Pinatra
A PHP copy of Sinatra: a DSL for quickly creating web applications in PHP with minimal effort.
Stars: ✭ 151 (+0%)
Mutual labels:  framework
Ecs
ECS for Unity with full game state automatic rollbacks
Stars: ✭ 151 (+0%)
Mutual labels:  framework
Core
CatLib lightweight dependency injection container
Stars: ✭ 148 (-1.99%)
Mutual labels:  framework

💋 exoteric npm npm downloads total 🌿🌿🌿

KISS - Keep It Simple, Stupid

The tool of choice for the madding crowd

Tooling shouldn't be hard to understand.

Make components from cross-browser web standards without thinking too hard.

exoteric is a library to help.

Quick example:

  <div class="game">
    <div class="game-board">
      ${Board(state)}
    </div>
    <div class="game-info">
      <div>${''/* status */}</div>
      <ol>${''/* TODO */}</ol>
      <button click=${() => setState(initState(AppState))}>Reset</button>
    </div>
  </div>

From the "Exoteric Tic-Tac-Toe" (React.JS tic-tac-toe tutorial ported to Exoteric.)

Stats:

  • Built and gzipped: 17K

Why?

exoteric

/ˌɛksə(ʊ)ˈtɛrɪk/

adjective FORMAL

intended for or likely to be understood by the general public.

Kernighan's Law

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

(Brian Kernighan)

Kernighan's Law is named for Brian Kernighan and derived from a quote from Kernighan and Plauger's book The Elements of Programming Style:

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?

While hyperbolic, Kernighan's Law makes the argument that simple code is to be preferred over complex code, because debugging any issues that arise in complex code may be costly or even infeasible.

So, what's this?

No JSX, no Shadow DOM, no fancy framworks, no opinions.

  • Just HTML, CSS and JavaScript—No JSX, no Shadow DOM, no fancy frameworks, no opinions.
  • Stop learning, stagnate!—Use the syntax you already know. Stop learning new things. Do more with what's already here.
  • Crazy and fun, but in a serious way—exoteric is the tool for people who don't want to think too hard to make UI.

To learn more...oh wait, you already know enough.

be exoteric

function Spin(n) {
  return e`  
    <div 
      wheel:passive=${spin}
      touchmove:passive=${move}
    >
      <h1>
        <progress 
          max=1000
          value=${n}
        ></progress>
        <hr>
        <input 
          input=${step}
          type=number 
          value=${n}>
    </div>
  `;
}

Still not bored?

You soon will be. Nothing notable here: Play with the full example on CodePen

See even more boring code in a 250 line TodoMVC test

Holy secular install mantras

Install exoteric with npm:

npm i --save exoteric

Parcel or Webpack exoteric and import:

import { e } from 'exoteric'

See a CodeSandbox how-to of above

Or import in a module:

<script type=module>
  import { e } from 'https://unpkg.com/exoteric'
</script>

See a CodePen how-to of above


Basic Examples

Components

Defining

const Title = state => e`<h1>${state}</h1>`

Nesting

const Parent = state => e`<main>${Title(state)}</main>`;

Inserting

Parent("Hello").to('body', 'beforeEnd');

Updating

Parent("Greetings");
let i = 1;
setTimeout(() => Parent(`${i++} 'Hi's`), 3000);

ToDo MVC Example

function App(state) {
  const {list} = state;
  return e`
    <header class=header>
      <h1>todos</h1>
      <input autofocus
        class=new-todo 
        placeholder="What needs to be done?"
        keydown=${newTodoIfEnter} 
      >
    </header>
    <main>
      ${TodoList(list)}
      ${Footer()}
    </main>
  `;
}

function TodoList(list) {
  return e`
    <ul class=todo-list>
      ${list.map(Todo)}
    </ul>
  `;
}

Updating on events

  function newTodoIfEnter(keyEvent) {
    if ( keyEvent.key !== 'Enter' ) return;
    
    State.todos.push(makeTodo(keyEvent.target.value));
    TodoList(State.todos);
    keyEvent.target.value = '';
  }

Properties

Do not exist.

Global State

is nothing special.

Routing

function changeHash(e) {
  e.preventDefault();
  history.replaceState(null,null,e.target.href);
  routeHash();
}

function routeHash() {
  switch(location.hash) {
    case "#/active":                listActive(); break;
    case "#/completed":             listCompleted(); break;
    case "#/":          default:    listAll(); break;
  }
}

function Routes() {
  return e`
    <ul class=filters>
      <li>
        <a href=#/ click=${changeHash}
          class=${location.hash == "#/" ? 'selected' : ''}>All</a>
      </li>
      <li>
        <a href=#/active click=${changeHash}
          class=${location.hash == "#/active" ? 'selected' : ''}>Active</a>
      </li>
      <li>
        <a href=#/completed click=${changeHash}
          class=${location.hash == "#/completed" ? 'selected' : ''}>Completed</a>
      </li>
    </ul>
  `
}

Most of the examples above are taken from in a 250 line TodoMVC test, the full code of which you can see here..

Can you hear the people sing

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].