2. 2016 Spryker Systems GmbH / code.talks commerce 2016 2
About me
2
Fabian Wesner
CTO Spryker Systems
Twi-er
hAps://twiAer.com/FabianWesner
Spryker Techblog
hAps://tech.spryker.com
This presentaHon is available on Slideshare:
hAp://de.slideshare.net/FabianWesner
3. 2016 Spryker Systems GmbH / code.talks commerce 2016 3
MoHvaHon
Why do we need an (e)commerce framework?
4. Shop system usage
2016 Spryker Systems GmbH / code.talks commerce 2016 4
StaHsta
askhivemind
Although there are lots of shop systems, many merchants decide to
build their own? Why?
5. Standard Shop-‐soQware
2016 Spryker Systems GmbH / code.talks commerce 2016 5
Standard shop soQware offer many features that can be configured and
some hooks for extensions.
è Enough for the long tail of merchants.
But …
6. Framework vs Shop-‐soQware
2016 Spryker Systems GmbH / code.talks commerce 2016 6
Standardized shop soQware offer many features that can be configured
and some hooks for extensions.
è Enough for the long tail of merchants.
But that doesn’t fit for ambi1ous projects!
If your business model is not standardized, a standard shop so=ware does not help you!
7. The framework approach
2016 Spryker Systems GmbH / code.talks commerce 2016 7
Instead an out-‐of-‐the-‐box shop soQware ambiHous projects need a
framework, that op8mizes the developers’ produc8vity.
How?
8. Increased developer’s producHvity
2016 Spryker Systems GmbH / code.talks commerce 2016 8
✔ Clean and SOLID code
✔ Consistent soQware design
✔ Strict modularizaHon
✔ Generic set of features (like state machines)
✔ High performance and scalability
✔ DeterminisHc behavior
✔ Tested and measured code
✔ Avoidance of bad pracHces
Like full page cache, EAV, event-‐dispatcher, AOP, code configuraHon in database, dependency-‐
container magic, …
11. Performance & Scalability
2016 Spryker Systems GmbH / code.talks commerce 2016 11
Lightweight shop frontend Yves executes in 30 -‐ 100ms
• No full page cache needed!
• Redis and ElasHcsearch are easily scalable
• No direct access to SQL database from frontend (to avoid the boAleneck)
12. Code principles and quality
2016 Spryker Systems GmbH / code.talks commerce 2016 12
Spryker follows the
SOLID-‐ and
Packaging-‐Principles.
Spryker implements
Clean Code!
Project boilerplate
Core -‐ Bundles
14. First sketch
2016 Spryker Systems GmbH / code.talks commerce 2016 14
15. Architectural thinking
2016 Spryker Systems GmbH / code.talks commerce 2016 15
Single applica8on approach
• Runs on every laptop
• “Just a PHP applicaHon”
• Quick and simple deployment
Service approach
• High producHvity with large teams with big
projects
• Update, replace or extend parts of the
applicaHon
16. Architectural thinking
2016 Spryker Systems GmbH / code.talks commerce 2016 16
Single applica8on approach
• Runs on every laptop
• “Just a PHP applicaHon”
• Quick and simple deployment
Service approach
• High producHvity with large teams with big
projects
• Update, replace or extend parts of the
applicaHon
Not required/wanted:
• Technology zoo
• Overhead of distribuHon and asynchronous communicaHon
• MulHple database without transacHons and consistency
18. Modular ApplicaHon
2016 Spryker Systems GmbH / code.talks commerce 2016 18
Bundles which have a single responsibility with well-‐defined
relaHonships.
19. Each bundle consists of (up to) 4 layers
2016 Spryker Systems GmbH / code.talks commerce 2016 19
21. Each bundle has an internal API (~ Facade)
2016 Spryker Systems GmbH / code.talks commerce 2016 21
22. Bundle to Bundle communicaHon
2016 Spryker Systems GmbH / code.talks commerce 2016 22
23. Strict modularizaHon
2016 Spryker Systems GmbH / code.talks commerce 2016 23
A bundle is a “funcHonal unit”.
Bundles are loose coupled, coherent and have explicit
dependencies.
They follow the packaging principles!
Currently there are > 100 bundles.
Main benefit: Code keeps well-‐structured even
in big projects with large development teams.
24. Atomic Releases
2016 Spryker Systems GmbH / code.talks commerce 2016 24
Each bundle has it’s own (semanHc) version
number and own (split) repository.
We know: Migra8on to a new version can be
painful!
That’s why: all releases only affect one or some
bundles (Isolated changes).
Spryker offers a con8nuous delivery of
Atomic Releases.
25. 2016 Spryker Systems GmbH / code.talks commerce 2016 25
Programming with Spryker
26. Dependency injecHon with factories
2016 Spryker Systems GmbH / code.talks commerce 2016 26
+ Explicit injecHon without background magic. IDE-‐friendly
+ Separated factories per bundle/layer. No big DI-‐container.
28. Project extension via object composiHon
2016 Spryker Systems GmbH / code.talks commerce 2016 28
+ You can extend every class by composiHon (recommended) or inheritance.
29. Transfer objects
2016 Spryker Systems GmbH / code.talks commerce 2016 29
+ Internal data transfer with objects, not anonymous arrays.
+ Clear separaHon of data and logic
Usage DefiniHon
30. State machines
2016 Spryker Systems GmbH / code.talks commerce 2016 30
Visual programming
with state machines
• Graph in XML
• Commands and
CondiHons in PHP
Perfect use case
Automated processing of
orders.
Avoid bulky ERP as much as possible.
31. 2016 Spryker Systems GmbH / code.talks commerce 2016 31
Run Spryker – Now
Installa8on guide:
hAp://start.spryker.com
InstallaHon with Vagrant VM
takes 20-‐30 minutes
All Github repositories are public:
hAps://github.com/spryker
32. More Spryker links
2016 Spryker Systems GmbH / code.talks commerce 2016 32
Documenta8on – Spryker has comprehensive documentaHon
hAp://spryker.github.io
Forum – Ask any quesHon to the Spryker team
hAp://discuss.spryker.com
Techblog – Get deep insights from the core team
hAps://tech.spryker.com
Scru8nizer (Yves) – Check the code quality metrics
hAps://scruHnizer-‐ci.com/g/spryker/demoshop
33. 2016 Spryker Systems GmbH / code.talks commerce 2016 33
A proven technology built in real-‐
world projects for ambiHous and
non-‐standard business models.