[TYPO3-mvc] Discussion: Storage Backend not compatible to DBAL
Jochen Rau
jochen.rau at typoplanet.de
Thu Nov 19 10:16:18 CET 2009
Hi.
There is an open issue "Typo3DBBackend.php not compatible to DBAL" on forge.
http://forge.typo3.org/issues/show/5374
I cite my comment on Steffen Ritters proposal here to get a broader
discussion about how to solve that issue:
-- snip 8< --------------
Extbase does not fully support DBAL features ATM. This is because there
are two contrary ways to implement support for different storage backends:
1. providing a multi-purpose Typo3DbBackend taking DBAL as an other
layer below.
2. implementing the differences in parsing the QueryObjectModel in a
slim storage backend for each backend deriving common functionality from
an abstract storage backend.
I definitely prefer the latter way. In this case the hierarchy could be
as follow:
StorageBackendInterface
- AbstractStorageBackend <- some common functionality
- AbstractAnsiSqlBackend <- does most of the parsing
- MySqlBackend
- OracleBackend <- very slim
- PostgresBackend
- AbstractFileBackend
- CsvBackend
- XmlBackend
IMHO the second way has several advantages:
- small pieces of code to be optimized
- separated responsibilities makes it easy to understand the functionality
- easily plugged together (a different storage backend for each class)
Of course, the easy and quick way would be to utilize exec_* (due to
lack of time). It would be great, if you could provide a patch for this
(or if you could dedicate your time to the second way).
--- snap 8< ----------
What's your opinion about that? Any other ideas?
Regards
Jochen
--
Every nit picked is a bug fixed
More information about the TYPO3-project-typo3v4mvc
mailing list