15
Code First Sitecore Second Reinoud van Dalen

Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

  • Upload
    others

  • View
    19

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

Code First

Sitecore Second

Reinoud van Dalen

Page 2: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

1. Who am I

2. Development options

3. Code First Templates

4. Code First Renderings

5. QA

Page 3: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

R e i n o u d

+ Senior dev @ Valtech

+ 5+ years Sitecore

+ SUGNL Organizer

+ 2015/16 Sitecore MVP

+ Father of 2 super heroes

+ TV-series addict

+ Basketball player

Page 4: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

From this day on it’s Code First

It’s great, It’s true

Page 5: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

Traditional Code-Gen Code First

Template items Manual Manual Generated

Template classes Manual Generated Manual

Rendering items Manual Manual Generated

Actions and Views Manual Generated Manual

Page 6: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

+ Clean(ish) Sitecore Install

+ Prepped Visual Studio

Solution

+ Imported Sitecore basics

+ Glass.Mapper.Sc

+ Enabled Glass Code First

Code First Templates

9/11/2017 6

Demo Time!

Page 7: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

1. Initialize Pipeline

(Collect Type Configurations)

2. Run GlassDataProvider Initialize

3. Collect all codefirst enabled Type Configurations

Page 8: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

1. Ensure folder structure in

SqlDataProvider

2. Create template item in SqlDataProvider

3. Store Sections and Fields in

Memory

For each Code-First TypeConfiguration

4. Delete Templates(optional)

Page 9: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

+ BoC.Sitecore.

CodeFirstRenderings

+ Enabled Glass affinity

+ Lumi.Foundation.

PipelineValueProvider

+ Installed Glass affinity

Code First Renderings

9/11/2017 9

More demo!

Page 10: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

Core

SQL DataProviders

Master

SQL DataProvider

Glass DataProvider

CodeFirstRenderings DataProvider

Web

SQL DataProvider

CodeFirstRenderings DataProvider

Development env. only

Page 11: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

GetItemDefinition

Root Folder

Namespace Folder

Controller Folder

Controller Rendering

GetItemFields

StandardFields

StandardFields

Standard + DisplayName

Standard + ActionFields

BoC.Sitecore.CodeFirstRenderings

Page 12: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

Standard Fields

Icon

Created

CreatedBy

Revision

Updated

UpdatedBy

DisplayName

Action Fields

Icon

DisplayName

ControllerName

ControllerAction

Attribute Fields

Datasource (Glass)

Parameters (Glass)

BoC.Sitecore.CodeFirstRenderings

{ }• Root Folder

• Namespace

Folder

• Controller

Folder

• Controller

Rendering

Controller

Rendering

Page 13: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

Lumi.Foundation.PipelineValueProvider

mvc.valueprovider.

contextitem

Sitecore.Data.Item

Glass Type

mvc.valueprovider.

datasource

Sitecore.Data.Item

Glass Type

mvc.valueprovider.

renderingparameters

RenderingParameters

Glass Type

Lumi.Foundation.PipelineValueProvider.Glass

Page 14: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

D O I T

+ Code First Templates

+ Code First Renderings

+ Value Provider

= AWESOME!

+ Questions?

Page 15: Code First Sitecore Second/media/SUGNL/Meetings/SUGNL Meeting... · + 2015/16 Sitecore MVP + Father of 2 super heroes + TV-series addict + Basketball player. ... Demo Time! 1. Initialize

thank you