[TYPO3-dev] Better use pibase while everyone use extbase?

Jo Hasenau info at cybercraft.de
Mon Oct 6 15:02:25 CEST 2014


Am 04.10.2014 14:15, schrieb Daniel Siepmann:
> Hi everyone,
>
> why should I use extbase to develop extensions? Everyone says it's future
> proof.
> But why? Extbase get a lot more work and deprecation stuff than pibase.
> I think there were no changes to the old school way since years. But you
> have many issues in extbase and you need workaround.
> After some versions some things broke and work completely different.
>
> So why should I use extbase if I won't migrate the extension to TYPO3 Flow
> / Neos in the future?
> Additionally pibase is much faster as it isn't a full blown framework.

There is another option: Neither use extbase nor pibase but use the core 
API methods, which are available without any whatever-base.

Gridelements for example just uses one single flexform method which was 
cloned from pibase. No need for lists, page browsers or detail views 
there, no marker based replacements, which is why the class does not 
extend pibase anymore. Another (marketing) reason was that people 
complained GE being "old school" due to the fact that it was "built on 
pibase", which it actually never was.

Since most of the queries done in GE are performance critical but not 
very complicated, there was no need for an object oriented model based 
framework as well. Just fire some typo3_db methods and other API stuff 
and there you go. The rest can be done with your own classes and methods.

At the time extbase has been created one good reason for it was, that 
there was the need for a shift of the mindset from the TYPO3 CMS way of 
coding to the new concepts of FLOW/NEOS - The current problem with that 
idea is, that Extbase is a backport of a deprecated version of FLOW now 
and both of them are behaving differently.

So it depends on your use case and your goals.
My personal choice would be:

1. You need OO coding and want to code close to FLOW to be able to port 
your extensions to NEOS later on: Go for extbase
2. You need OO coding but don't care about FLOW or NEOS: Go for another 
OO-framework (but for compatibility reasons maybe use an existing 
extension if possible)
3. You don't need OO at all: Stick to the core API and your own code

And: Yes, I believe there are lots of use cases, where OO is a waste of 
time and resources. - Now start beating me ;-)

Cheers

Joey

-- 
Diversity:
Die Kunst zusammen unabhängig zu denken
The art of thinking independently together.
--
Facebook: https://www.facebook.com/johasenau
Twitter: http://twitter.com/bunnyfield
Xing: http://contact.cybercraft.de
TYPO3 cookbook (2nd edition): http://www.typo3experts.com



More information about the TYPO3-dev mailing list