Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created July 6, 2010 09:09
Show Gist options
  • Save Sutto/465199 to your computer and use it in GitHub Desktop.
Save Sutto/465199 to your computer and use it in GitHub Desktop.

YouthTree Developer Overview

Organization Strategy

Currently, tools are documented typically in a relatively unorganized manner - Tim and I (Darcy) typically communicate over skype to discuss featueres and we have google docs with lists of items. We use a very ghetto method of marking progress (red means awaiting work, green is done) and to be honest it makes it hard to keep track of what is going on.

The current (to be implemented in the very near future) plan is to move towards Pivotal Tracker. Each project (YouthTree, BigHelpMob and TEDxPerth) will have a pivotal project, we'll have a project manager responsible for each one (their tasks primarily being checking / validating tasks, assigning items and following up progress).

Iterations will be typically two weeks long (given the fact it is primarily free time work) with points being based on the complexity of the task.

Code wise, everything will be open source (licensed under the MIT license) with an emphasis on write modular / plugin code. For example of this, see later sections.

Along with fortnightly iteratios, I'd like some sort of stand up (via skype / in person somehow) on a reasonably regular basis. This is something we'd need to talk about more in person, based on how much time each person has.

Standard Tools

For the sake of consistency, I like the notion of having the tools used across every project being the same / with a standard app base. At the moment / as of BigHelpMob, this stack is:

  • Ruby on Rails 3.0 for app stack
  • HAML for template
  • SASS (w/ Compass) for stylesheets - v3 formatted.
  • Coffeescript for Javascript
  • MySQL (although I'm willing to change for relational databases)
  • MongoDB for not relational databases (currently considering TEDxPerth)
  • jQuery as standard
  • Asset Packaging via Jammit

Also, applications should built on the following libraries for consistency sake:

I personally like the approach of using:

  • Gems for ruby code
  • Compass Plugins (via gems) for general CSS / SASS
  • Barista Plugins for javascript (with namespace support in Shuriken)

The idea being we can basically build extendable, well designed software in a consistent manner. Anything non-app-specific in terms of JS for example would be placed in the youthtree-js package (e.g. a Flickr-based gallery) and would be namespaced - e.g. YouthTree.Gallery.Flickr with standard entry methods. This means it's easy to write higher quality code.

I'm still undecided on test frameworks etc so I'd like to see what you guys like / would prefer.

Code Guidelines

Ruby

This should be documented better, but I typically:

  • Controllers should be lightweight
  • Gems whereever possible
  • Seperate items (e.g. PasswordReset model in BigHelpMob) where possible using tools.
  • Consistent code skills
  • Testing is important (I don't do enough)
  • Namespaces are good (but harder in Rails Apps) - Libraries should be namespaced.
  • Structured (e.g. in Rails, app/observers and app/mailers should be added and the like).

We may need to create something like beard for us in order to make this process simpler. Or, possibly, just a rails template?

For simplicity sake, bundler is to be used.

Coffeescript / Javascript

Files should either go in app/coffeescripts if app specific or in a barista plugin otherwise.

Namespaces are to be used with the naming convention: <Root>.<Group>.<CurrentIfNeeded>. See existing code for more details on this structure. To be honest, as long as it is consistent I'm happy. You should always be unobtrustive.

File name wise, we use underscored names. thus, there should be:

  • <namespace>.js - e.g. bhm.js OR <ns>/<ns>.js - bhm/bhm.js
  • <namespace>/<item>.js - e.g. youthtree/gallery.flickr.js.
  • Libraries / non-app specific js should be compiled into vendor/<library> - with jquery plugins etc being grouped there.
  • All items should be packaged accordingly with jammit.

CSS / SASS

HAML

I usually write helpers for anything non-trivial; these should be extracted into a youthtree-base gem (possibly merging youthtree-js).

Future Plans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment