Catberry
What the cat is that?
Catberry was developed to help create "isomorphic/Universal" Web applications.
Long story short, isomorphic/universal applications are apps that use the same codebase on both the server and client environments to render what the client would see as a "Single Page Application".
TLDR;
Install Catberry CLI using following command:
npm install -g catberry-cli
Use Catberry CLI to create an empty project with Handlebars support like this:
catberry init empty-handlebars
Or an example application that works using GitHub API:
catberry init example
Also, you can get a list of all templates:
catberry init ?
Useful links
Why should I use that?
Architecture
Rendering
For more details please proceed to Catberry Documentation.
Typical Cat-component example
'use strict';
class CoolComponent {
constructor(locator) {
}
render() {
return this.$context.getStoreData();
}
bind() {
return {
'.clickable': () => window.alert('Ouch!');
}
}
unbind() {
}
}
module.exports = Some;
The component is used as a custom tag:
<cat-cool id="unique-value" cat-store="group/CoolStore"></cat-cool>
Typical Store example
'use strict';
class CoolStore {
constructor(locator) {
this._uhr = locator.resolve('uhr');
this.$lifetime = 60000;
}
load() {
}
handleSomeAction() {
};
}
module.exports = Some;
Browser Support
While Catberry is capable of rendering pages for any browser on the server, due to the use of certain HTML5 features, like the History API, only partial support of old browsers is possible for the client-side JavaScript application.
The main goal of the Catberry Framework is to use the full power of new technologies and provide a user with the best possible experience.
In fact, a user gets an HTML page from the server only once and all the rest of the time the whole page is changing in a browser receiving only pure data from API service(s) used with the application.
Thanks to Catberry's progressive rendering engine, user receives a page from the server component by component as fast as each component renders its template not waiting for the whole page is built.
Catberry supports 2 last versions of modern browsers and IE 11. It depends on Babel babel-preset-env preset which config you can override putting a .babelrc
file in your project.
Contributing
There are a lot of ways to contribute into Catberry:
Denis Rechkunov denis.rechkunov@gmail.com