[entity] introduce a new 'adapters' registry
This changeset introduces the notion in adapters (as in Zope Component Architecture)
in a cubicweb way, eg using a specific registry of appobjects.
This allows nicer code structure, by avoid clutering entity classes and moving
code usually specific to a place of the ui (or something else) together with the
code that use the interface.
We don't use actual interface anymore, they are implied by adapters (which
may be abstract), whose reg id is an interface name.
Appobjects that used to 'implements(IFace)' should now be rewritten by:
* coding an IFaceAdapter(EntityAdapter) defining (implementing if desired)
the interface, usually with __regid__ = 'IFace'
* use "adaptable('IFace')" as selector instead
Also, the implements_adapter_compat decorator eases backward compatibility
with adapter's methods that may still be found on entities implementing
the interface.
Notice that unlike ZCA, we don't support automatic adapters chain (yagni?).
All interfaces defined in cubicweb have been turned into adapters, also
some new ones have been introduced to cleanup Entity / AnyEntity classes
namespace. At the end, the pluggable mixins mecanism should disappear in
favor of adapters as well.
.. -*- coding: utf-8 -*-
A propos de ce site
===================
Cette application web est basée sur le système de gestion de connaissance CubicWeb de
Logilab_. CubicWeb est composé d'une base de données objet et d'un framework web. Il
permet de développer une application en définissant un ensemble d'entités et de
relations entre ces entités, ainsi que des vues présentant les données
sélectionnées depuis la base de données en utilisant un langage de requête
spécifique.
Cette application possède un schéma_ précis et peut être considérée comme un
exemple de site web sémantique, car elle n'est pas limitée à publier du HTML
mais peut également exporter les données en XML et d'autres formats.
Formats supportés: |microformats|_ - JSON_ - |rss|_ - |dublincore|_
.. |microformats| image:: /data/microformats-button.png
.. _microformats: http://microformats.org
.. _JSON: http://www.json.org/
.. |rss| image:: /data/rss-button.png
.. _rss: http://www.rssboard.org
.. |dublincore| image:: /data/dublincore-button.png
.. _dublincore: http://dublincore.org
.. _Logilab: http://www.logilab.fr/
.. _schéma: schema