introducing sitecore habitat - sugcon eu 2016

34
Click icon to add picture Introducing Sitecore Habitat Ruud van Falier Co-founder & Consultant at ParTech April 26, 2016

Upload: ruud-van-falier

Post on 12-Feb-2017

214 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Introducing Sitecore Habitat - SUGCON EU 2016

Click icon to add picture

Introducing Sitecore HabitatRuud van FalierCo-founder & Consultant at ParTech

April 26, 2016

Page 2: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 2

Page 3: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved.

“Habitat is a Sitecore solution example built on a modular architecture.”

What is Habitat?

Page 4: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved.

“Habitat is a Sitecore solution example built on a modular architecture.”

“Habitat is a Sitecore solution framework focused on streamlining the development process and optimizing productivity.”

What is Habitat?

Page 5: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 5

• Open source

• Based on open standards

• Focus on architecture

What is Habitat?

Page 6: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 6

Focus on architecture:• Flexibility

• Extensibility

• Simplicity

What is Habitat?

Page 7: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 7

“Web applications are unstable”- Abraham Lincoln, 1864

Why Habitat?

Page 8: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 8

Why Habitat?

Page 9: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 9

Why Habitat?

Page 10: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 10

Why Habitat?

Page 11: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 11

Why Habitat?

Page 12: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 12

Why Habitat?

Page 13: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 13

Why Habitat?

A

B

C D

Page 14: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 14

Why Habitat?

A

B

C D E

Page 15: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 15

Why Habitat?

A

B

C D

Page 16: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 16

Why Habitat?

Page 17: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 17

Why Habitat?

Page 18: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 18

Layered architecture

FOUN

DATI

ONFE

ATUR

ESPR

OJE

CTS

Site-specific content & styling

Solution specific features

Foundational features

Page 19: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 19

Layered architecture

FOUN

DATI

ONFE

ATUR

ESPR

OJE

CTS

Site 1(e.g. Corporate)

Cont

ent

Indexing

Site 2(e.g. Webshop)

Navi

gatio

n

Sear

ch

Secu

rity

Prod

ucts

Site

map

Form

s

Cart

Taxonomy Assets Extensions Theming

Page 20: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 20

Layered architecture

FOUN

DATI

ONFE

ATUR

ESPR

OJE

CTS

Site 1(e.g. Corporate)

Cont

ent

Indexing

Site 2(e.g. Webshop)

Navi

gatio

n

Sear

ch

Secu

rity

Prod

ucts

Site

map

Form

s

Cart

Taxonomy Assets Extensions Theming

Dependencies

Dependencies

Page 21: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 21

Sitecore 8.1 ASP.NET MVC DynamicPlaceholders Unicorn 3.1 Bootstrap jQuery Sass Gulp

Technology stack

Assets Indexing Installer MultiSite Serialization SitecoreExtensions

Foundation

Accounts Identity Language Media Metadata Navigation News PageContent Person Search Social Teasers

Features

Website Design

Project

Layered architecture

Page 22: Introducing Sitecore Habitat - SUGCON EU 2016

Click icon to add picture

DemonstrationHabitat in Visual Studio

22

Page 23: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 23

• Everything is a module• A module has one single purpose (no “Helper” or

“Utility” modules)• Modules are kept separated from each other (High

Cohesion/Low Coupling)• A module is self contained• A module is as stable as possible

Modules

Page 24: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 24

“The granule of reuse is the granule of release”https://en.wikipedia.org/wiki/Package_principles

• What belongs together is maintained and released together• A module contains all types of data that are applicable to the

module:• Code• Configuration• Templates• Renderings• Items

Modules

Page 25: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 25

“Classes that change together, belong together”https://en.wikipedia.org/wiki/Package_principles

• Define what belongs to a single module.• Minimize the risk of a change influencing the module• The Habitat architecture is pointless without this

• Features output semantic HTML• Site-specific styling belongs in the Project layer• Only include files that belong to the module. Do not include

out-of-the-box Sitecore files or other dependencies

Modules

Page 26: Introducing Sitecore Habitat - SUGCON EU 2016

Click icon to add picture

DemonstrationContents of a module

26

Page 27: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 27

• Levels of stability• The closer to the Foundation layer, the more stable• The more stable the module, the more abstract

Layers

Page 28: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 28

“The abstractness of a package should be in proportion to its stability”https://en.wikipedia.org/wiki/Package_principles

Layers

Page 29: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 29

Layers

Page 30: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 30

“Depend in the direction of stability”https://en.wikipedia.org/wiki/Package_principles

• Project Layer -> Features Layer -> Foundation Layer

• Changes on a lower level layer have more impact and require more tests• In order to maintain productivity, we must be able to

trust the Foundation layer

Layers

Page 31: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 31

Project layer modules• Only website modules• Very concrete and

specific to the solution• Can contain styling

(CSS and design Javascript)

• No functional Javascript• No business logic

Foundation layer modules• API only• High level of

abstraction• No references to the

Features or Project layer

• Does not contain presentation

Features layer modules• No references to the

Project layer• Avoid references to other

Features layer modules• No styling (CSS and

design Javascript)• Can contain functional

Javascript• Outputs semantic HTML• Contains configuration

that is specific to the module

Layers

Page 32: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 32

Cool:• Solid architecture• Easy to understand• Future proof, designed for

growth• Community support

Not so cool:• Conventions / reasoning

not (fully) documented• Build system• Early days (stability)• Not upgradable

What do I think?

Page 33: Introducing Sitecore Habitat - SUGCON EU 2016

© 2016 Sitecore User Group Conference Europe and its respective speakers. All rights reserved. 33

Thomas Eldblom, Sitecore• Sitecore Habitat Architecture 1 –

Introduction: https://www.youtube.com/watch?v=2CELqflPhm0

• Sitecore Habitat Architecture 2 – Modules:https://www.youtube.com/watch?v=DgPrikqFe4s

• Sitecore Habitat Architecture 3 – Layers:https://www.youtube.com/watch?v=XKLpTMuQT4Y

Anders Laub, Pentia• The ground breaking Sitecore

Habitat:http://laubplusco.net/the-groundbreaking-sitecore-habitat

• http://laubplusco.net/layers-in-sitecore-modular-architecture

Special thanks to

Download Habitat: https://github.com/Sitecore/Habitat

Page 34: Introducing Sitecore Habitat - SUGCON EU 2016

Thank you!E-mail: [email protected]

Twitter: @BrruuDSitecore Slack:

@ruudvanfalier