Glossary

Extbase

The framework used to build custom TYPO3 extensions with data models of their own.

What Extbase is

Extbase is the framework used in TYPO3 to build extensions with data storage of their own. It follows the model, view, controller pattern: the model describes the data, the controller steers the flow, the view produces output.

The benefit is that a great deal follows on its own from a cleanly described data model: validation, form handling, database access and the connection to the backend.

The building blocks

A model describes a record as a PHP class with properties. A repository encapsulates access to it, which means all the queries. A controller receives requests, fetches data through the repository and hands it to a Fluid template.

At the start this separation feels like a lot of ceremony for little result. It pays off as soon as the extension grows, because every change has a clear place to go.

How it relates to the TCA

Extbase models need a counterpart in the database, and how TYPO3 presents those tables in the backend is governed by the TCA. The two have to match: a property in the model with no field in the table leads to errors that are hard to track down.

When something else fits better

Not every requirement needs a data model of its own. When content is maintained editorially and fits into pages and content elements, the standard route is usually the better one. Extbase earns its place where data needs a structure, relationships and an administration of its own.

Common questions

When is a custom Extbase extension worth it?

When custom data structures are involved that go beyond what content elements can represent: products with variants, events with registration, locations with opening hours, job adverts with an application form.

For pure presentation work, Extbase is too much apparatus. A custom content element built with TCA and Fluid is the leaner route then.

Is Extbase slow?

The reputation comes from earlier versions and from cases where the framework was used against its intent, for instance with very large data sets and no adapted queries.

For typical use, performance is not a concern. Where it is, individual queries can be optimised without giving up the model as a whole.

Terms used on this page

Custom data structures in play?

Tell us what needs managing. We will say whether an existing extension covers it or a custom one is the more honest route.