Interfaces
This page is dedicated to the dicussion over the implementation of storage engine interfaces. There are significant problems in regards to elegence of design and maintainability in the future.
Pros
- Acts as a buffer between the main code and the abstract storage engine. The interface would delegate its functions to the appropriete place in the storage engine. Later alterations/refactoring on the storage engine would not be so difficult as the interface would just have it's mapping changed.
- This draws from some areas of MVC, with the abstract storage engine the model, and the interface a controller. Alterations to module would just require controller changes and not every calls from all over the system.
Cons
- Suggested implementation too procedural and not pythonic.
Some idea about modularization:
MoinMoin/item/ __init__.py # class Item == generic stuff, plugin loader + proxy text.py # class Item implements text/* mimetype text_editor.py # class ItemEditor implements text/* mimetype editor text_moin_wiki.py # class Item implements text/moin-wiki mimetype text_moin_wiki_editor.py # class ItemEditor implements text/moin-wiki mimetype editor image.py # class Item implements image/* type MoinMoin/storage/ __init__.py # class Storage == generic stuff, plugin loader + proxy filesystem.py # class Storage == fs storage impl. mysql.py # class Storage == mysql storage impl. mercurial.py # class Storage == mercurial storage impl.