Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spree Conf 2013

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Spree Conf 2013

Clarke and Gregor's slides from their talk at Spree Conf 2013.

Avatar for FreeRunning Tech

FreeRunning Tech

May 21, 2013

Other Decks in Technology

Transcript

  1. Us • Gregor MacDougall – 14+ Years programming – Passionate

    about high-quality software – Focused on providing value through code • Clarke Brunsdon – 14+ Years programming – Passionate about high-quality software – Focused on providing value through code
  2. Us (Cliff Note) • Gregor MacDougall – Has Long Hair

    – Drinks no beers • Clarke Brunsdon – Has short Hair – Drinks All The Beers
  3. New Client, Same Story • Usual Problems – 500 server

    errors – Falling sales – Angry customers – High Developer Turnover • Awesome business – Runs dozens of e-commerce sites selling goods and software worldwide. – Big revenue, awesome people. Damn, thats a lot of problems.
  4. Phase One: Investigation! • Do a company inventory – Technology

    – People – Business Practices • Get a good idea of what everyone does thats involved in the system • Verify every claim you hear
  5. When you have a hammer in your hand, everything looks

    like a nail • Someone taught them to code – This was arguably a bad idea.
  6. One big Re-Write == One Big Waste of Time •

    This is a real world company with 7 years of technical debt out there. • Even if the re-write was 100% guaranteed success (pause for laughter), there are countless business obligations and reasons to improve your existing systems.
  7. Retain Compatibility • A/B Test • Scalability test • “Special”

    Cases don't need to be handled by both systems right off the bat • Ability to revert back to the old code at the press of a button
  8. Step Two: Decisions! • Every feature in the old system:

    – Should we cut it? – Should we port it?
  9. When to cut functionality • No one uses it •

    Broken/incorrect information • There are better alternatives • Cut the functionality if it will not make or save more money that it would cost to port it
  10. Ways to port your software to Spree 1. Pull request

    back to core 2. Add Code to Your App 3. Extension in Spree
  11. When to write a pull-request to the main Spree repository

    • If this is something that many people would like to have • If the Spree core team agrees it is a good idea • If it won't break existing functionality
  12. When you MUST write a pull- request to the Spree

    repository • When the functionality is required through the entire process.
  13. Multi-Currency • Added in Spree 1.3 • Adds the concept

    of currencies all over the place (Spree::Order, Spree::Price, Spree::Variant) • If its caused you issues, blame gmacdougall.
  14. Ways to port your software to Spree 1. Pull request

    back to core 2. Add Code to Your App 3. Extension in spree
  15. When to add code to your app • Very specific

    to your domain • Interacts with non-spree models • “glue code” for your legacy application
  16. Ways to port your software to Spree 1. Add Code

    to Your App 2. Pull request back to core 3. Extension in Spree
  17. When to write an extension • It's not tied to

    your domain • Its code that some other people would want to use • Extracting to Spree environment simplifies the situation
  18. Spree_License_key • Delivers electronic “software activation keys” to customer once

    an order is complete. • Licenses are stored in the database • Can deliver different number of keys for different products • https://github.com/freerunningtechnologies/spree-license-key
  19. Other Extensions • spree_pre_order • spree_flexible_weight_rate • spree_multi_domain (*by spree

    team) • spree_custom_store_email • spree_ban_users • spree_kana
  20. • Short Answer – One of them doesn't work •

    Long answer – We need a better solution than monkey-patching classes
  21. GENERIC SPECIFIC ADVICE • Don't try and track “stable” branches.

    Fork a specific git ref and code against that. • Spree test cases fail. Learn which ones are failing BEFORE you start coding. • Talk to people. Talk to IRC. Talk to your co- workers. Make sure whatever you're doing isn't crazy. • Pry! Use pry. Seriously, use pry. •
  22. Questions?! • No way, Lunch time! • Come hang out

    with us and we can talk during lunch • We're also entertaining offers from people to buy us dinner...
  23. • Clarke Brunsdon – [email protected] – clarke in #spree on

    freenode IRC • Gregor MacDougall – [email protected] – gmacdougall in #spree on freenode IRC • http://www.freerunningtech.com/