TYPO3 v5 project report: June 2008

Categories: Development Created by Robert Lemke
Our personal summer of code started with what you could call the heart of TYPO3: Persistence. But even apart from this central theme many more topics have been addressed last month; among them speed, security and the new package repository.

Persistence

So what's this persistence thing all about? In short, we are currently working on making content and - more specifically - domain objects survive the end of a script run. More in detail, we want to achieve the persistence of all domain objects - that is storing and retrieving them from a persistent memory - to be as transparent as possible for the application developer: Just create a "Customer" object and add it to the "Customer Repository" and everything else will be taken of. Want to attach an address to the customer? Just create an "Address" object and add it to the Customer - no need to call a save method or submit an SQL UPDATE query.

The concept we have chosen for the persistence is extremely focused on the ease-of-use for the developer and is tailored to Domain-Driven Design (that means we have explicit support for Repositories and Aggregates). Here are a few goals we have:

  • Most information (the class schema) is determined automatically - no need to write an XML file defining the model
  • Type hints and hints on the model type (repository, entity, value object) are given through phpdoc annotations
  • TYPO3CR is the default persistence backend
  • Legacy (relational) databases can be mounted into the content repository as a virtual branch of the content tree

We teamed up with the developers from Saltation who will use FLOW3 in one of their next projects. We expect this to give a big boost to the development of FLOW3 because what's more real than a real project?

So, can it save?

A frequent question we get is (of course): Can it save stuff? Well, technically the content repository can now save and retrieve nodes and their properties and it can automatically create node types. Since last month we are now working on the missing link between the objects we want to persist and the content repository. We're making good progress but at this moment we can't save objects, no.

Security

Andi has spent a few weeks now on the concept for the FLOW3 Security Framework. For that he has analyzed and compared virtually any security framework he could come accross and extracted the coolest features from each of them. You'll already find many classes in the security package if you checkout the current version of FLOW3. And we'll soon start with the actual implementation.

What's so cool about the security framework is that it's using AOP to weave in security aspects into your code. In practice that means that you just don't care about security in your every day code - it's added afterwards through configuration!

Andi plans to give a talk about this new concept on the T3CON08, so watch out!

Speed

As you might have realized, FLOW3 has been (and actually still is) not what you call speedy. Especially in development context, when almost nothing is cached, it might take a few seconds to initialize FLOW3. This really kicks you out of the development flow, so I fired up my profiler again to see which parts were letting us wait all the time. Without much surprise it was mostly the reflection code for the AOP framework eating the processor power, so I created a new reflection service which allows for reusing and caching the reflection information.

The outcome of this profiling session: FLOW3 now runs 8 times faster. And there's still a lot we can optimize once the time has come for it.

Continuous Integration

As planned, Karsten spend a few more time on setting up a local CI server in our office (based on Hudson). Our MacMini (called Phoenix) now warns us about any failing commits some uncautious developer might have submitted and we can take immediate action to repair this (phone calls and text message spamming).

As part of this I made the CLI based test runner work again so we can run all TYPO3 v5 / FLOW3 tests from the command line and analyze the generated xml file. The solution we currently have is not really clean but it works for the time being.

F3PR and User Stories

Just recently we have kicked off our first User-Story-Scrum-Agile-Forge-based project. The goal is to develop the next generation package repository (aka TER3) for FLOW3 based packages.

During an initial meeting with Christopher, Tobias, Thomas and Karsten we defined the most important roles and features and started writing User Stories for the first sprint. We are very curious about how applying these project management concepts on a distributed Open Source project will work out but for now we are very optimistic.

If you're interested in how we plan to use Forge for our purposes then read the wiki page where we collect our ideas.

That's all?

Of course not. Last month we also improved the AOP framework and added powerful new features. We enhanced the caching mechanism, Bastian proposed a configuration syntax for the new routing features (aka RealURL on steroids), we refactored FLOW3's bootstrap and I (virtually) attended David Brühlmeier's final presentation of his DEV3 master thesis.

Next Steps

Persistence will stay our main topic in July. We really want that getting done. In parallel we'll be working on the loose ends which need to be fixed for using FLOW3 in a real world project and Andi will start with the implementation of the security framework. The F3PR team will be working mostly on the implementation of the Package Manager. And in a few minutes Karsten and I will leave for getting to the T3UNI France in Annecy.

Thanks to all who contributed to the development of TYPO3 last month by writing code or giving great hints! We appreciate your comments and ideas in our TYPO3 v5 mailing list.