Sitecore Habitat - sugnl.net/media/SUGNL/Meetings/Developer...Sitecore 8 .1 ASP .NET MVC...

Preview:

Citation preview

Sitecore Habitat

Sitecore User Group, Evident

11 februari 2016

Ruud van Falier, ParTech IT

ruud@partechit.nl

“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.”

Open Source

Gebaseerd op open standaarden

Focus op architectuur

Focus op architectuur:

Simplicity

Flexibility

Extensibility

Web applicaties zijn onstabiel

FOU

ND

ATI

ON

FEA

TU

RES

PR

OJE

CTS

Content & Presentation

Solution specific features

Foundational features

FOU

ND

ATI

ON

FEA

TU

RES

PR

OJE

CTS

Website

Co

nte

nt

Indexing

Design

Na

vig

atio

n

Sear

ch

Secu

rity

Pro

du

cts

Site

map

Form

s

Car

t

Taxonomy Assets Extensions

Dependencies

Dependencies

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

Demo: Habitat in Visual Studio

Modules

Alles is een module

Elke module heeft één doel (geen “Helper” of “Utility”

modules)

Modules blijven zoveel mogelijk gescheiden (High

Cohesion/Low Coupling)

Een module is “self contained”

Een module is zo “stabiel” mogelijk

Modules

What belongs together is maintained and released together

Een module bevat alle type data dat van toepassing is op de module:

Code

Configuration

Templates

Renderings

Items

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

Modules

Definieer wat bij één module hoort.

Minimaliseer de kans dat een change invloed heeft op de module

Zonder dit is de architectuur zinloos

Features bevatten symantic HTML

Design en presentatie hoort in de Project layer

Include alleen files die bij de solution horen, niet files van Sitecore of andere

dependencies

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

Demo: Opbouw van een module

Layers

Niveaus van stabiliteit

Hoe dichter bij de onderste laag, hoe stabieler

Hoe stabieler de module, hoe abstracter deze is binnen de

solution

Layers

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

Layers

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

Project Layer -> Features Layer -> Foundation Layer

Veranderingen in een lager niveau hebben meer impact en vereisen meer

tests

Voor productiviteit moeten we kunnen vertrouwen op de Foundation layer!

LayersProject Layer modules

Alleen Website

modules

Zeer concreet en

specifiek voor de

solution

Kan meerdere

website bevatten

Geen functionele

Javascripts in het

design project (hoort

bij de feature)

Geen business logic!

Features Layer modules

Geen references naar

Project layer

Voorkom references

naar andere Features

layer modules

Geen CSS of design

Javascript

Semantic HTML

Config specifiek voor

de module

Foundation Layer

modules

API only

Zeer abstract en

generiek

Geen references naar

Features of Project

layer

Geen renderings

Hou het simpel!

Mijn mening

Thanks to:

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

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

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

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

Recommended