Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Taking E-commerce Syliusly

Taking E-commerce Syliusly

Saša Stamenković

October 24, 2015
Tweet

More Decks by Saša Stamenković

Other Decks in Programming

Transcript

  1. Taking E-commerce Syliusly
    Symfony CAMP UA 2015

    View Slide

  2. Saša Stamenković
    @umpirsky

    View Slide

  3. View Slide

  4. KNP Labs

    View Slide

  5. View Slide

  6. E-commerce is hard

    View Slide

  7. E-commerce это
    хуёвая работа!

    View Slide

  8. Programming is hard

    View Slide

  9. We are Symfony developers
    And we love Symfony

    View Slide

  10. Why do you love Symfony?

    View Slide

  11. You will love Sylius for the same reasons
    And more...

    View Slide

  12. Everything is dedicated to provide
    exceptional developer experience.

    View Slide

  13. Sylius Stack
    Sylius platform
    Sylius bundles
    Sylius components

    View Slide

  14. General
    Resource
    Flow Taxonomy
    Settings Attribute
    Addressing Rbac
    Locale Variation
    Mailer
    Translation

    View Slide

  15. E-commerce
    Product Order
    Shipping Payment
    Promotion Inventory
    Taxation Money
    Currency
    Pricing
    Cart

    View Slide

  16. Using Sylius components
    $ composer require sylius/taxonomy

    View Slide

  17. Using Sylius bundles
    $ composer require sylius/taxonomy-bundle
    Enable it in kernel, configure:
    sylius_taxonomy:
    driver: doctrine/orm
    ...

    View Slide

  18. Developer friendly installer
    $ composer create-project sylius/sylius
    $ cd sylius
    $ php app/console sylius:install

    View Slide

  19. $ ./app/console sylius:install
    Installing Sylius...
    Step 1 of 4. Checking system requirements.
    +--------------------+----------------+
    | Issue | Recommendation |
    +--------------------+----------------+
    | short_open_tag | |
    | session.auto_start | |
    +--------------------+----------------+
    Success! Your system can run Sylius properly.
    Step 2 of 4. Setting up the database.
    Creating Sylius database for environment dev.
    4/4 [||||||||||||||||||||||||||||] 100%

    View Slide

  20. Easy breezy.

    View Slide

  21. Standing on the shoulder of giants

    View Slide

  22. ...and many non reinvented wheels!

    View Slide

  23. Full stack BDD

    View Slide

  24. Sylius\Component\Addressing\Matcher\ZoneMatcher
    45 ✔ returns null if there are no zones
    51 ✔ should match address by province
    68 ✔ should match address by province and scope
    85 ✔ should match address by country
    102 ✔ should match address by country and scope
    119 ✔ should match address for nested zones
    143 ✔ should match address for nested zones and scope
    167 ✔ should match address from province when many are found
    194 ✔ should match address from province when many are found by scope
    221 ✔ should match all zones when one zone for address is defined
    238 ✔ should match all zones by scope when one zone for address is defined

    View Slide

  25. Scenario: Placing the order
    Given I am logged in user
    And I added product "PHP Top" to cart
    And I go to the checkout start page
    And I fill in the shipping address to United Kingdom
    And I press "Continue"
    And I select the "DHL Express" radio button
    And I press "Continue"
    And I select the "Dummy" radio button
    And I press "Continue"
    When I click "Place order"
    Then I should be on the store homepage
    And I should see "Thank you for your order!"

    View Slide

  26. View Slide

  27. Code Quality

    View Slide

  28. View Slide

  29. View Slide

  30. Is it production ready?

    View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. 40M+ page views
    3000 orders/month
    30K+ products

    View Slide

  35. ★ Community
    ★ Clean code
    ★ BDD
    ★ Hard updates
    ★ Steep learning curve
    ★ Growing codebase

    View Slide

  36. Спасибо!
    @umpirsky

    View Slide