MutationObserver are tracking changes in your DOM and lazy binding module signatures and executes them, when an element appears in the viewport using IntersectionObservers.
To organize, sending and receiving Data through your application there are observable streams available provided by [RxJS](http://reactivex.io/).
The combination of the core concepts makes computation and payload overhead being a thing of the past.
The aim of Gluebert.js is, to make it simple and intuitive using modern approaches even for legacy and outdated Browsers back to IE11.
Recommendation: To see whats going on behind the scenes, open your network tab in the browser console.
Open your network-tab in your browsers console and reload the page and you see the advanced lazy loading stuff in action.
git clone [email protected]:wildhaber/gluebert-getting-started.git cd gluebert-getting-started npm install npm run build npm run serve
There are adapters ready for Handlebars, Mustache or Twig Template engines. This way you can share your templates across multiple interpreter if server-side or on-the-fly generated elements.
You are using another engine? no problem - there is also a simple way to adapt your own template engine.
You are sending data across your application and want to ensure data consistency without manual tons of manual validation. Generating on-the-fly elements can be validated with a JSON-Schema validator of your choice. We highly recommend ajv.
Any module in gluebert.js can subscribe to a certain data stream reacting accordingly. Currently gluebert.js is using RxJS behind the scenes.
You don't need to change your current ecosystem. The only dependency is a proper Webpack workflow for code splitting enabling dynamic imports. So it can be used in any Smyfony-, Drupal-, WordPress-, Hugo-, Jekyll-Project or any other environment you have. Only for Single-Page-Applications you should stay within the framework of your choice.
Similarly to the concept of webcomponents modules you create are fully reusable across multiple projects. This stops you from re-inventing the wheels over and over again.