Fest - A reuseable UI components builder for the web

Related tags

UI Framework fest
Overview

fest

Fest is actually fast. A reuseable UI components builder for the web. Rerender components or parts of components as users interact with your app. When a component needs to be rerendered, the entire component is rebuilt with the needed state outside the DOM Tree and replaces the affecting part of the DOM Tree with the newly built component. This causes your app to be updated without excessive page reflows, which ensures a better user experience.

JS

${this.TEXT(args.content)}

`; },true); }; var docFragment = document.createDocumentFragment(), art1 = Article(1),art2 = Article(2); docFragment.appendChild(art1.getElement({title:"FIRST ARTICLE",content:"This is the first article.",author:"Kwabena Bismark"})); docFragment.appendChild(art2.getElement({title:"SECOND ARTICLE",content:"This is the second article. It has no author."})); document.body.appendChild(docFragment); setTimeout(function(){ art2.rerender({title:"SECOND ARTICLE",content:"This is the second article. It has an author now.",author:"Kwabena Bismark"}); },3000); ">
const Render = window.__RENDERFESTAPP;
const header = Render({container:"h1",style:"color:red"},function(args){
  return `${this.TEXT(args.title)} ${args.author?`by ${this.TEXT(args.author)}`:''}`;
},true);
function Article(idNum){
  const obj={
      container:"div",
      id:`article-${idNum}`,
      class:"article",
      style:{
          fontSize:"17px"
      },
      onrerender:function(){
          obj.fest.content.style={fontSize:"25px"}
      },
      fest:{
          content:{
              id:`content-${idNum}`,
              class:"contents"
          }
      }
  };
  return Render(obj,function(args){
        return `${header.render({title:args.title,author:args.author})} 

${this.TEXT(args.content)}

