Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

 

Getting stuff done with SilverStripe

Ramon Kupper is the founder and managing director of pixeltricks GmbH, the german company behind...

Comments 2

by Ramon Kupper

Posted 29 February 2012

Read post

Ramon Kupper is the founder and managing director of pixeltricks GmbH, the german company behind the eCommerce module SilverCart. He has a degree in computer science and is passionate about eCommerce and content management. His table soccer gatling technique is vicious and fortunately nobody has been hurt so far.

When Borland released Delphi in 1995, they were among the first to adapt the new paradigm of Rapid Application Development (RAD). I was still an apprentice in my second year, but I recall that the general opinion was that - with the given productivity boost and the visual programming style - very soon programmers would be obsolete. They were all wrong. So wrong.

It took about another 10 years until frameworks for PHP began to gain momentum and some of them are still far from enabling real rapid application development.

When dealing with PHP frameworks, a lot of buzzwords float around and there are also a lot of attempts to compare the features in order to declare a winning framework. As if you could choose the best meal by just comparing the ingredients. Don‘t get me wrong - of course the quality of the ingredients does play an important role. But if you gave three famous chefs the exact same fixings, I would eat a banana sideways if they all came up with identical dishes. Even though modern frameworks all have OOP, ORM, MVC, DRY, KISS and many more cryptic acronyms on their feature list, the end result is quite different.

Instead of comparing features we should ask: will it help me to get stuff done, or will it just drain my energy slowly until I have too much invested to quit?

I think that getting stuff done is one of the things that matters most when you want to develop/create/achieve something meaningful. At the end of the day, only results matter.

A pretty impressive example of how much you can get done with SilverStripe is our eCommerce module SilverCart.

You have never heard about SilverCart? No problem, here is a quick rundown: We began to work on SilverCart in August 2010, when we sat together and planned the business logic with a UML diagram. Roland then began to convert our ideas to code with the knowledge of SilverStripe he had gained from Ingo's book. About three months later, we had a very basic but working eCommerce module for SilverStripe and in January 2011 we developed our first projects with it. Version 0.9 was then officially released under the LGPL license in March 2011.

Currently we are working on version 1.3 and it is growing permanently. Today, SilverCart consists of

  • 232 classes
  • 1062 methods
  • 47538 lines of code
  • 184 files

We have about 15 modules that enhance the basic functionality of SilverCart - modules for payment, marketing and invoicing. We even created a module-wizard, which puts together a custom download package with the modules you choose for your SilverCart installation and even allows automated installation. You can see it in action here.

Thanks to the underlying SilverStripe framework, we are more motivated with each module, each line of code we write, each line of documentation.

But what exactly are the features that we value most? What is really speeding up the development of SilverCart?

Data Model Management

It‘s so easy to add a new attribute or a new relation to an object, it almost feels like cheating. Having a customized data model that exactly matches the needs of the product range makes our clients lives so much easier. Inexperienced developers don't have to worry about SQL syntax and can query the database in a more intuitive fashion. Getting new developers up to speed quickly is a huge asset.

Scaffolding

Having the customized data model ready to run in the admin panel saves tons of work. Usually, a client comes up with a new attribute right before the deadline. Thanks to the proven scaffolding mechanisms, things like this can be done in almost no time and save heaps of time on a regular basis. Every now and then we are reaching the limits of the scaffolding mechanisms, but there is always the possibility to find a way around.

Architecture & update mechanisms

Using the almighty decorator pattern - a structural design pattern - updating even complex modules is as easy as falling off a log. Even heavy modifications to the core can be updated easily. We are able to keep all our SilverCart installations up-to-date without having to burn the midnight oil.

Consistency of database definition and business logic

Being able to rely on the consistency of database and business logic is a huge asset. Especially when you are moving projects from staging to production or installing new modules the famous „dev/build“ makes your life so much easier. If you have ever had a project where database definition and business logic were not in sync, you don‘t want to miss this feature.

Manifest

It saves a lot of energy when you don't have to link to new files in your project manually. You don't even need to keep track if you ever have to move a file. All you have to do is to add "?flush=all" and new or moved files are recognized instantly.

Development and debugging tools

Nothing can beat a fully fledged debugger. But on the other hand, not every webserver you run across has xdebug set up and in some cases it is not even possible. We sometimes do contract work for clients who don't have root access to their boxes. In situations like these, we don't want to miss the built in SilverStripe debugging tools. You can learn more about them here.

PHP Command Line Interface (CLI)

This is one of the most inconspicuous features. One of our clients, an online pharmacy, sells more than 300,000 products. Prices and availability are synched with a back-end system regularly. Using the commandline, you don't have to worry about things like "maximum script execution time". It just works and does not block precious webserver processes.

Synergies

Not exactly a built-in SilverStripe functionality, but by far the most powerful feature. You can combine other community modules like forum module, newsletter module or blog module along with SilverCart to create a unique shopping experience for your customers. With each additional module that is available for SilverStripe, all existing modules instantly become more precious. This makes SilverStripe greater than the sum of its parts.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Depending on the projects you work on, I assume that you do have a different perspective. What are the hidden SilverStripe features that boost your productivity?