+ All Categories
Home > Technology > BDD in Open Source

BDD in Open Source

Date post: 15-Jan-2015
Category:
Upload: pawel-jedrzejewski
View: 208 times
Download: 1 times
Share this document with a friend
Description:
My talk about Behavior Driven Development in case of an Open Source project - Sylius. Presented at London Behat Meetup.
Popular Tags:
40
BDD in Open Source Paweł Jędrzejewski Does it work for Open Source? What are the diferences to a commercial project? How does it afect the OSS community? Is it hard? Behat V3!
Transcript
Page 1: BDD in Open Source

BDD in Open SourcePaweł Jędrzejewski

Does it work for Open Source?

What are the diferences to a

commercial project?

How does it afect the OSS

community? Is it hard?

Behat V3!

Page 2: BDD in Open Source

Who am I?Paweł Jędrzejewski

Huge beliver in Open Source

Passionate user of Symfony, Behat, phpspec

Creator of Sylius

Page 3: BDD in Open Source

ŁÓDŹ, POLAND

Page 4: BDD in Open Source

WHAT IS SYLIUSE-Commerce framework for PHP

A set of PHP e-commerce components

A set of Symfony2 bundles

Symfony2 full-stack framework application providing fexible e-commerce platform

Page 5: BDD in Open Source

A bit of HistoryFrom the very beginning to now

Started as a set of bundles for E-Commerce

Sandbox application as a playground

Complete rewrite with Behat

Adopted phpspec

Components

Page 6: BDD in Open Source

Components vs. Bundles

Standa lone components for „raw” PHP

Save time and provide default e-commerce business logic

Integration layers for the components and Symfony2

Provide forms, Doctrine integration and anything Symfony-specifc

Page 7: BDD in Open Source

App vs. Bundles

All bundles already integrated together

Provides a comm on e-comm erce platform

Built on Symfony SE

Integration layers for the components and Symfony2

Provide forms, Doctrine integration and anything Symfony-specifc

Page 8: BDD in Open Source

StoryBDD + SpecBDDBehat + phpspec

Why?

Because Communication.Because Code Quality.

Page 9: BDD in Open Source
Page 10: BDD in Open Source

Does BDD work at all?For an Open Source project

BDD needs clear stakeholders

Agile methodology

vs.

Open Source... where is the customer?

The process is far from classic agile

Page 11: BDD in Open Source

The differencesOS vs. Client's project

Lead Developer, Core Team, Community

Emergent process

vs.

Client, Product Owner, Team

Agile process

Page 12: BDD in Open Source

Who is the Customer?People around the project

Lead Developer

Contributors

Developers who use Sylius

Merchants who use Sylius

Page 13: BDD in Open Source

Who writes the features?Who decides what is the right thing to

implement?

Most of the time, core team

Contributors

Feature Requesters

Bug Reporters

Page 14: BDD in Open Source

What is important?For an Open Source project

People=

Community=

Communication

Page 15: BDD in Open Source

CommunicationClear vision of what features are desired by community

To build a OSS community, you need people

People who talk to each other

People who communicate ideas, problems

People who speak diferent language

They can speak one language

Page 16: BDD in Open Source

OS compared to commercial projectThe diferences in communication

With a client's project, people most often communicate face-to-face

StoryBDD is most efcient with face-to-face communication

In OS, you talk through github, twitter, e-mails

Page 17: BDD in Open Source

BDD with BehatDrastically Improves the communication in OSS

We communicate using examples

Which are the acceptance criteria for our MVP

And which are executed and automatically verify everything is working as expected

Isn't it awesome?

Page 18: BDD in Open Source

Passing Business RequirementsClient requirements are passed to OS project

Every project is diferent

Every BUSINESS is diferent

But there are common requirements across e-commerce

Sylius users transform their client's user stories into Sylius features

Page 19: BDD in Open Source

The domain language is defined by stakeholdersOur is combined language of business and

developers

Sylius is a framework for developers

It is also used by non-technical store managers

The language is defned by the community

E-Commerce Developer = Business Aware Developer

We can be passionate about software, but we should be passionate about delivering value to the world

Page 20: BDD in Open Source
Page 21: BDD in Open Source

What is the Workflow?How a Pull Request gets merged

Starts with an idea, a problem or missing feature

RFC about adding it to core

Showing it by example, using Behat scenarios

Design phase with phpspec

Red Green Refactor

Page 22: BDD in Open Source

feature RequestsI would like to have this supported

ExpressionLanguage used in promotion rules

We want to defne more complex rules, easily

Page 23: BDD in Open Source

feature RequestsPromotion rules written with the

expression language

Quick overview of the Sylius promotions system

Page 24: BDD in Open Source

PROMOTION STRUCTURE

SUPER AWESOME PROMOTION

ACTION

ACTION

ACTION

RULE

RULE

Page 25: BDD in Open Source
Page 26: BDD in Open Source
Page 27: BDD in Open Source
Page 28: BDD in Open Source

CollaborationBetter communication = easier collaboration

BDD with Behat makes it easier to collaborate

Unifed language for communication

Functionality is easier to understand

Contributors can fnish the work started by others

Page 29: BDD in Open Source
Page 30: BDD in Open Source
Page 31: BDD in Open Source

DocumentationFor new people around the project

Behat scenarios are perfect documentation

Why?

Cause they are stories and examples

Page 32: BDD in Open Source

QuestionHow taxes work in Sylius?

New community member: How taxes work in Sylius? Can I apply taxes included in price?

Sylius user: Check features/ folder...

Page 33: BDD in Open Source
Page 34: BDD in Open Source

QuestionHow Sylius picks the available shipping methods?

If you want to know how we display the correct shipping methods for the customer shipping addres...

Look at the correct feature fle!

Page 35: BDD in Open Source
Page 36: BDD in Open Source

Behat v3Our experience as an early adopter

Behat 3.0.x is faster

Suites are awesome

Pararell execution will be even better

A bit confused about how to structure the contexts

Can't wait for PageObject extension

Page 37: BDD in Open Source

Learning CurveIntroducing new people to StoryBDD and SpecBDD

New contirbutors need to learn the tools we use, in order to satisfy the requirements

New users have more learning materials

It might discourage some people to contribute

Page 38: BDD in Open Source

SATISFACTIONSeeing people becoming better developers

It feels great to see people involved in the project becoming a better developers

Seeing how their career grows and how they become more mature programmers

Yes, this includes me

Page 39: BDD in Open Source

SummaryHow BDD works for Open Source?

Improves the communication around the project

Makes it easier to work out features desired by the users

Collaboration becomes a lot easier

Raises the entry barrier for new contributors

Raises the quality of code

Page 40: BDD in Open Source

Www.sylius.orgGithub.com/sylius

@pjedrzejewski

THANK YOUQuestions?


Recommended