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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Best practises for project organization (when developing many SS projects)


Reply

391 Views

Avatar
vwd

7 October 2011 at 2:47pm Community Member, 159 Posts

Hi,

As the number of SilverStripe projects that we are creating grows, we're continually looking to improve the way we work so as to not repeat ourselves (DRY principle) and propagate improvements and changes from one project across to others.

Questions

  • What best practises do you follow and how do you organize your SilverStripe projects so as to maximize code reuse, minimize repetition?
  • Do you find that you work from a single curated SilverStripe project 'boilerplate' (ie collection of commonly used modules + page types)? And just re-theme per project?
  • Or multiple blueprints depending on project type?
  • If you have common code between projects, do you prefer to create modules or widgets from them (if significant enough to warrant), or do you tend to stick to plain PHP code 'libraries'?
  • What development environment/setup do you use?

What we've been doing lately

  • We've been using a single SS project 'boilerplate' (collection of commonly used modules + page types) which we use across projects. (Not all page types are used in all projects.)
  • We pull in the blueprint using [url=http://mercurial.selenic.com/wiki/Subrepository]hg subrepositories[/url] (similar to [url=piston.rubyforge.org/]Piston[/url] and [url=http://svnbook.red-bean.com/en/1.0/ch07s03.html]svn:externals[/url]) and nest a further subrepository for each new project's theme
  • Improvements, changes and new page types to boilerplate are pushed upstream to the 'boilerplate' repository
  • So far we've only been saving common code as PHP 'libraries'
  • We use Netbeans, hg, transitioning to [url=compass-style.org/]Compass/Sass[/url] (not the [url=http://www.silverstripe.org/compass-module]SS-Compass module[/url])

Can you see any ways in which we can work smarter & improve our development process & speed?

Interested in hearing your views.

Thanks.
VWD.