oldm/OldMan — pull request #40 by bcogrel (2014-12-06 14:33:03+00:00)
Title: Separation of the client and store concerns (major change)

This PR introduce an important separation of concerns between the client and the store part. **The two sides have now distinct models**. The main (mid-term) objective is to allow a client model to interact with multiple (heterogeneous) stores.

Because the models differ on the client and store sides, `Resource`s attribute values have to be converted when passing from one side to the other (e.g. during the `get()` and `save()` operations). These conversions are made by `ModelConverter`s that are defined for each pair client/store models.

The available converters only deal with direct mapping. The current client models are usually imported from the store models. In the future, more complex converters should be introduced for supporting better data integration scenarii.

See https://github.com/oldm/OldMan/blob/master/examples/quickstart.py for an example of the new API.

Main changes:
1. Each of them have their own `Model`s and `ModelManager`
2. The `ResourceManager` is now a `ClientResourceManager` and only concerns the client part. Some of its code have been delegated to the `ModelManager`.
3. `ModelConversionManager` and `ModelConverter` introduced.
4. `Resource` has now two sub-classes: `StoreResource` and `ClientResource`.
5. `Model` is extended by the `ClientModel` subclass. Models are now independent of the data store.
6. `ModelManager` (used by the `DataStore` and the `ClientResourceManager`) is extended by the `ClientModelManager` sub-class.