Slide 1

Slide 1 text

Getting started with Sylius Paweł Jędrzejewski eZ International Days, 3rd June 2014 in Oslo, Norway

Slide 2

Slide 2 text

Who am I? Paweł Jędrzejewski Huge beliver in Open Source Creator of Sylius BDD evangelist !

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

ŁÓDŹ, POLAND

Slide 5

Slide 5 text

? What is most important for developer’s productivity?

Slide 6

Slide 6 text

Happiness!

Slide 7

Slide 7 text

Happiness!

Slide 8

Slide 8 text

A story about John THE PHP developer

Slide 9

Slide 9 text

JOHN’s applications on the outside

Slide 10

Slide 10 text

JOHN IS DEALING WITH that EVERY DAY

Slide 11

Slide 11 text

Have you heard about this new tool/ methodology called ABC? Yeah, I wish I could use it in my XYZ project, but it is not compatible or used.

Slide 12

Slide 12 text

? What is the answer?

Slide 13

Slide 13 text

Sylius Modern e-commerce for Symfony2

Slide 14

Slide 14 text

What is sylius • E-Commerce framework for PHP • Set of bundles for Symfony2 • Platform based on Symfony2

Slide 15

Slide 15 text

e-commerce framework for php • Collection of decoupled components • Usable with any PHP project • Common E-Commerce patterns and domain models implemented in „raw” PHP code • Loosely integrated with other libraries

Slide 16

Slide 16 text

Set of bundles for symfony2 • Standalone Symfony2 bundles • Every E-Commerce feature lives in a separate package available through Composer • Can be integrated into existing application • Bundles as integration layers for Symfony

Slide 17

Slide 17 text

e-commerce symfony2 app • Online-selling platform • Can be used as a base for project or „as is” • Integration with other Symfony2 app is possible and easy • Consists of two main bundles containing Core and Web interface

Slide 18

Slide 18 text

? How does it look?

Slide 19

Slide 19 text

administration interface

Slide 20

Slide 20 text

Work in progress

Slide 21

Slide 21 text

? What can you build using Sylius?

Slide 22

Slide 22 text

sommelier-prive.de

Slide 23

Slide 23 text

colorscience.com

Slide 24

Slide 24 text

artlantis.com

Slide 25

Slide 25 text

? What makes Sylius different?

Slide 26

Slide 26 text

PROPER OBJECT ORIENTED PHP • No singletons and static access all over the place • Testable code • Lack of magic • DependencyInjection and many other design patterns

Slide 27

Slide 27 text

vendors managed using composer • All Sylius components, bundles and distributions are available through Composer • Sylius uses Composer to manage its dependencies • No NIH allowed • A lot of community libraries

Slide 28

Slide 28 text

Symfony as framework • Sylius, just like eZ Publish, is built on top of full- stack Symfony2 • Based on Standard Edition, should be familiar for any Symfony developer • Does not reinvent the wheel and shares part of community

Slide 29

Slide 29 text

Doctrine as orm • No ActiveRecord • Fully featured ORM as the foundation for data storage • Whole data persistence hidden behind elegant interfaces • Potentially supports MongoDB and other platforms

Slide 30

Slide 30 text

Behavior DRIVEN DEVELOPMENT • StoryBDD with Behat maintains high level of communication quality among the community • We communicate using examples • Behat scenarios are executed as acceptance tests automatically on every change • SpecBDD using phpspec punishes us for any bad design decision • CodeQuality

Slide 31

Slide 31 text

Feature descriptions

Slide 32

Slide 32 text

Executed on travis-ci.org

Slide 33

Slide 33 text

Code quality

Slide 34

Slide 34 text

Compared to „old” solutions

Slide 35

Slide 35 text

? How to get started?

Slide 36

Slide 36 text

Require a single component $ composer require sylius/product:v0.10.0 setName(’T-Shirt’) ->setDescription(’Really cool t-shirt’) ;

Slide 37

Slide 37 text

Install symfony2 bundle $ composer require sylius/cart-bundle:v0.10.0 get(’sylius.cart_provider’)->getCart(); } } And follow the installation instructions from the documentation

Slide 38

Slide 38 text

DOCS.sylius.org

Slide 39

Slide 39 text

Install Sylius app $ composer create-project sylius/sylius -s dev $ cd sylius $ app/console sylius:install

Slide 40

Slide 40 text

components and bundles

Slide 41

Slide 41 text

Resource Layer • Lives on top of Doctrine • Extends and uses Doctrine Common Persistence interfaces • Contains basic interfaces, like TimestampableInterface, SoftDeleteableInterface etc. • Integrated through SyliusResourceBundle

Slide 42

Slide 42 text

Products Attributes and variations Options and Variants • Component and bundle for common entity Attributes handling • Processing of object variations using options • Product integrates both Attributes and Variants

Slide 43

Slide 43 text

Orders and Carts Sales and Shopping Cart • Cart is an Order with appropriate state „checkout” • Support of Adjustments for discounts and fees • Order items can contain any type of object or plain text, quantity and price

Slide 44

Slide 44 text

Other components and bundles We have few of them • Taxation with categorization and different calculators support • Complex shipping management with different shipping methods and cost calculators • Inventory tracking with backorders support • Promotions system with coupons, actions and custom rules support • Addresses management with geographical zones for precise shipping and taxation rates • Payum integration for payments

Slide 45

Slide 45 text

Okay, a bit more than „few” More fun • Workflows, checkouts, installation wizards and multistep actions • Pricing component with customizable price calculators (volume, regional, per custom group etc.) • Settings system for easy configuration via GUI • Taxonomies for categorization of products • Theming, Plugins, Reviews, Subscriptions, Multi-Channel (coming soon)

Slide 46

Slide 46 text

What about content management? Symfony CMF Integration • Very basic integration with the CMF • Simple content types and blocks • Big plans to take this integration even further

Slide 47

Slide 47 text

ez Publish + Sylius Can we work together?

Slide 48

Slide 48 text

translate.sylius.org

Slide 49

Slide 49 text

sylius.org

Slide 50

Slide 50 text

@pjedrzejewski @Sylius ! pjedrzejewski.com sylius.org THANK YOU!

Slide 51

Slide 51 text

Image Credits https://www.flickr.com/photos/ilikespoons/8395923694/ https://www.flickr.com/photos/kalexanderson/5421517469 https://www.flickr.com/photos/woolamaloo_gazette/12822529314 https://www.flickr.com/photos/dey/44559604 https://www.flickr.com/photos/suckamc/8474229421 https://www.flickr.com/photos/kwl/4247555680