All Projects → catberry → Catberry

catberry / Catberry

Licence: other
Catberry is an isomorphic framework for building universal front-end apps using components, Flux architecture and progressive rendering.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Catberry

Go Starter Kit
[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Stars: ✭ 2,855 (+260.03%)
Mutual labels:  universal, isomorphic, components
Nuxt.js
The Intuitive Vue(2) Framework
Stars: ✭ 38,986 (+4816.27%)
Mutual labels:  framework, universal, isomorphic
Mam mol
$mol - fastest reactive micro-modular compact flexible lazy ui web framework.
Stars: ✭ 385 (-51.45%)
Mutual labels:  framework, isomorphic, components
Danf
Danf is a Node.js full-stack isomorphic OOP framework allowing to code the same way on both client and server sides. It helps you to make deep architectures and handle asynchronous flows in order to help in producing scalable, maintainable, testable and performant applications.
Stars: ✭ 58 (-92.69%)
Mutual labels:  framework, universal, isomorphic
Awesome Nextjs
📔 📚 A curated list of awesome resources : books, videos, articles about using Next.js (A minimalistic framework for universal server-rendered React applications)
Stars: ✭ 6,812 (+759.02%)
Mutual labels:  framework, universal, isomorphic
Celestite
Beautifully reactive, server-side rendered Svelte apps w/ a Crystal backend
Stars: ✭ 185 (-76.67%)
Mutual labels:  framework, universal, isomorphic
Bem Core
BEM Core Library
Stars: ✭ 275 (-65.32%)
Mutual labels:  framework, components
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+1988.27%)
Mutual labels:  framework, components
Isomorphic Webpack
Abstracts universal consumption of application code base using webpack.
Stars: ✭ 294 (-62.93%)
Mutual labels:  universal, isomorphic
Lab
React UI component design tool
Stars: ✭ 349 (-55.99%)
Mutual labels:  framework, components
astro
Build fast websites, faster. 🚀🧑‍🚀✨
Stars: ✭ 11,024 (+1290.16%)
Mutual labels:  components, universal
Isomorphic React
A simple but powerful React application built on a standards-compliant back-end
Stars: ✭ 318 (-59.9%)
Mutual labels:  universal, isomorphic
Puzzle Js
⚡ Micro frontend framework for scalable and blazing fast websites.
Stars: ✭ 398 (-49.81%)
Mutual labels:  framework, isomorphic
Visualplus
🎨 The VisualPlus Framework (VPF) for WinForms allows you to rapidly deploy professional .NET applications with customizable components and controls.
Stars: ✭ 268 (-66.2%)
Mutual labels:  framework, components
Jackblog React
Jackblog react 版, 个人博客系统, 使用服务端渲染(Universal / Isomorphic), react, redux, react-router, react-bootstrap, immutablejs, redux-form等
Stars: ✭ 292 (-63.18%)
Mutual labels:  universal, isomorphic
Tonic
A Low Profile Component Framework. Stable, Minimal, Auditable, and Build-Tool-Free.
Stars: ✭ 265 (-66.58%)
Mutual labels:  framework, components
Rill
🗺 Universal router for web applications.
Stars: ✭ 541 (-31.78%)
Mutual labels:  universal, isomorphic
Hackernews
HackerNews clone built with Nuxt.js
Stars: ✭ 758 (-4.41%)
Mutual labels:  universal, isomorphic
Universal
Seed project for Angular Universal apps featuring Server-Side Rendering (SSR), Webpack, CLI scaffolding, dev/prod modes, AoT compilation, HMR, SCSS compilation, lazy loading, config, cache, i18n, SEO, and TSLint/codelyzer
Stars: ✭ 669 (-15.64%)
Mutual labels:  universal, isomorphic
react-ssr-spa
Server side rendered single page app using reactjs official libraries.
Stars: ✭ 30 (-96.22%)
Mutual labels:  isomorphic, universal

Catberry

Build Status codecov.io Gitter

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 {

	/**
	 * Creates a new instance of the "CoolComponent" component.
	 * @param {ServiceLocator} locator The service locator for resolving dependencies.
	 */
	constructor(locator) {
		// you can resolve any dependency from the locator.
	}

	/**
	 * Gets data for the template.
	 * This method is optional.
	 * @returns {Promise<Object>|Object|null|undefined} Data for the template.
	 */
	render() {
		return this.$context.getStoreData();
	}

	/**
	 * Returns event binding settings for the component.
	 * This method is optional.
	 * @returns {Promise<Object>|Object|null|undefined} Binding settings.
	 */
	bind() {
		return {
			// CSS selector
			'.clickable': () => window.alert('Ouch!');
		}
	}

	/**
	 * Cleans up everything that has NOT been set by .bind() method.
	 * This method is optional.
	 * @returns {Promise|undefined} Promise of nothing.
	 */
	unbind() {
		// nothing to do here we have used bind properly
	}
}

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 {
	/**
	 * Creates a new instance of the "CoolStore" store.
	 * @param {ServiceLocator} locator The service locator for resolving dependencies.
	 */
	constructor(locator) {

		/**
		 * Current universal HTTP request for environment-independent requests.
		 * @type {UHR}
		 * @private
		 */
		this._uhr = locator.resolve('uhr');

		/**
		 * Current lifetime of data (in milliseconds) that is returned by this store.
		 * @type {number} Lifetime in milliseconds.
		 */
		this.$lifetime = 60000;
	}

	/**
	 * Loads data from a remote source.
	 * @returns {Promise<Object>|Object|null|undefined} Loaded data.
	 */
	load() {
		// Here you can do any HTTP requests using this._uhr.
		// Please read details here https://github.com/catberry/catberry-uhr.
	}

	/**
	 * Handles an action named "some-action" from any component or store.
	 * @returns {Promise<Object>|Object|null|undefined} Response to the component/store.
	 */
	handleSomeAction() {
		// Here you can call this.$context.changed() if you're sure'
		// that the remote data on the server has been changed.
		// You can additionally have many handle methods for other actions.
	};
}

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 [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].