Giter VIP home page Giter VIP logo

neo's Introduction

Downloads Version License Join the Slack channel Discord Chat PRs Welcome

Welcome to neo.mjs!

neo.mjs enables you to create scalable & high performant Apps using more than just one CPU core. No need to take care of a workers setup, and the cross channel communication on your own.

Version 4 release announcement

Content

  1. Slack Channel for questions & feedback
  2. Scalable frontend architectures
  3. Multi Window COVID19 IN NUMBERS Demo App
  4. COVID19 IN NUMBERS Demo App
  5. What if ... (Short overview of the concept & design goals)
  6. Want to learn more?
  7. Online Examples
  8. Online Docs
  9. Command-Line Interface
  10. Ready to get started?
  11. Story & Vision
  12. neo.mjs is in need of more contributors!
  13. neo.mjs is in need of more sponsors!



1. Slack Channel for questions, ideas & feedback

Join our community:
Join the Slack channel



2. Scalable frontend architectures

Most frontends today still look like this. Everything happens inside the main thread (browser window), leading to a poor rendering performance. The business logic happens inside main as well, which can slow down DOM updates and animations. The worst case would be a complete UI freeze.

To solve this performance problem, it is not enough to just move expensive tasks into a worker. Instead, an application worker needs to be the main actor. neo.mjs offers two different setups which follow the exact same API. You can switch between dedicated and shared workers at any point.

The dedicated workers setup uses 3-6 threads (CPUs). Most parts of the frameworks as well as your apps and components live within the app worker. Main threads are as small and idle as possible (42KB) plus optional main thread addons.

In case you want to e.g. create a web based IDE or a multi window banking / trading app, the shared worker setup using 5+ threads (CPUs) is the perfect solution.

All main threads share the same data, resulting in less API calls. You can move entire component trees across windows, while even keeping the same JS instances. Cross window state management, cross window drag&drop and cross window delta CSS updates are available.



3. Multi Browser Window COVID19 IN NUMBERS Demo App

The most compelling way to introduce a new framework might simply be to show what you can do with it.

Blog post: Expanding Single Page Apps into multiple Browser Windows

Live Demo: COIN App (Multi Window)
Chrome (v83+), Edge, Firefox (Safari does not support SharedWorkers yet).
Desktop only.


You can find the code of the multi window covid app here.



4. COVID19 IN NUMBERS Demo App

Live Demo: COIN App dist/production
Desktop only => support for mobile devices is on the roadmap.


You can find the code of the covid app here.



5. Short overview of the concept & design goals

What if ... Benefit
1. ... a framework & all the apps you build are running inside a separate thread (web worker)? You get extreme Performance
2. ... the main thread would be mostly idle, only applying the real dom manipulations, so there are no background tasks slowing it down? You get extreme UI responsiveness
3. ... a framework was fully built on top of ES8, but can run inside multiple workers without any Javascript builds? Your development speed will increase
4. ... you don’t need source-maps to debug your code, since you do get the real code 1:1? You get a smoother Debugging Experience
5. ... you don’t have to use string based pseudo XML templates ever again? You get unreached simplicity, no more scoping nightmares
6. ... you don’t have to use any sort of templates at all, ever again? You gain full control!
7. ... you can use persistent JSON structures instead? You gain more simplicity
8. ... there is a custom virtual dom engine in place, which is so fast, that it will change your mind about the performance of web based user interfaces? You get extreme performance
9. ... the ES8 class system gets enhanced with a custom config system, making it easier to extend and work with config driven design patterns? Extensibility, a robust base for solid UI architectures
10. ... your user interfaces can truly scale? You get extreme Performance



6. Want to learn more?

neo.mjs Concepts



7. Online Examples

You can find a full list of (desktop based) online examples here:
Online Examples

You can pick between the 3 modes (development, dist/development, dist/production) for each one.



8. Online Docs

The Online Docs are also included inside the Online Examples.

dist/production does not support lazy loading the examples yet, but works in every browser:
Online Docs (dist/production)

The development mode only works in Chrome and Safari Technology Preview, but does lazy load the example apps:
Online Docs (dev mode)

Hint: As soon as you create your own apps, you want to use the docs app locally,
since this will include documentation views for your own apps.



9. Command-Line Interface

You can run several build programs inside your terminal.
Please take a look at the Command-Line Interface Guide.



10. Ready to get started?

There are 3 different ways on how you can get the basics running locally.
Please take a look at the Getting Started Guide.

Here is an in depth tutorial on how to build your first neo.mjs app:
https://itnext.io/define-a-web-4-0-app-to-be-multi-threaded-9c495c0d0ef9?source=friends_link&sk=4d143ace05f0e9bbe82babd9433cc822

11. Story & Vision

Although neo.mjs is ready to craft beautiful & blazing fast UIs,
the current state is just a fraction of a bigger picture.

Take a look at the Project Story and Vision.



12. neo.mjs is in need for more contributors!

Another way to fasten up the neo.mjs development speed is to actively jump in.
As the shiny "PRs welcome" badge suggests: open source is intended to be improved by anyone who is up for the challenge.

You can also write a guide in case you learned something new while using neo.mjs or just help to get more eyes on this project.

Either way, here are more infos: Contributing



13. neo.mjs is in need for sponsors!

