4developers 2015: sylius - e-commerce framework for php - pawel jedrzejewski
Post on 28-Jul-2015
82 Views
Preview:
TRANSCRIPT
Sylius - E-Commerce for Symfony2
4Developers, 20th April 2015 in Warsaw, Poland
Paweł Jędrzejewski
Huge believer in Open Source
Creator of Sylius
Co-Founder
at
!
!!!Open Source is Awesome.
?What is Sylius?
SyliusE-Commerce Platform for PHP
197 Code contributors800,000+ Downloads
320+ Translatorsrunning in production
thousands of man-hours
Combined experience
?Why new e-commerce?
OLD PHP
MONOLITHIC
NOT Developer-friendlyUntesteble
hacky And pseudo-oop
?How does it look?
PROTOTYPE ALERT!
RESPONSIVE BY DEFAULT!
?What can you build using Sylius?
You need to innovate, in order to compete.
Innovation requires flexibility.
?What makes Sylius different?
sylius STACK
Sylius components
Sylius bundles
Sylius platform
Sylius components
Sylius bundles
Sylius platform
sylius STACK
components and bundles
sylius e-Commerce toolset
Product Cart Order
Shipping Taxation Payment
Inventory Currency Pricing
Promotion Money Addressing
sylius Generic toolset
Flow Settings Taxonomy
Resource Sequence Variation
Attribute Locale
Grid
Sylius platform
Core Web Interface
Symfony Doctrine
CMF Payum
Payum
PayumPaypal Express Checkout
Paypal Pro Checkout
Paypal Rest
Stripe.js
Stripe Checkout
Authorize.Net AIM
Be2Bill CreditCard
Be2Bill Onsite
Payex
PayumPaypal Express Checkout
Paypal Pro Checkout
Paypal Rest
Stripe.js
Stripe Checkout
Authorize.Net AIM
Be2Bill CreditCard
Be2Bill Onsite
Payex
Offline
Klarna Checkout
DineroMail
BitPay
Paydollar
PaylinkJustpay
TcomPayWay
Sagepay
Redsys
PayumPaypal Express Checkout
Paypal Pro Checkout
Paypal Rest
Stripe.js
Stripe Checkout
Authorize.Net AIM
Be2Bill CreditCard
Be2Bill Onsite
Payex
Offline
Klarna Checkout
DineroMail
BitPay
Paydollar
PaylinkJustpay
TcomPayWay
Sagepay
Redsys
2Checkout
Authorize.Net
Buckaroo
CardSave
Dummy
eWAY
First Data
GoCardless
Manual
Paypal Express Checkout
Paypal Pro Checkout
Paypal Rest
Stripe.js
Stripe Checkout
Authorize.Net AIM
Be2Bill CreditCard
Be2Bill Onsite
Payex
Offline
Klarna Checkout
DineroMail
BitPay
Paydollar
PaylinkJustpay
TcomPayWay
Sagepay
Redsys
2Checkout
Authorize.Net
Buckaroo
CardSave
Dummy
eWAY
First Data
GoCardless
Manual
Migs
Mollie
MultiSafepay
Netaxept (BBS)
Netbanx
Pacnet
PayFast
Payflow
PaymentExpress (DPS)
CLEAN CODE
• Decoupled architecture
• DRY, SOLID, KISS
• Testable code
• DependencyInjection and many other design patterns
Modern Foundation
• Symfony full-stack combined with tons of excellent libraries from the community
• Shares the platform with great projects like OroCRM, Akeneo PIM, Drupal, eZ Publish
• Built on the shoulders of the open source giants
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
Feature descriptions
Code quality
Compared to „old” solutions
!!!Show me the code!
<?php !namespace App\Bundle\CoreBundle\Entity; !use Doctrine\ORM\Mapping as ORM; use Sylius\Component\Core\Model\Product as BaseProduct; !/** * @ORM\Entity */ class Product extends BaseProduct { /** * @ORM\Column(type="decimal") */ private $fee; ! // Getters/setters. }
$ app/console do:sc:up —force
# app/config.yml
!
sylius_product:
classes:
product:
model: App\Bundle\CoreBundle\Entity\Product
+
<?php !namespace App\Bundle\CoreBundle\Form\Type; !use Sylius\Bundle\CoreBundle\Form\Type\ProductType as BaseProductType; use Symfony\Component\Form\FormBuilderInterface; !class ProductType extends BaseProductType { public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); ! $builder ->add('fee', 'percentage') ->remove('price') ; } }
ENJOY!
# app/config.yml
!
sylius_product:
classes:
product:
model: App\Bundle\CoreBundle\Entity\Product
form: App\Bundle\CoreBundle\Form\Type\ProductType
+
# app/config.yml
!
sylius_product:
classes:
product:
model: App\Bundle\CoreBundle\Entity\Product
controller: Your\Class
repository: Your\Class
form: App\Bundle\CoreBundle\Form\Type\ProductType
?How to get started?
Install SyliuS
$ composer create-project sylius/sylius -s dev
$ cd sylius
$ app/console sylius:install
$ composer create-project sylius/sylius-standard
or
State of the union Sylius
• Components used in production in very complex apps
• Platform used in many live projects, but requires a lot of work and stabilization
• Documentation, documentation, documentation
• Better community support
326 issues & 87 PRs… Good or bad?
@pjedrzejewski
@Sylius
@Lakion
pjedrzejewski.com
sylius.org
lakion.com
THANK YOU!
Image Creditshttps://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
https://www.flickr.com/photos/radekkolakowski/9107577859/
top related