Top Banner
toast.co.nz
40

StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Jan 23, 2018

Download

Technology

silverstripe
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Page 2: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Building SilverStripe modules to represent your companyDanaë Miller-Clendon

Page 3: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Who am I?

● SilverStripe developer for just over four years

● Currently work for Toast

● Developing with SilverStripe since ages ago

Page 4: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Building SilverStripe modules to represent your

company

Page 5: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Who is this for?

● Freelance developer making your own modules

● Developer working for a company

● Someone from a company

Page 6: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Presentation purpose

Making modules and slowly upgrading them is almost a given

for anyone working with SilverStripe.

● Add-Ons directory

● Open source

● GitHub issue tracking

● Community

Page 7: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Presentation overview

Choosing which style works best for you and your company

● Open Source vs Private

● Brand

● Maintenance and ongoing

development

Page 8: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Open Source

Page 9: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Open source modules

Benefits

● Available to the community

● Others can make suggestions

● Pull requests for

improvements and bug fixes

● Increase brand awareness with

good modules

Drawbacks

● Available to the community

● Others can make suggestions

● Pull requests may never come

● Bad modules can tarnish your

brand

Page 10: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Licensing

● How restrictive do you want to be?

● BSD License

● Use one that works for you and your company

silverstripe.org/software/bsd-license/

Page 11: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Maintenance

Page 12: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Maintenance

Page 13: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Semantic versioning

● Practical for even the simplest projects

● Push tags when you see fit

● Follow guidelines on semver.org

● Always make a major version change when modifying

database fields

Page 14: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Issue tracking

● Be thankful when you get an issue report

● They are helping you

● Be polite and friendly

● At the end of the day, you can ignore them

Page 15: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Issue tracking

Page 16: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Allowing contributions

● CONTRIBUTING.md file

● Smaller changes are easier to

automatically merge

● Larger pull requests require some

QA

docs.silverstripe.org/en/4/contributing/

Page 17: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

CI Tools

● Unit tests

● Scrutinizer / Travis

● Add-Ons rating

Page 18: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Private modules

Page 19: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Private modules

Benefits

● Can have very specific features to suit particular projects

● More control over the general direction of the project

Drawbacks

● No one else but you and your team can fix bugs

● Services need to be self-managed

● Less control over the general direction of the project

Page 20: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Licensing

● Can be more restrictive than open source

● Depending on your client, it may need

tweaking

● LGPL-3.0

● Other GNU General Public Licenses

opensource.org/licenses

Page 21: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Private modules

● Private repository● Access● Package manager

Structure

Page 22: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Private repository

● GitLab

● BitBucket

● Private GitHub

Page 23: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Satis

● Install Satis on your server

● Give access between Satis server and your private

repositories

● Poll for changes with Satis

● Add a reference in your composer.json to your Satis

website URL

blog.servergrove.com/2015/04/29/satis-building-composer-repository/

getcomposer.org/doc/articles/handling-private-packages-with-satis.md

Page 24: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Public or private?

Choose which method will work best

for your team, brand, and company.

Private modules for client-specific

functionality

Public modules to contribute to the

community :)

Page 25: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Brand

Page 26: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

VoiceConsider the language you use, how you present yourself, and how

colloquial you choose to be

Page 27: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Documentation

● Resolves issues before they are raised

● Professional look

● Regularly updated documentation makes for a

fantastic module

● Keep it lighthearted and friendly

● Tell and show your readers what to do

github.com/thejameskyle/documentation-handbook

Page 28: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Markdown/Linking within GitHub

● Cater your index page to all skill levels

● Go into detail in separate sections

● Use screenshots in CMS documentation, and code

snippets in user reference

github.com/thejameskyle/documentation-handbook

github.com/praxisnetau/silverware-iconsetfield

Page 29: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

API DocumentationAccurate, detailed, to-the-point

● Simple API’s can take advantage

of Markdown tables

● Automatic API reference

documentation works well for

more advanced modules

Page 30: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

API documentation examplesLever API

Good interface, specific examples

Page 31: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

API documentation examples

Page 32: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

API ReferenceResources

readme.io

swagger.io

contributor-covenant.org

github.com/thejameskyle/

documentation-handbook

Page 33: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

Documentation imagery

● ScreenToGif● Use icons and images● Screenshots for CMS documentation

Dedicated website

Brand in issue tracking and response

● Be helpful and polite● Assume the user has minimum experience

Extra additions

Page 34: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Working on modules

Page 35: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Module direction

● Who determines the direction of your modules?

● Take clients into consideration

Workflow

● Roadmaps

● Pivotal

● Agile workflow

Page 36: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Losing trackHow to avoid burying modules

Put aside time each week or month

to work on modules

Keep your in-progress modules

front-and-center.

Page 37: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Working with releases

● You can push as many tags as you like

● Mark releases as pre-release if they aren’t stable

● Don’t lock your dependencies down unless you need to

● Keep on top of your dependencies

help.github.com/articles/creating-releases/

Page 38: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

In conclusionLife happens.

Page 39: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

References

material.ioreadme.iogithub.com/thejameskyle/documentation-handbookgithub.comgitlab.comsemver.orgcontributor-covenant.org

Page 40: StripeCon New Zealand 2017 - Danae Miller-Clendon - Building SilverStripe modules to represent your company

toast.co.nz

Thanks!

Toast LtdLinda at Toast for the slide designMaterial.io for icons