Giter Site home page Giter Site logo

vratislav / building-htm-systems Goto Github PK

View Code? Open in Web Editor NEW

This project forked from htm-community/building-htm-systems

0.0 2.0 0.0 113.37 MB

Supporting code for Building HTM Systems document.

License: GNU Affero General Public License v3.0

JavaScript 55.61% HTML 44.39%

building-htm-systems's Introduction

Supporting code for:

Building HTM Systems

This is the JavaScript source code for buildinghtm.systems.

HTM Reference Implementation

The HTM system running these visualization is called simplehtm.

Running

npm run dev

❗️WARNING❗️

THIS REPO IS ABOUT TO BE RE-HAULED LIVE ON TWITCH, TUNE TO https://www.twitch.tv/rhyolight_ THURSDAYS 9AM PDT.

DON'T TRUST ANY OF THIS STUFF BELOW, IT WON'T WORK FOR LONG...

The plan is taking shape here.


Widgets

These are used in the website as interactive examples. They are separated by URL/folder. Each folder has one page of widgets, so they get built / tested in a page environment the same way they will be displayed.

Widget binaries are constructed by webpack and chucked into URL/folder. Their source code is in src/widgets

Building Widgets:

Widgets are bundled for deployment as a page. A page can have many widgets that interact with each other. They are built and tested with this in mind. Webpack is used to build bundles for specific targets. To build all webpack targets:

npm start

Wordpress Deployment

Webpack is currently configured to deploy to the wp-content folder with the same tree structure expected by Wordpress. This makes it easy to create compiled JS files and upload them to Wordpress for embedding into various pages.

Demo / Test

See widgets.html for examples.

JSDS

If you are poking around inside the widgets you will probably notice something called JSDS being used as a data store. This a small observable data cache written almost a decade ago that demonstrates many of the desired attributes of reactive programming. Basically, each data store is observable, so for each widget we create one and load it with data. Then the visualization code simple observes the JSDS instance for changes to data and renders appropriately. This allows for granular UI updates and prevents unecessary repaints.

JSDS for inter-widget communication

Deployment targets for this project are pages, which can contain many widgets. These widgets may be data-dependent on each other. At the page level, we can create widgets that update as dependent widgets update by using the observable nature of JSDS. Just have one widget observe a value of a previous widget's data store and it can update in response.

JSDS for HTML interaction

JSDS also allows access at the global page level so we can program specific interactions to occur as the user interacts with an HTML page.

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.