The TYPO3 Extbase Book—Interview with the Author

Categories: Development , Community Created by Luisa Faßbender
Happy people embracing the 3rd edition of the TYPO3 Extbase book
Michael Schams has been an active member of the TYPO3 Community for more than a decade now. In May 2019 he published the third edition of the TYPO3 Extbase book. Michael worked with Patrick Lobacher on previous editions of the book, but since Patrick moved on to new challenges, Michael took over full responsibility in 2018 and published a fully revised and updated edition this year. Luisa Faßbender held an interview with Michael to find out more about the book and how it was created.

(Luisa) Hi Michael! It’s so nice to meet you! How are you today?

(Michael) Hi Luisa. Thanks, I am very well—you know, it’s Friday afternoon and I look forward to enjoying a relaxed weekend.

(Luisa) Before getting into the topic of today's interview: We all know you've been really active in the TYPO3 Community for quite a while. But for those who don't know you: Would you mind telling us a little bit about yourself and how you got into TYPO3?

(Michael) I studied in Germany and I hold a master's degree in Computer Sciences. In 2008 I moved to Australia and have been living in Melbourne since then. The first TYPO3 version I worked with was version 3.x, more than 15 years ago. However, I did not start working with TYPO3 “professionally” until 2008-ish when I joined the company I am still working for today. I am an advocate for open-source technologies and besides my day-to-day job I write articles for technical journals, for example the “web & mobile developer”.

(Luisa) You published several other books like the TYPO3 CMS Certified Integrator Study Guide. What drives you to put so much time and energy into TYPO3 and the Community?

(Michael) TYPO3 is a great system and extremely powerful and flexible. However, you need the knowledge and experience to manage an application of this complexity. The TYPO3 Documentation Team does a fantastic job, but many people ask for resources and learning material beyond the official manuals. The TCCI book (TYPO3 CMS Certified Integrator), and in particular the TYPO3 Extbase book aim to fill this gap.

(Luisa) The third edition of the TYPO3 Extbase book is the first version you published without Patrick. How did that change things for you?

(Michael) I really enjoyed working with Patrick. His experience in more than 150  seminars, where he trained developers in Extbase and Fluid was very valuable. The structure of the Extbase book is based on his experience and this has proven very successful for many years. Therefore, I did not change this aspect. However, the previous edition of the book is based on TYPO3 v7 and had to be revised and updated. This workload, as well as the research, tests, etc. was now my responsibility alone — and I can tell you, that’s massive work (but also interesting).

(Luisa) Why do we even need Extbase? What would you say are the main advantages compared to Pi-Base i.e.?

(Michael) Extbase is a so-called object-oriented framework written in PHP. Frameworks let you streamline the development process by providing a basic structure, which reduces the amount of repetitive code. As a result, extensions can be built quickly and they are more stable and more secure compared to traditional software development methods. On top of that, Extbase follows the paradigm “convention over configuration”. Once a developer knows the conventions, he/she automatically knows class and method names, properties, where to find files and directories, etc. Following the convention makes an extension logical and easy to understand for other developers.

(Luisa) So... are you gonna be the next Extbase Evangelist? ;-)

(Michael) (Laughing!) No, not really, Luisa! Firstly, there are experts in the TYPO3 Community who know the Extbase internals much better than I do and who have much more experience with it. Secondly, while developing extensions with Extbase is pretty cool and straightforward, some functions can be implemented in a better way.

(Luisa) Can you elaborate on this a little more?

(Michael) Due to the domain-driven design concept (DDD) and the model-view-controller architecture (MVC), Extbase and Fluid are great solutions for frontend plugins and backend modules. However, for some simple or low-level tasks such as AJAX responses, the Extbase overhead can be overkill. The PSR-15 middleware provided by the TYPO3 core are good examples.

(Luisa) You mentioned research and testing before. How long does it take to come up with all the new content, proofread, publish etc.?

(Michael) Planning the “project” begun in mid 2018. When TYPO3 v9 LTS came out in October 2018, I started to research and test the new methods. It took several months before I handed over the manuscript to my proof-reader. Inge Bateman did a fantastic job: she has not only improved the quality of the content significantly, but she did the review in an incredible short amount of time.

Actually, everyone I approached in the last few months provided valuable feedback: core developers, experienced Extbase developers as well as Fluid experts.

(Luisa) What changes can readers expect? Which new aspects and new topics did you implement primarily?

(Michael) The previous edition of the TYPO3 Extbase book was based on TYPO3 v7. Many things have changed in TYPO3 v8 and v9 and the most important aspect for the new edition of the book was to make sure that all new techniques, methods, APIs are taken into account and the book follows best practises for TYPO3 v9 LTS. This includes clean code with PHP version 7.2, as well as a setup with PHP Composer for example. The third edition of the TYPO3 Extbase book also uses the TYPO3 Query Builder (Doctrine DBAL) and new annotations used in v9.

