CubicWeb - The Semantic Web is a construction game!#
Warning
Starting from CubicWeb version 4.0 all code related to generating html views has been moved to the Cube cubicweb_web.
If you want to migrate a project from 3.38 to 4.* while still using all the
html views you need to both install the cubicweb_web cube AND add it to
your dependencies and run add_cube('web')
.
cubicweb_web can be installed from pypi this way:
pip install cubicweb_web
We donât plan to maintain the features in cubicweb_web in the long run; we are moving to a full javascript frontend using both cubicweb_api (which exposes a HTTP API) and @cubicweb/client as a frontend javascript toolkit.
In the long run cubicweb_api will be merged inside of CubicWeb.
CubicWeb is a semantic web application framework, licensed under the LGPL, empowering developers to efficiently build web applications by reusing components (called cubes) and following the well known object-oriented design principles.
Main Features#
an engine driven by the explicit data model of the application,
a query language named RQL similar to W3Câs SPARQL,
a selection+view mechanism for semi-automatic XHTML/XML/JSON/text generation,
a library of reusable components (data model and views) that fulfill common needs,
the power and flexibility of the Python programming language,
the reliability of SQL databases, LDAP directories and Mercurial for storage backends.
Created in early 2000s from an R&D effort and still maintained, supporting 100,000s of daily visits at some production sites, CubicWeb is a proven end to end solution for semantic web application development promoting quality, reusability and efficiency.
First steps#
Cubicweb core principle#
Why cubicweb?
Cubes:
Registries:
Data-centric framework:
Routing#
CubicWeb offers two different ways of routing : one internal to CubicWeb and a one with the pyramid framework.
Principle:
cubicweb and pyramid
the CW request object
encapsulation of the CW request in the pyramid request
bw_compat and the options to use, fallback when CW doesnât find anything
CubicWeb routing:
Pyramid routing:
general principles
predicates
tweens
content negociation
Front development#
With Javascript / Typescript (using React):
general principle
how to install and integrate js tooling into CW
cwelements
rql browser
With Pyramid:
general integration with CubicWeb
example of usages with CW
With CubicWeb Views:
Facets
How to use javascript inside CW views
Customize CSS
RDF:
the RDF adaptator
RDFLib integration into CW
Data model and management#
Data in CubicWeb:
Data Import:
massive store
Security#
Security:
Permissions management with Pyramid
Migrate your schema#
Each time the schema is updated, two action are needed : update the underlying tables and update the corresponding data.
Migrations:
Debug script migration
Cubicweb configuration files#
Base configuration:
Advanced configuration:
Common Web application tools#
Test
Pyramid
Caching
Internationalization
Full text indexation
Development#
Command line tool:
Performances:
Debugging:
Command line options for debugging
Debugging configuration directly in the code
Pyramid debug toolbar
Debug channels
Good practices:
tox
check-manifest
mypy
flake8 et black
CI:
Gitlab-ci integration
System administration#
Deployment:
Administration:
Sources configuration
Backup
CubicWebâs ecosystem#
CubicWeb is based on different libraries, in which you may be interested:
How to contribute#
See CONTRIBUTING.rst.
Chat on the matrix room #cubicweb:matrix.logilab.org
Weekly video meeting every Tuesday at 2PM (Europe/Paris). The link is shared in the matrix room
Discover on the blog
Contribute on the forge
Find published python modules on pypi
Find published npm modules on npm