neo.mjs is an MIT-licensed open source project with an ongoing development.
So far the development was made possible with burning my (tobiu's) personal savings.

This is obviously not sustainable. To enable me keep pushing like this, please support it.
The benefit of doing so is getting results delivered faster.

Sponsor tobiu

More infos: Sponsors & Backers



Logo contributed by Torsten Dinkheller.



Build with ❤️ in Germany.



Copyright (c) 2015 - today, Tobias Uhlig & Rich Waters

neo's People

Contributors

albert-hashani avatar bhaustein avatar davhm avatar deniztoprak avatar dependabot[bot] avatar dinkh avatar dztoprak avatar extanimal avatar hergerger1971 avatar josh08h avatar keckeroo avatar ki1pen avatar krytechs avatar linchen avatar maxrahder avatar mrsunshine avatar mxmrtns avatar ndagovic avatar pensuwan-k avatar r-l-d avatar rashmibramhankar avatar rizwan2000rm avatar steffen avatar stuart98 avatar subramaniyamp avatar thorstenraab avatar thorstensuckow avatar ticklepoke avatar tobiu avatar wemersonjanuario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neo's Issues

Neo.container.Window

relies on the drag&drop implementation (to move a window by its header or resizing it).

the base class is already in the repo, not functional yet though.

Docs app: onHashChange

since onHashChange does get triggered initially now, the docs app throws an error when loading.

neo.mjs needs a logo

I am most definitely not a designer, so help on this one would be appreciated.

I can someone comes up with a good idea, we can definitely add a backlink to a company page or linked in profile. Might be one of the easiest ways to show up as a project sponsor.

ideas so far:
Screenshot 2019-11-05 at 18 51 57
( created with https://www.flamingtext.com/Name-Logos/Neo/ )

Screenshot 2019-11-05 at 19 26 46

examples: auto generate the index files

spinning the auto-generation idea one step further:

we can not only generate the dist dev & prod index files, but could as well generate the non dist ones.

Hot & Cold observables

Add a config to listeners like

onlyFireIfMounted: {Boolean}

so that you can limit events to the mounted state. open for different names ;)

Discussion: Nodejs & GraphQL based middleware

Max (elmasse) brought up this topic:

We could set up a separate repository to create a neo.mjs middleware using nodejs & GraphQL.

Take a look at:
https://graphql.org/graphql-js/

https://medium.com/codingthesmartway-com-blog/creating-a-graphql-server-with-node-js-and-express-f6dddc5320e1

This is an epic and probably involves a lot of work.

In short: neo.mjs should have a socket connection to the node server, probably using a custom API.

Schemas defined in the middleware could optionally automatically create models on the client side as well as the other way around. Changes to the data of a middleware schema should automatically update the store data of a bound client-side store as well as the other way around.

Would help for testing buffering of remotely loaded grids & tables.

I could definitely use feedback on this one!

DocsApp: tabHeader tooltips

i shortened the tab names to only display the last part of the name (everything behind the last dot),
to keep the width of the tabs shorter.

now it would be nice to add tooltips which show the full name on hover (e.g. when you have multiple tabs with the same name).

Rectangle utility class

instead of (or additional to) using the floating mixin, create a Rectangle class which does provide helper methods for aligning components.

e.g. windows, pickers, tooltips

like alignTo(nodeId, 'tl-br');

add zones => t r b l => 0 1 2 3 similar to CSS zones

Docs App: useCss4 button

It would be nice to be able to easily switch between the CSS4 vars themes and the ones not using them.

DocsApp: Local Storage

Create a local storage provider saving all open tabs to optionally restore the Docs App content when reloading the page.

=> main.mixins.LocalStorage

Docs App: list.Chip & field.Chip

Both example apps work fine as a standalone app.

Inside the docs app, after showing one example, the other one will not show the content of its store.

Will look into this.

Discussion: KeyNav -> boost the onKeyDown trigger speed

I am thinking about an optional flag for the keyNav. Especially when navigating through the helix items using the arrow keys, it feels like you move 5 / 300 items per second. The reason seems to be that the keydown event does not fire more often in case you keep a key pressed.

My current idea: save the last x onKeyDown events (key & timestamp). In case the same key triggers x times within the time interval y, fire the event handler again with a delay. E.g. the app worker gets the event every 200ms, fire it again with a 100ms delay. If it keeps firing "longer", add 3 delayed handler calls (50, 100, 150ms). OnKeyUp should cancel all timeout calls to stop at the current position.

We could further polish this in case we keep track of the current FPS rate and ensure there is max 1 movement within 1 animation frame (follow up ticket).

Thoughts?

Button Triggers

Very similar to form.field.triggers.

Needed for menu buttons.

form.FieldSet

should be pretty straight forward.

we can optionally add a checkbox to the legend to either collapse or disable it.

tab.Container: Sortable tabs

Relies on #16

The sorting should work similar to tabs inside the chrome browser.

To do this we need to remove the flexbox layout from the tab header toolbar and use style transitions instead.

component.DateSelector: keynav & select

(optional) mode to not select when using the arrow keys. apply a different cls (similar the today cls) and select on enter.

config: selectOnNavigate sounds good to me.

Docs App: Routes

As a minimum requirement, we should be able to pass the link of an active tab to create it again when reloading the docs app.

Similar to the Real World App.

tab.Container: Closable tabs

as a PoC this is implemented inside the docs app, would be nice as a standard feature using a more generic approach.

Drag & Drop implementation

I found a very nice ES6 based (MIT licensed) example here:

https://shopify.github.io/draggable/

Source example:

https://github.com/Shopify/draggable/blob/master/src/Draggable/Draggable.js

I think neo.mjs should have a similar solution.

It will get a little bit tricky with our workers setup: Main needs to send the relevant events (dragstart, dragenter, dragleave, drop) to App to execute the handler logic, which will then adjust the DOM.

The only bigger issue is the "dragover" event, which fires incredibly often (could get buffered). In case a dragover-handler only uses trivial logic (e.g. no "this"), it could get moved to the main thread.

form.field.Text: hideLabel & labelPosition inline

the combination breaks right now.

it does not make sense anyway, so there should be check to throw an error if it does get combined at any point.

or setting the position to inline should set hideLabel to false and vice versa.

thoughts?

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.