From 8e8d4a28c5b7dc5b35685fcabb846344e612a447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 27 Mar 2019 17:02:35 +0100 Subject: [PATCH] doc: add state management page, and update documentation --- README.md | 47 ++++++++++++++++++++++++----------------- doc/readme.md | 6 ++++++ doc/state_management.md | 8 +++++++ 3 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 doc/readme.md create mode 100644 doc/state_management.md diff --git a/README.md b/README.md index 22049513..978eccc2 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,47 @@ -**Warning!** - -This is currently a proof of concept, definitely not a production-ready codebase. -We hope to use it in the Odoo web client soon. - ---- - # 🦉 Odoo Web Lab 🦉 ## Overview -Odoo Web Lab (OWL) is a project to collect some useful, reusable, well designed -building block for building web applications. +Odoo Web Lab (OWL) is a project to collect some useful, reusable, (hopefully) +well designed building blocks for building web applications. -However, since this is the basis for the Odoo web client, we will not hesitate to design -the code here to better match the Odoo architecture/design principles. +However, since this is the basis for the Odoo web client, we will not hesitate +to design the code here to better match the Odoo architecture/design principles. + +This project is also a playground to experiment with some ideas related to web +technologies. Currently, this repository contains: -- some utility functions/classes -- an implementation/extension of the QWeb template engine that outputs a virtual - dom (using the snabbdom library) -- a Component class, which uses the QWeb engine as its underlying rendering - mechanism. The component class is designed to be declarative, with - asynchronous rendering. +1. **core** -In the future, this repository may includes other features. Here are some possible + - an implementation/extension of the QWeb template engine that outputs a virtual + dom (using the snabbdom library) + - a Component class, which uses the QWeb engine as its underlying rendering + mechanism. The component class is designed to be declarative, with + asynchronous rendering. + - some utility functions/classes + +2. **extras** + - a Store class and a connect function, to help manage the state of an application (like react-redux) + - a Registry: this is a simple key/store mapping + +In the future, this repository may includes other features. Here are some ideas: - a (frontend) router could be included. -- a store base class (as in the flux/redux architecture) +- basic infrastructure code for web views (form/list/kanban) +- a mechanism to aggregate/query/dispatch rpcs (a little bit like graphql) Note: the code is written in typescript. This does not mean that the main web client will ever be converted to typescript (even though I would really like it). +--- + +**Warning!** + +This is currently a proof of concept, not yet production-ready. + ## Main scripts To install every dependency needed to play with this code: diff --git a/doc/readme.md b/doc/readme.md new file mode 100644 index 00000000..ff14e8f8 --- /dev/null +++ b/doc/readme.md @@ -0,0 +1,6 @@ +# Odoo Web Lab Documentation + +- [Quick Start](quick_start.md) +- [Component](component.md) +- [QWeb](qweb.md) +- [State Management](state_management.md) diff --git a/doc/state_management.md b/doc/state_management.md new file mode 100644 index 00000000..fe57b32d --- /dev/null +++ b/doc/state_management.md @@ -0,0 +1,8 @@ +# OWL: State Management + +Managing the state in an application is not an easy task. Many different +architectures/designs/systems/... have been created. We propose here to use +the idea of a central store. + +- Store +- connect