I’m sure you’ve noticed it has been quiet as of recent… but behind the scenes, something awesome is brewing!
Not only have I’ve been busy with work, but a lot of things have been going on in regards on the next release of OS.js, which now has reached a point where I feel comfortable about discussing it
Please note that this article is a copy-paste of an issue on github, so it will be updated. You might find some comments interesting, so check it out.
My main goal of this release is to significantly reduce complexity, completely modularize, decrease build times, easier customization and application development.
All rewritten. Now uses modern ES features wherever possible (even on server-side).
Visually, not much has changed, but behind the scenes it’s all brand new.
No backward compability is planned. Also semantic versioning will now take place as of this release.
Overall design is now much simpler, much easier to customize and many orders of magnitude faster to build (and faster overall performance). The design now also embraces functional programming.
I’ll write more about this later.
Instead of having a monolithic repository, all the different components are now separated into their own (npm) pacakges. The base repository now only consists of a basic scaffold project that allows you to pick-and-choose (and replace) all modules.
@osjs/osjs- The base project
@osjs/cli- The CLI utilities and build scripts etc
@osjs/core- The Client core
@osjs/server- The Server core
@osjs/gui- GUI Components
@osjs/standard-theme- The default GUI theme
All packages comes in the form of
Bumped Node to version 8.
All features are now bootstrapped via Service Providers. You can use a number of default provided ones or write your own using a simple interface.
Bus-es for everyone! Pretty much all components of OS.js now uses a standard event interface.
Applications and UI
By default OS.js now uses Hyperapp (see #628).
Minimal — Hyperapp was born out of the attempt to do more with less. We have aggressively minimized the concepts you need to understand while remaining on par with what other frameworks can do.
Functional — Hyperapp’s design is inspired by The Elm Architecture. Create scalable browser-based applications using a functional paradigm. The twist is you don’t have to learn a new language.
Batteries-included — Out of the box, Hyperapp combines state management with a Virtual DOM engine that supports keyed updates & lifecycle events — all with no dependencies.
The overall design of the applications now have changed. You no longer need to extend base classes; just one function to bootstrap your application.
GUI Components are also provided via Hyperapp.
Your application state no longer lives “inside” the Application Class instance, so your data won’t leak.
Please note that Hyperapp is completely optional… you can still use your own favorite framework. And I would love it if people ported the components
You can now much easier tap into the server.
PHP Support has been dropped. WebSocket is now default.
CLI / Building
Still very similar, but the tasks have changed.
watch task now watches everything so you don’t need to run separate processes for everything.
NODE_ENV is now also respected, which in previous versions was controlled with command arguments.
More about this later.
WindowManagerhas been removed as the service providers now covers all the functionality.
- Window behavior can now be overridden per-instance or globally.
Schemehas been completely abandoned.
- You can now also customize the “root DOM element” of which OS.js lives inside. This allows for easy embedding or customized viewports.