Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

xeraa/silverstripe-book

Repository files navigation

SilverStripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide

Create smashing SilverStripe applications by extending modules, creating themes, and adding widgets: http://www.packtpub.com/silverstripe-2-4-module-extension-themes-and-widgets/book

  • The first and only book that focuses on extending SilverStripe sites
  • Step-by-step instructions covering everything you need to know for getting started with making the most of the core functionality, developing modules, creating themes, and adding widgets
  • Build a fun, real-world example application without breaking a sweat
  • Reviewed by Sigurd Magnusson, co-founder of SilverStripe, and Ingo Schommer, development manager at SilverStripe
  • High level overview: http://prezi.com/i9olt1s7muif/silverstripe-24-module-extension-themes-and-widgets-beginners-guide/

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in the book (maybe a mistake in the text or the code) we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by creating a ticket at https://github.com/xeraa/silverstripe-book/issues. Any existing errata can be viewed at https://github.com/xeraa/silverstripe-book/wiki.

Important change in chapter 6: The Facebook feed widget code in chapter-6/ now requires an access_token due to an API change on Facebook's side. Please use the code on Github, the one in the book won't work!

Addon Chapters

To keep the book mean and lean (while also sticking to the original price tag), two chapters are only available as downloads:

  • Chapter 10 "Creating an Application": Please note that this has been changed to chapter 11 by the publisher to avoid any holes in the printed book. However, it's intended to be chapter 10. The downloadable code follows the original order, so the code in the folder chapter-11/ is for the printed chapter 10. chapter-10/ is the code for the download chapter.
  • Appendix A "Installing SilverStripe"

Modules

The following modules based on the ones created in the book are available:

Author: Philipp Krenn

Additional information about the author can be found at http://xeraa.net.

The Book

HTML, CSS, JavaScript, PHP, databases, frameworks, CMS, and many other fast-evolving technologies make up modern web-development. How can you effectively create stunning results without being limited by the ease of your tools? That's where SilverStripe CMS comes into play.

SilverStripe, with its simple and intuitive design, is easy to work with and offers numerous customization opportunities. But understanding the options available and getting hands-on with the development techniques is not a piece of cake and certainly not a delightful experience if you're relying on tutorials and documentation available online.

Silverstripe 2.4 Module Extension, Themes, and Widgets: Beginner's Guide takes you through designing catchy and flexible templates, adding powerful features effortlessly, integrating everything into an intuitive backend for easy administration in a simple way, and implementing nifty features with minimal effort. From the most basic to complex forms, from simple to sophisticated pages, you'll learn how to get the most out of your SilverStripe application. SilverStripe keeps everything nice and simple, but if you need to, you can extend and customize every part of it. Graphic examples illustrate the general principle of operation, gradually introducing the finer details needed to get professional results. Common requirements such as image galleries, site search, and more can be reused or extended to fulfill your needs.

The author's experience in designing and developing SilverStripe projects enables him to share insights on creating professional web applications in a clear and friendly way.

You will start off with creating your own templates - covering the general layout, while also taking search engine optimization into consideration. Next, you will look at the logic driving your web application, and the database. Using these basic concepts, you will start building more advanced features. These include the integration of Google Maps, Twitter and Facebook, image galleries, the handling of user-supplied information, your own full-text search, and more. Finally, you'll even translate and internationalize your project. All of this can be easily achieved with SilverStripe.

All of this and quite a bit more is covered by Silverstripe 2.4 Module Extension, Themes and Widgets: Beginner's Guide. Besides general principles, the focus is on reusable code - getting your project started in no time.

A practical guide for extending SilverStripe applications with ease, describing real-life examples right from the start

What You Will Learn From This Book :

  • Convert general HTML and CSS files into SilverStripe templates to create magnificent themes
  • Create and extend different page types, both in terms of look and functionality
  • Enable your content editor to efficiently interact with your system, for instance, adding new images to the image gallery
  • Store user input in the database or send it via e-mail
  • Translate your page and internationalize it - think about the various date formats, for instance
  • Implement common tasks, including search functionality, integration of Google Maps or Facebook, and much more
  • Set up a toolset for common tasks (search functionality, Google Maps, and Facebook)
  • Develop powerful server-side scripts while catering for security and performance

Approach

Designed as a Beginner's Guide, this book takes basic ideas step-by-step to a higher level, and builds fully featured applications. Besides the raw programming, you will also be confronted with different approaches, showing you which solution is "right". The example project built throughout this book is also used for a live project, based on the needs of a real business. You will start with an idea for a project. From the initial design, via the basic implementation, to the final polishing - every single step is highlighted.

Who This Book Is Written For

If you are a SilverStripe developer and want to learn the nooks and crannies of developing fully-featured SilverStripe web applications with module extensions, themes, and widgets, then this book is for you. Building upon your knowledge of PHP, HTML, and CSS, this book will take you to the next level of SilverStripe development. The book assumes you have basic experience with SilverStripe.

The Code

The final code for each chapter is provided (and updated if required) in this repository. Download or fork it while you read the book and start experimenting! Add the required core files and modules (detailed description in the book), run /dev/build?flush=all and you should be good to go.

The License

Copyright (c) 2011, Philipp Krenn
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the authors nor the names of its contributors
      may be used to endorse or promote products derived from this
      software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.