Spryker in a nutshell

FabianWesner 3,624 views 34 slides Apr 20, 2016
Slide 1
Slide 1 of 34
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34

About This Presentation

Slides from my talk at commerce code talks 2016 in Berlin.


Slide Content

code.talks+commerce+
19/20.04.2016+
+

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+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 3+
MoHvaHon+
Why$do$we$need$an$(e)commerce$framework?$

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?&

Standard+ShopPsoQware+
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$…$

Framework+vs+ShopPsoQware+
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!$

The+framework+approach+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 7+
+
+
Instead+an+outPofPthePbox+shop+soQware+ambiHous+projects+need+a+
framework,+that+op8mizes&the&developers’&produc8vity.+
+
How?+

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,+eventPdispatcher,+AOP,+code+configuraHon+in+database,+dependencyP
container+magic,+…+
+
+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 9+
IntroducHon$

Spryker+Bird’s+eye+view+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 10+

Performance+&+Scalability+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 11+
Lightweight+shop+frontend+Yves+executes+in+30+P+100ms++
• No+full+page+cache+needed!+
• Redis+and+ElasHcsearch+are+easily+scalable+
• No+direct+access+to+SQL+database+from+frontend+(to+avoid+the+boAleneck)+

Code+principles+and+quality+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 12+
Spryker+follows+the++
SOLIDP+and+
PackagingPPrinciples.+
Spryker+implements+
Clean+Code!+
Project+boilerplate+
Core+P+Bundles+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 13+
SoQware+design$

First+sketch+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 14+

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+
+
+

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+

Monolith?+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 17+

Modular+ApplicaHon+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 18+
Bundles+which+have+a+single+responsibility+with+wellPdefined+
relaHonships.+

Each+bundle+consists+of+(up+to)+4+layers+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 19+

ApplicaHons,+bundles+and+layers+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 20+

Each+bundle+has+an+internal+API+(~+Facade)+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 21+

Bundle+to+Bundle+communicaHon+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 22+

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+wellPstructured+even+
in+big+projects+with+large+development+teams.+
+

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.&
+
+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 25+
Programming+with+Spryker+

Dependency+injecHon+with+factories+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 26+
++Explicit+injecHon+without+background+magic.+IDEPfriendly+
++Separated+factories+per+bundle/layer.+No+big+DIPcontainer.+

Extension+with+plugins+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 27+

Project+extension+via+object+composiHon+
2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 28+
++You+can+extend+every+class+by+composiHon+(recommended)+or+inheritance.+

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+

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.+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 31+
Run+Spryker+–+Now+
+++
Installa8on&guide:&
hAp://start.spryker.com+
InstallaHon+with+Vagrant+VM++
takes+20P30+minutes+
&
All&Github&repositories&are&public:&
hAps://github.com/spryker+
+

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://scruHnizerPci.com/g/spryker/demoshop+
+

2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+ 33+
A+proven+technology+built+in+realP
world+projects+for+ambiHous+and+
nonPstandard+business+models.++

Spryker+Systems+GmbH+
JuliePWolQhornPStrasse+1+
10115+Berlin+
Germany+
[email protected]++
Phone:++49+40+328+929+631+
Fax:++49+40+328+929+699+
www.spryker.com+++
tech.spryker.com+
github.com/spryker+
+
34+2016+Spryker+Systems+GmbH+/+code.talks+commerce+2016+