Slide 1

Slide 1 text

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!

Slide 2

Slide 2 text

Who am I? Paweł Jędrzejewski Huge beliver in Open Source Passionate user of Symfony, Behat, phpspec Creator of Sylius

Slide 3

Slide 3 text

ŁÓDŹ, POLAND

Slide 4

Slide 4 text

WHAT IS SYLIUS E-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

Slide 5

Slide 5 text

A bit of History From 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

Slide 6

Slide 6 text

Components vs. Bundles Standalone 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

Slide 7

Slide 7 text

App vs. Bundles All bundles already integrated together Provides a common e- commerce platform Built on Symfony SE Integration layers for the components and Symfony2 Provide forms, Doctrine integration and anything Symfony-specifc

Slide 8

Slide 8 text

StoryBDD + SpecBDD Behat + phpspec Why? Because Communication. Because Code Quality.

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

The differences OS vs. Client's project Lead Developer, Core Team, Community Emergent process vs. Client, Product Owner, Team Agile process

Slide 12

Slide 12 text

Who is the Customer? People around the project Lead Developer Contributors Developers who use Sylius Merchants who use Sylius

Slide 13

Slide 13 text

Who writes the features? Who decides what is the right thing to implement? Most of the time, core team Contributors Feature Requesters Bug Reporters

Slide 14

Slide 14 text

What is important? For an Open Source project People = Community = Communication

Slide 15

Slide 15 text

Communication Clear 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

Slide 16

Slide 16 text

OS compared to commercial project The 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

Slide 17

Slide 17 text

BDD with Behat Drastically 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?

Slide 18

Slide 18 text

Passing Business Requirements Client 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

Slide 19

Slide 19 text

The domain language is defined by stakeholders Our 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

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

feature Requests I would like to have this supported ExpressionLanguage used in promotion rules We want to defne more complex rules, easily

Slide 23

Slide 23 text

feature Requests Promotion rules written with the expression language Quick overview of the Sylius promotions system

Slide 24

Slide 24 text

PROMOTION STRUCTURE SUPER AWESOME PROMOTION ACTION ACTION ACTION RULE RULE

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Collaboration Better 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

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Documentation For new people around the project Behat scenarios are perfect documentation Why? Cause they are stories and examples

Slide 32

Slide 32 text

Question How taxes work in Sylius? New community member: How taxes work in Sylius? Can I apply taxes included in price? Sylius user: Check features/ folder...

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Question How 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!

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Behat v3 Our 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

Slide 37

Slide 37 text

Learning Curve Introducing 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

Slide 38

Slide 38 text

SATISFACTION Seeing 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

Slide 39

Slide 39 text

Summary How 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

Slide 40

Slide 40 text

Www.sylius.org Github.com/sylius @pjedrzejewski THANK YOU Questions?