blog.Resource

Archive:

News-Feeds:


RSS 2.0
RSS 0.91
RDF
ATOM 0.3
July 15, 2009

Finetuning Extbase

By: Sebastian Kurfürst

Since the merge of the new persistence layer, we have been working hard on fixing issues and implementing missing features! This includes ordering, automatic cache clearing, use of storage folders and a whole bunch of other bugfixes. Read on to find out more!

Ordering

Now, you can specify an ordering by

$query->setOrderings(
array('name' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING)
);

inside your Repository. You might wonder why you cannot just specify "ASC" and "DESC" but have to specify such a long constant: This is to decouple the queries being made from the persistence layer which is below (currently a MySQL database). We strive to make the migration to FLOW3 as smooth as possible, so ideally, lateron, you will not even notice that objects are now persisted in a Content Repository instead of a database!

Cache clearing

Now, in case you change a record, the cache of the page where the record resides is automatically cleared. This should be the expected behavior for most extensions. In case you need something more sophisticated, you can disable this via TypoScript and roll your own caching! Lateron, it'd be nice to have all this integrated into the TYPO3 Caching Framework, but this is not done yet (anybodyy wants to try out? Contact us!)

Storage folders are now used

Previously, records have been found only globally. Now, you can specify a storage folder either in the extension Content Element or in the page where you add the content element. In case both are empty, the current page is taken.

Bugfixes!

There have been a bunch of additional bugfixes which would only happen in more special circumstances, but thanks to the feedback from you, the community, we have been able to solve them.

Thanks!

I'd like to thank Xavier Perseguers, Nikolas Hagelstein, Frans van der Veen, Joerg Schoppet and everybody I forgot to mention :-) Your testing, problem descriptions, patches and solution ideas have been of really helpful!

Hopefully, some more people will try out Extbase and help us by telling what worked flawlessly and what problems you encountered.

Remember: Use Extbase and Fluid from SVN. We'll update the version integrated into TYPO3 core soon, but did not get around doing that yet.

Greets, and thanks for your continued support,
Sebastian


comments

comment #1
Gravatar: Sebastian Sebastian July 16, 2009 08:29
Thanks for the SVN tip!

IMO setOrdering() is a bad name, German readers see http://dict.leo.org/?lp=ende&from=fx3&search=ordering

Why not just setOrder()?


comment #2
Gravatar: Jonas Jonas July 16, 2009 11:33
I there any documentation on how the persistance layer integrates with TCE/TCA?

It woulb great if there would be some kind of migrationpath, which shows how to take the existing backend modules, and tables of an extension and replace the fronten piX with extbase implementation.

We would like to rewrite some extension with extbase, but keeping the same data structure.

comment #3
Gravatar: Bastian Waidelich Bastian Waidelich July 17, 2009 20:46
Hey Sebastian,

One issue: you write "Now, in case you change a record, the cache of the page where the record resides is automatically cleared".

Should read "Now, in case you change a record, the clearCacheCmd of the page where the record resides is automatically invoked" or something similar.

Check out the great article by Ron Hall: http://buzz.typo3.org/people/ron-hall/article/dont-wear-out-the-clear-cache-button/

Sorry, comments are closed for this post.