[FLOW3-general] Migrating legacy data

Manuel Strausz tminus at bitmap.co.at
Tue Dec 1 17:55:13 CET 2009


Hello everyone,

I've been evaluating and dissecting FLOW3's codebase since about 2 
months now, and as I mentioned previously I'm pretty impressed with the 
clean structure of (most of :)) the code.

It seems great for starting a new project, even in this early state.
Now the only thing that really prevents me from trying to migrate some 
old projects in need of an overhaul is that I'm not quite sure about how 
to import and convert the existing data (which consists of plain old 
relational tables in MySql).

The main storage mechanism in place at the moment seems to be the 
TYPO3CR, which is implementing the JSR 283 specification as an object 
database layer, correct? Even if this database can be setup to run on 
MySql, I assume it will be difficult to map the old structure to the 
respositories structure.
Now I'm aware that a datadriven approach is inherently different from 
engaging the project from a DDD perspective. So how would I best go 
about converting an old project step-by-step?

My best guess is that I would first scrap the old datadriven design, and 
model the primary domain classes and aggregates. When they are ready, I 
would write a script that maps the applicable (old) relational data to 
appropriate objects, and then add them to the repository, which should 
take care of the rest.
But somehow this feels like I'm missing something. Is there any advice 
as to how approach this kind of transistory problem, or anything planned 
for the future that will ease the transition?
Or should I write my own kind of repository and re-use the old 
relational tables by using an appropriate datamapper?

It would be interesting to hear from others how they approached this 
situation, or what the best practices would be.

best regards,
Manuel


More information about the FLOW3-general mailing list