Book Review: SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner’s Guide

Last month, Packt publishing published a book on Silverstripe by a new author on this field: Philipp Krenn. Though his skill set[i] shows a far wider spread than what I would expect from a Silverstripe enthusiast, the book shows that he is definitely not new to Silverstripe.

Krenn is currently finishing his double master in Software Engineering & Internet Computing and Information & Knowledge Management at the Vienna University, and his knowledge of programming concepts and theories shows; he smoothly guides the reader through the Silverstripe system and highlights its ORM features and clean object oriented structure.

The book does show some similarities to the official Silverstripe book by Ingo Schommer[ii] (I read the German version in 2009), in that it approaches the Silverstripe novice and explains the system in its entirety. Having worked with Silverstripe since 2007, this is off course superfluous for readers like me, but essential in a book of this kind, especially as it is only the second book available on Silverstripe.

The book consists of 10 chapters, with additional resources provided online[iii]. These include an appendix on how to install Silverstripe, an 11th chapter and all source code used in the book. With the first 5 chapters the reader is familiarized with Silverstripe, as well as with the sample website which is extended on through the book. The sample website is a website for a imaginary bar.

The Model-View-Controller concept (MVC) is introduced by looking at themes (View) in chapter 2, describing the Silverstripe Controller in chapter 3, and looking at the Model and Silverstripe’s ORM feature in chapter 4. While it seems like a lot to roughly spend half of the book on introducing Silverstripe, when reading it doesn’t feel as if shorter would do, as important topics are introduced along the core concepts. Thus, having read the first 5 chapters, the reader has also been thoroughly presented to topics such as customizing the CMS, debugging/performance optimization, error handling/logging, deployment, and Silverstripe-specific SEO knowledge.

In the remainder of the book, additional important concepts are presented. This includes the previously barely documented Short Codes, but off course also an explication of how code can be reused by developing widgets and modules. Modules are lined out by walking the reader through a reusable image gallery.

Furthermore, quite some space is dedicated to user input by dealing with advanced forms with server side and client side validation, emailing submissions as well as storing them into the database. The book is concluded with a chapter on using Silverstripe’s internationalization features to easily translate all aspects of a site into all possible languages.

I like how Krenn didn’t delve in to the fallacy, many code authors do, of providing too much code in the book. He only highlights what’s essential (and walks the reader through new steps), and avoids code where it’s unnecessary, relying on that readers have access to the code online. Furthermore he doesn’t loose one second discussing general concepts as JavaScript and CSS development as these should (and can) surely be learned elsewhere. He only applies these when needed.

More than once he restrains from using pre-built modules and goes back to using plain PHP code and non-Silverstripe JavaScript libraries, to once again demonstrate how easy Silverstripe plays with other technologies, and that e.g. implementing a Facebook stream or making AJAX requests is no rocket science, but barely a matter of a couple of lines of code. Furthermore he doesn’t forget to address general concerns as JavaScript and CSS combination as well as caching.

 

Thoughts

While I really liked Schommer’s book I feel that Krenn’s book touches some more general needs and considerations for building a site or a web application. Furthermore it comes in very handy that the book is only recently published, and contains up-to date information, as well as it introduces how to base a Silverstripe site purely on HTML5.

Of course, publishing a book on Silverstripe 2.4 is risky in a time when the community is so vividly anticipating Silverstripe 3. But this being said, Silverstripe 3 has not even reached alpha status, and my own expectations are that Silverstripe 3 won’t be production ready before early next year. That’s where Krenn’s book fills a gap, just now. Today there is no book on Silverstripe 2.4 available, and Silverstripe’s recently revamped online documentation[iv] still contains the same 5 tutorials it did years ago. This book is a handy up-to-date introduction to working with Silverstripe. Both for developers or technically savvy with no Silverstripe experience, but also for people having built a couple of Silverstripe sites, and who’d like some background knowledge and/or some best practice considerations.

 

Recommendation

If you’d like to learn about Silverstripe, or you’d like to improve your Silverstripe knowledge today, I’d recommend Krenn’s book over Schommer’s.

Foremost because of its recent publishing, and thus inclusion of 2.4 only features as partial caching and short codes, as well as up-to-date information on error handling and logging, and information on Silverstripe’s recent activities regarding structure changes.

But secondly also because of the website example built throughout the book, giving the reader an easy-to-adapt blueprint for whatever website he’s working on.

To get the best out of this book, I recommend at least experience with the basics of web development (HTML, CSS & JavaScript). Knowing the basics of Object Oriented programming would definitely be a plus as well. Beyond that, I believe that a committed reader, following the examples, could learn a whole lot about web development best practices, Object Oriented PHP, and not the least Silverstripe in particular by reading this book.

 

The book is available online here:
http://www.packtpub.com/silverstripe-2-4-module-extension-themes-and-widgets/book

 

 

Add comment

Comments

Comments are closed.