DEVELOPERS!                         Y U No Open Source Ur Code?                                             http://ragecom...
SOMETHING ABOUT ME                            Craig Marvelley                          Developer @ Box UK                 ...
What is open source software?                                        http://ragecomics.memebase.com/Tuesday, 1 November 11
Hands up if you use open source software                                                       http://www.flickr.com/photos...
Hands up if your company uses                               open source software                                          ...
Hands up if you release open source software                                                         http://www.flickr.com/...
Hands up if your company releases open source                                   software                                  ...
A recent survey of 300 companies found:                Using Open Source Software            Don’t intend to use it       ...
A recent survey of 300 companies found:                  Willing to contribute software back to the community             ...
OPEN SOURCE AT BOX UK    •   Utilised in many of our products    •   Particularly the Amaxus ® Content Management System  ...
Avoid reinventing the wheel                                                 http://www.flickr.com/photos/rvignes/Tuesday, 1...
Quality is paramount                                                http://www.flickr.com/photos/zigdon/Tuesday, 1 November...
Make sure it’s accessible                                              http://www.flickr.com/photos/potatojunkie/Tuesday, 1...
Check the license suits the usage                                                    http://www.flickr.com/photos/ecastro/T...
THE TURNING POINTTuesday, 1 November 11
http://ragecomics.memebase.com/Tuesday, 1 November 11
OBSCURA    • PHP           component to perform thumbnailing    • Written             for PHP 5.3 - namespaces, autoloadin...
BOXUK-DI    • Amaxus   has an annotation-based dependency injection       container    • Uses           the Addendum libra...
“What if we open sourced them?”                                                  http://ragecomics.memebase.com/Tuesday, 1...
PRECEDENT                   • Zend            • Gradwell                   • Sensio   Labs   • openSky                   •...
GOING OPEN-SOURCE    • Hosted             the libraries on a company github account    • Redesigned            our ‘labs’ ...
Tuesday, 1 November 11
Feedback for ObscuraTuesday, 1 November 11
Feedback for boxuk-diTuesday, 1 November 11
“Lets do some more!”                                            http://ragecomics.memebase.com/Tuesday, 1 November 11
BOXUK-ROUTING    • Refactored             and extracted the routing system from Amaxus    • Slightly           different t...
DESCRIBR    • Component               to extract metadata from any file    • Wraps              php-reader, adding a plugin...
Bringing it all together                                               http://www.flickr.com/photos/pinksherbet/Tuesday, 1 ...
CODING STANDARDS    • We          had a defined coding standard    • It    was only written down; no way to enforce it    •...
DEPLOYMENT    • We          started using the libraries in live projects    • Git       isn’t ideal at dependency manageme...
The Future                                      http://www.flickr.com/photos/alejandroamador/Tuesday, 1 November 11
MORE OPEN SOURCE SOFTWARE    • Continue            to release PHP components    • Perhaps            contribute to the Sym...
SUMMING UP        Thanks to our open source experiment:    •   We have improved our code        quality                   ...
LESSONS LEARNED    • Remember YAGNI             - You Ain’t Gonna Need It    • If    refactoring existing code for release...
THANKS FOR LISTENING!                                 @craigmarvelley                             http://github.com/boxuk ...
Upcoming SlideShare
Loading in …5
×

Developers! Y U No Open Source Ur Code?

1,238 views
1,123 views

Published on

