You are currently viewing “TYPO3 Extbase – Modern Extension Development for TYPO3” – A book review

“TYPO3 Extbase – Modern Extension Development for TYPO3” – A book review

Extbase is the programming framework of TYPO3. Together with with fluid, the templating engine of TYPO3, it is the base for developing extensions. This book gives you a comprehensive introduction to the basics of modern TYPO3 extension programming.

 
Before I take a deeper look into the book itsself, I want to mention that this is AFAIK the first book in the TYPO3 world, which was published using a self publishing platform. Patrick and Michael decided to go with Leanpub. You can find the e-book in various formats here: https://leanpub.com/typo3extbase-en. It is also available in german under the url https://leanpub.com/typo3extbase.
Printed version are also available from Amazon in english and german or your local bookstore.
But now let’s dive into the book:

Introductory Chapters

After an introduction, the second chapter looks back into the history of TYPO3 and describes the roots of extbase and fluid.
The second and third chapter introduce the reader to object oriented programming and domain driven design. These chapters are some kind of high speed train to the topics. If these are new to you, you may like to read more in-depth books like „Implementing Domain Driven Design“ by Vaughn Vernon and / or “Learn PHP 7: Object Oriented Modular Programming“ by Steve Prettyman.

Let’s Code

The fifth chapter gives an overview over the structure of a typical TYPO3 extension, necessary files and their purpose. In the following chapter starts with the development of a TYPO3 extension, which will be extended throughout the book. The prupose of the extension is managing and displaying blogs and their articles. It starts with the creation of the domain model using the extension builder and hints for the preparation of the development environment. Chapter eight then goes through the basic CRUD process. CRUD is an abbreviation for „Create, Read, Update, Delete“ and reflects the lifecycle of an object in TYPO3.
The next ten pages are a very short introduction to the basics of Fluid and the rendering process of layouts, templates and partials. Whereas the following chapters are covering the details of the query manager, extension configuration with FlexForms and TypoScript. Chapter twelve is about validation and how to give valuable feedback to the users.

Diving into details

Chapter 13 is about the all the details of defining relations in database relations TYPO3. The Table Configuration Array (TCA) is the source, where all the relations and most validations for editing in the TYPO3 backend are defined. The CRUD process of the posts in the example extension is used to have an more in-depth look in the details. Followed by an update of the handling of 1:1 relations. The last section of the chapter introduces then the handling of ajax calls with Extbase and TypoScript.
One of the strength of TYPO3 Extbase and Fluid is, that the template engine can be easily extended. This is achieved with so called viewhelpers. TYPO3 bring already its own set, but this does not cover all use cases. How to write your own viewhelpers is covered in the next chapter.
On the one side multi-language handling is one of the strengths of TYPO3. On the other side it needs careful handling and testing in your extension, if it should work properly. This is the topic of chapter 15 before, the authors have a look on programming TYPO3 backend modules. The development of backend modules is also demonstrated using the blog extension.

Advanced topics and best practices

The next chapter covers the property mapper and it’s configuration. This topic has a central meaning because everything in extbase is treated as an object and many thing may come in as simple types. The property mapper takes care of the conversion between them.
Before the book closes with some pages of references, the authors shed light on best practices and advanced topics. The range is from using page types for rss feeds, over using stdWrap in the TypoScript setting to programming scheduler tasks. Much of this chapter is about file handling and the usage of the file abstraction layer.

Conclusion

The book “Modern Extension Development for TYPO3” gives you a very good, quick introduction into TYPO3 extension development using extbase and fluid. The real value is, that it explains (nearly) all topics in the context of a real world example, a blog. With this concept it makes it really easy to develop your first own extension alongside and transfer the knowledge to your code. There is one thing, which I miss a little bit; The answer to question: If I get stuck, where do I find more information and help? Some hints in one of the first chapters or the introduction would probably help many newcomers to TYPO3 extension development.
Credits
The photo for the feature image was taken by Jazmin Quaynor and published using the Creative Commons Zero License.

This Post Has One Comment

Leave a Reply