In addition, the reader learns how to develop a backend module that uses AJAX and RequireJS. This is a completely new chapter, as well as the chapter about security basics in TYPO3 extensions.

(Luisa) Your book covers the basics of Extbase and Fluid based extension development as well as more advanced topics: Who would you say is the book’s main target group?

(Michael) The first chapters of the book cover fundamentals. For example the basics of object-oriented programming in PHP and what DDD means. This is followed by practical explanations on how to set up a TYPO3 instance as a development environment using Composer. While these topics provide all the details required for beginners to get started, more advanced developers are likely more interested in the subsequent chapters.

(Luisa) So, the more you progress, the deeper you dive into the subject?

(Michael) That’s right. Each chapter builds on the previous chapter. The book demonstrates all steps that are required to develop a modern TYPO3 extension.  By following the tutorials in the book, learners complete a fully functional Extbase/Fluid extension. They can use what they learn to develop their own extensions.

(Luisa) The book features 19 comprehensive chapters. Did you ever consider splitting the content into two books?

(Michael) Oh, yes! I had to pull myself back a few times. There are so many interesting aspects which would be worth mentioning. I had to remind myself to not lose the focus and to concentrate on TYPO3 Extbase.

I also considered moving some content to a new book which would then allow me to go into even more detail, but then I would have never finished this book.

(Luisa) What are these other aspects and is this something you consider writing about in the future?

(Michael) The TYPO3 core offers many great APIs: the Mailer API, the Context API, user authentication, SEO and so on. The majority is well explained in the official documentation by the TYPO3 Documentation Team and the Core Team, but a practical learning book usually goes beyond a collection of references and “how-tos”.

(Luisa) Does the TYPO3 Extbase book compete against the official TYPO3 documentation?

(Michael) Definitely not. However, the existing resources about Extbase are not ideal to say at least. The book guides the reader through a process, step-by-step, chapter-by-chapter. A manual cannot and should not be so comprehensive and detailed.

(Luisa) What’s your personal favourite chapter in the book and why is that?

(Michael) All chapters are pretty awesome! (laughing). Seriously: I like to get new insights in a very practical way. Personally, I want to actually do something better sooner than later, instead of working through hundreds of pages of theoretical basics. As pointed out before, the first few chapters of the book focus on fundamentals. The more you progress through the book, the more practical it becomes. This means, you should follow every step by developing the extension as described in the book. I like when I can actually see that something evolves, when the first functions work and I understand how and why. This is what I tried to reflect in the book.

My personal favorite topic is the chapter about security basics in TYPO3 extensions though.

(Luisa) Security is obviously really important. Can you tell us why you added this chapter and what it covers?

(Michael) Security has always been a hot topic. Hacked websites, stolen sensitive data, and leaked confidential information have a huge impact and can result in significant financial and reputation loss. Looking at the security advisories published by the TYPO3 Security Team in the last few years, most of the vulnerabilities did not occur in the TYPO3 core but in a variety of TYPO3 extensions. The dedicated chapter "Security Basics" explains, how security processes work in the TYPO3 universe and what  typical SQL injection and cross-site scripting (XSS) vulnerabilities look like in an extension. If extension developers understand the background, they know how to avoid these vulnerabilities.

(Luisa) Can we expect a fourth edition of the book in the future?

(Michael) This is a good question, but too early to think about it, to be honest. TYPO3 v9 LTS will be supported until October 2021, so the content of the Extbase book as it stands now remains valid for another two years at least. TYPO3 v10 LTS is scheduled in April 2020 with the first sprint release (version 10.0) published just a few weeks ago. There are already some exciting new features and API changes in this sprint release, which could go into the Extbase book at one point.

Let's see what happens in the next 6 to 8 months, before I make any promises.

(Luisa) The last two questions: where can someone buy the TYPO3 Extbase book and in which languages is the book available?

(Michael) The TYPO3 Extbase book is available as an eBook at Leanpub (PDF, ePub, MOBI) and as a printed copy at Amazon. At the moment, the book is only available in English, but a German translation is currently in progress. However, no publishing date has been scheduled for the German version yet.

(Luisa) Thank you so much Michael. Not only for taking the time for this interview, but also for the insights of how the book was created and what it covers. I’m sure it will help many people to get started on extension development and to improve their programming skills. I wish you every success with the book.

(Michael) It was a pleasure to talk with you, Luisa. Thanks for the opportunity to present the book.

To find out more about the TYPO3 Extbase Book, go to https://www.extbase-book.org

Thanks to Content Team member Heather McNamee (Open Strategy Partners) who proofread this article.