getting started with sylius
DESCRIPTION
Introduction for the eZ Publish Community at eZ International Days in Oslo.TRANSCRIPT
![Page 1: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/1.jpg)
Getting started with Sylius Paweł Jędrzejewski
eZ International Days, 3rd June 2014 in Oslo, Norway
![Page 2: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/2.jpg)
Who am I?Paweł Jędrzejewski
Huge beliver in Open Source
Creator of Sylius
BDD evangelist
!
![Page 3: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/3.jpg)
![Page 4: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/4.jpg)
ŁÓDŹ, POLAND
![Page 5: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/5.jpg)
?What is most important for developer’s productivity?
![Page 6: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/6.jpg)
Happiness!
![Page 7: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/7.jpg)
Happiness!
![Page 8: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/8.jpg)
A story about John THE PHP developer
![Page 9: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/9.jpg)
JOHN’s applications on the outside
![Page 10: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/10.jpg)
JOHN IS DEALING WITH that EVERY DAY
![Page 11: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/11.jpg)
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.
![Page 12: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/12.jpg)
?What is the answer?
![Page 13: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/13.jpg)
SyliusModern e-commerce for Symfony2
![Page 14: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/14.jpg)
What is sylius
• E-Commerce framework for PHP
• Set of bundles for Symfony2
• Platform based on Symfony2
![Page 15: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/15.jpg)
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
![Page 16: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/16.jpg)
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
![Page 17: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/17.jpg)
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
![Page 18: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/18.jpg)
?How does it look?
![Page 19: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/19.jpg)
administration interface
![Page 20: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/20.jpg)
Work in progress
![Page 21: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/21.jpg)
?What can you build using Sylius?
![Page 25: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/25.jpg)
?What makes Sylius different?
![Page 26: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/26.jpg)
PROPER OBJECT ORIENTED PHP
• No singletons and static access all over the place
• Testable code
• Lack of magic
• DependencyInjection and many other design patterns
![Page 27: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/27.jpg)
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
![Page 28: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/28.jpg)
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
![Page 29: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/29.jpg)
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
![Page 30: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/30.jpg)
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
![Page 31: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/31.jpg)
Feature descriptions
![Page 33: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/33.jpg)
Code quality
![Page 34: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/34.jpg)
Compared to „old” solutions
![Page 35: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/35.jpg)
?How to get started?
![Page 36: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/36.jpg)
Require a single component
$ composer require sylius/product:v0.10.0
<?php
!$product = new Product();
!$product
->setName(’T-Shirt’)
->setDescription(’Really cool t-shirt’)
;
![Page 37: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/37.jpg)
Install symfony2 bundle$ composer require sylius/cart-bundle:v0.10.0
<?php
!class FooController extends Controller
{
public function barAction()
{
$cart = $this->get(’sylius.cart_provider’)->getCart();
}
}
And follow the installation instructions from the documentation
![Page 39: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/39.jpg)
Install Sylius app
$ composer create-project sylius/sylius -s dev
$ cd sylius
$ app/console sylius:install
![Page 40: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/40.jpg)
components and bundles
![Page 41: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/41.jpg)
Resource Layer
• Lives on top of Doctrine
• Extends and uses Doctrine Common Persistence interfaces
• Contains basic interfaces, like TimestampableInterface, SoftDeleteableInterface etc.
• Integrated through SyliusResourceBundle
![Page 42: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/42.jpg)
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
![Page 43: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/43.jpg)
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
![Page 44: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/44.jpg)
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
![Page 45: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/45.jpg)
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)
![Page 46: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/46.jpg)
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
![Page 47: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/47.jpg)
ez Publish + Sylius Can we work together?
![Page 50: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/50.jpg)
@pjedrzejewski
@Sylius
!
pjedrzejewski.com
sylius.org
THANK YOU!
![Page 51: Getting started with Sylius](https://reader034.vdocuments.us/reader034/viewer/2022051609/546e97dcaf79595d298b57f9/html5/thumbnails/51.jpg)
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