This is the slide deck from my PHPNW11 Unconference presentation on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,238
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Developers! Y U No Open Source Ur Code?

  1. 1. DEVELOPERS! Y U No Open Source Ur Code? http://ragecomics.memebase.com/Tuesday, 1 November 11
  2. 2. SOMETHING ABOUT ME Craig Marvelley Developer @ Box UK @craigmarvelley boxuk.com http://www.flickr.com/photos/jimmiehomeschoolmom/ http://www.flickr.com/photos/catatronic/Tuesday, 1 November 11
  3. 3. What is open source software? http://ragecomics.memebase.com/Tuesday, 1 November 11
  4. 4. Hands up if you use open source software http://www.flickr.com/photos/cheesy42/Tuesday, 1 November 11
  5. 5. Hands up if your company uses open source software http://www.flickr.com/photos/cheesy42/Tuesday, 1 November 11
  6. 6. Hands up if you release open source software http://www.flickr.com/photos/cheesy42/Tuesday, 1 November 11
  7. 7. Hands up if your company releases open source software http://www.flickr.com/photos/cheesy42/Tuesday, 1 November 11
  8. 8. A recent survey of 300 companies found: Using Open Source Software Don’t intend to use it Experimenting with it 28% 50% 22% Source: Accenture (2010): http://newsroom.accenture.com/article_display.cfm?article_id=5045Tuesday, 1 November 11
  9. 9. A recent survey of 300 companies found: Willing to contribute software back to the community Unwilling to contribute 29% 71% Source: Accenture (2010): http://newsroom.accenture.com/article_display.cfm?article_id=5045Tuesday, 1 November 11
  10. 10. OPEN SOURCE AT BOX UK • Utilised in many of our products • Particularly the Amaxus ® Content Management System • Amaxus is mainly written in PHP • Version 3 (2002): ~1,439,295 lines of PHP, 3% open source • Version 4 (2008): ~1,474,994 lines of PHP. ~81% open sourceTuesday, 1 November 11
  11. 11. Avoid reinventing the wheel http://www.flickr.com/photos/rvignes/Tuesday, 1 November 11
  12. 12. Quality is paramount http://www.flickr.com/photos/zigdon/Tuesday, 1 November 11
  13. 13. Make sure it’s accessible http://www.flickr.com/photos/potatojunkie/Tuesday, 1 November 11
  14. 14. Check the license suits the usage http://www.flickr.com/photos/ecastro/Tuesday, 1 November 11
  15. 15. THE TURNING POINTTuesday, 1 November 11
  16. 16. http://ragecomics.memebase.com/Tuesday, 1 November 11
  17. 17. OBSCURA • PHP component to perform thumbnailing • Written for PHP 5.3 - namespaces, autoloading, fully unit tested • Integrated back into Amaxus • Could we do another one?Tuesday, 1 November 11
  18. 18. BOXUK-DI • Amaxus has an annotation-based dependency injection container • Uses the Addendum library to parse doc-blocks • We refactored Amaxus to extract the DI code • Existing unit tests made sure we didn’t break anything • We now had two libraries on our handsTuesday, 1 November 11
  19. 19. “What if we open sourced them?” http://ragecomics.memebase.com/Tuesday, 1 November 11
  20. 20. PRECEDENT • Zend • Gradwell • Sensio Labs • openSky • Liip AG • knpLabsTuesday, 1 November 11
  21. 21. GOING OPEN-SOURCE • Hosted the libraries on a company github account • Redesigned our ‘labs’ page on boxuk.com • Authored content for the website to announce and document the libraries • Tweeted about it from the company accountTuesday, 1 November 11
  22. 22. Tuesday, 1 November 11
  23. 23. Feedback for ObscuraTuesday, 1 November 11
  24. 24. Feedback for boxuk-diTuesday, 1 November 11
  25. 25. “Lets do some more!” http://ragecomics.memebase.com/Tuesday, 1 November 11
  26. 26. BOXUK-ROUTING • Refactored and extracted the routing system from Amaxus • Slightly different to other routing components • Decreased coupling • Improved code quality • Improved test coverageTuesday, 1 November 11
  27. 27. DESCRIBR • Component to extract metadata from any file • Wraps php-reader, adding a plugin architecture • Encourages others to contribute plugins and functionality • First library to be used outside AmaxusTuesday, 1 November 11
  28. 28. Bringing it all together http://www.flickr.com/photos/pinksherbet/Tuesday, 1 November 11
  29. 29. CODING STANDARDS • We had a defined coding standard • It was only written down; no way to enforce it • Enter PHPCodesniffer • We wrote a set of sniffs to check code conformed to our standard • Integrated it into our Continuous Integration process • Open sourced the sniffs on GithubTuesday, 1 November 11
  30. 30. DEPLOYMENT • We started using the libraries in live projects • Git isn’t ideal at dependency management • Looked into using PEAR as a deployment mechanism • Wasn’t straightforward to begin with - documentation lacking • Eventually successful - and it was worth itTuesday, 1 November 11
  31. 31. The Future http://www.flickr.com/photos/alejandroamador/Tuesday, 1 November 11
  32. 32. MORE OPEN SOURCE SOFTWARE • Continue to release PHP components • Perhaps contribute to the Symfony CMF project • Release code for other languages?Tuesday, 1 November 11
  33. 33. SUMMING UP Thanks to our open source experiment: • We have improved our code quality • Our website has more content • We have an enforced coding • The company has increased standard visibility • We have a PEAR channel • Our developers can work on diverse, contained projects that • We have experience using Git make a difference and GithubTuesday, 1 November 11
  34. 34. LESSONS LEARNED • Remember YAGNI - You Ain’t Gonna Need It • If refactoring existing code for release, choose wisely • Use the right tools for the jobTuesday, 1 November 11
  35. 35. THANKS FOR LISTENING! @craigmarvelley http://github.com/boxuk http://joind.in/talk/view/3810Tuesday, 1 November 11

×