`
; },true); }; var docFragment = document.createDocumentFragment(), art1 = Article(1),art2 = Article(2); docFragment.appendChild(art1.getElement({title:"FIRST ARTICLE",content:"This is the first article.",author:"Kwabena Bismark"})); docFragment.appendChild(art2.getElement({title:"SECOND ARTICLE",content:"This is the second article. It has no author."})); document.body.appendChild(docFragment); setTimeout(function(){ art2.rerender({title:"SECOND ARTICLE",content:"This is the second article. It has an author now.",author:"Kwabena Bismark"}); },3000);

JSX

The JSX form of FEST is to allow mingling of both Javascript and HTML. The FEST JSX compiler will convert your JSX code into Javascript for browsers to render your app. The FEST JSX compiler is in testing stage.

This code is the JSX format of the Javascript code above.

${this.TEXT(args.title)} ${args.author?`by ${this.TEXT(args.author)}`:''}; },true); function Article(idNum){ const obj={ container:"div", id:`article-${idNum}`, class:"article", style:{ fontSize:"17px" }, onrerender:function(){ obj.fest.content.style={fontSize:"25px"} }, fest:{ content:{ id:`content-${idNum}`, class:"contents" } } }; return Render(obj,function(args){ return ( ${header.render({title:args.title,author:args.author})}

${this.TEXT(args.content)}

); },true); }; var docFragment = document.createDocumentFragment(), art1 = Article(1),art2 = Article(2); docFragment.appendChild(art1.getElement({title:"FIRST ARTICLE",content:"This is the first article.",author:"Kwabena Bismark"})); docFragment.appendChild(art2.getElement({title:"SECOND ARTICLE",content:"This is the second article. It has no author."})); document.body.appendChild(docFragment); setTimeout(function(){ art2.rerender({title:"SECOND ARTICLE",content:"This is the second article. It has an author now.",author:"Kwabena Bismark"}); },3000); ">
const header = Render({container:"h1",style:"color:red"},function(args){
  return <fest>${this.TEXT(args.title)} ${args.author?`by ${this.TEXT(args.author)}`:''}</fest>;
},true);
function Article(idNum){
  const obj={
      container:"div",
      id:`article-${idNum}`,
      class:"article",
      style:{
          fontSize:"17px"
      },
      onrerender:function(){
          obj.fest.content.style={fontSize:"25px"}
      },
      fest:{
          content:{
              id:`content-${idNum}`,
              class:"contents"
          }
      }
  };
  return Render(obj,function(args){
        return (
              <fest>
                  ${header.render({title:args.title,author:args.author})} 
                  <p class="fest" fest="content">${this.TEXT(args.content)}</p>
              </fest>
        );
  },true);
};

var docFragment = document.createDocumentFragment(),
art1 = Article(1),art2 = Article(2);
docFragment.appendChild(art1.getElement({title:"FIRST ARTICLE",content:"This is the first article.",author:"Kwabena Bismark"}));
docFragment.appendChild(art2.getElement({title:"SECOND ARTICLE",content:"This is the second article. It has no author."}));
document.body.appendChild(docFragment);

setTimeout(function(){
   art2.rerender({title:"SECOND ARTICLE",content:"This is the second article. It has an author now.",author:"Kwabena Bismark"});
},3000);
You might also like...

Cybernetically enhanced web apps

Cybernetically enhanced web apps

What is Svelte? Svelte is a new way to build web applications. It's a compiler that takes your declarative components and converts them into efficient

Dec 31, 2022

Ember.js - A JavaScript framework for creating ambitious web applications

Ember.js - A JavaScript framework for creating ambitious web applications

Ember.js is a JavaScript framework that greatly reduces the time, effort and resources needed to build any web application. It is focused on making yo

Jan 4, 2023

Our original Web Component library.

Polymer ℹ️ Note: This is the current stable version of the Polymer library. At Google I/O 2018 we announced a new Web Component base class, LitElement

Jan 3, 2023

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

vue-next This is the repository for Vue 3.0. Quickstart Via CDN: script src="https://unpkg.com/vue@next"/script In-browser playground on Codepen S

Jan 4, 2023

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.

OpenUI5. Build Once. Run on any device. What is it? OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on al

Dec 31, 2022

The AMP web component framework.

AMP ⚡ ⚡ ⚡ ⚡ Metrics Tooling AMP is a web component framework for easily creating user-first websites, stories, ads, emails and more. AMP is an open so

Jan 4, 2023

Create blazing fast multithreaded Web Apps

Create blazing fast multithreaded Web Apps

Welcome to neo.mjs! neo.mjs enables you to create scalable & high performant Apps using more than just one CPU, without the need to take care of a wor

Dec 31, 2022

Dojo Framework. A Progressive Framework for Modern Web Apps

@dojo/framework Dojo is a progressive framework for modern web applications built with TypeScript. Visit us at dojo.io for documentation, tutorials, c

Dec 25, 2022

🙋‍♀️ 3kb library for tiny web apps

3kb library for tiny web apps. Sometimes, all you want to do is to try and do something—No boilerplate, bundlers, or complex build processes. Lucia ai

Dec 27, 2022
Owner
Bismark Yamoah
Web developer | Nodejs | React | React Native | C/C++ | Java | Learning Go | Try NOSCDB. You will love it.
Bismark Yamoah
A Web Component compiler for building fast, reusable UI components and static site generated Progressive Web Apps

Stencil: A Compiler for Web Components and PWAs npm init stencil Stencil is a simple compiler for generating Web Components and static site generated

Ionic 11.3k Jan 4, 2023
The simplest way to create web components from plain objects and pure functions! 💯

?? One of the four nominated projects to the "Breakthrough of the year" category of Open Source Award in 2019 hybrids is a UI library for creating web

hybrids 2.7k Dec 27, 2022
📓 The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

Build bulletproof UI components faster Storybook is a development environment for UI components. It allows you to browse a component library, view the

Storybook 75.9k Jan 9, 2023
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

Fast 3kB alternative to React with the same modern API. All the power of Virtual DOM components, without the overhead: Familiar React API & patterns:

Preact 33.6k Jan 8, 2023
Write JSX-driven components with functions, promises and generators.

Crank.js Write JSX-driven components with functions, promises and generators. Documentation is available at crank.js.org. Crank.js is in a beta phase,

null 2.5k Jan 1, 2023
jCore - JavaScript library for building UI components

JavaScript library for building UI components

iOnStage 11 Jan 21, 2022
Shoelace - A collection of professionally designed, every day UI components built on a framework-agnostic technology. 🥾

Shoelace A forward-thinking library of web components. Works with all frameworks ?? Works with CDNs ?? Fully customizable with CSS ?? Includes an offi

Shoelace 7.7k Dec 26, 2022
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and more.

Write components once, run everywhere. Compiles to: At a glance Mitosis is inspired by many modern frameworks. You'll see components look like React c

Builder.io 7.7k Jan 1, 2023
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Supporting Vue.js Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome ba

vuejs 201.6k Jan 7, 2023
AngularJS - HTML enhanced for web apps!

AngularJS AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade/Pug and

Angular 59.3k Jan 1, 2023