Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the...

30
© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved. May 1, 2020 #sugcon JSS Your data, your way Nick Hills // Sitecore MVP // Principal Developer - Valtech

Transcript of Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the...

Page 1: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

May 1, 2020

#sugcon

JSSYour data, your way

Nick Hills // Sitecore MVP // Principal Developer - Valtech

Page 2: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

2

What’s the plan?

• Out the box Sitecore data

• ‘Zero Sitecore deployments’

• Adding custom data

• Optimization techniques

• Monitoring the system

Building a page using JSS

Page 3: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •
Page 4: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Page 5: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •
Page 6: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •
Page 7: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •
Page 8: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •
Page 9: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Consuming App

SitecoreLayout Service / GraphQL

AWS Lambda

Azure Functions

System X

Customer

Page 10: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

‘Out the box’ Sitecore dataAka my first JSS page

Page 11: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Layout ServiceChained Content

Resolvers

Content Resolvers

Context Extensions

Graph QL

Dynamic Content

Resolvers

Consuming App

Sitecore

AWS Lambda

Azure Functions

System X

Page 12: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Contents Resolvers

• Create a Json Rendering and attach a Rendering Contents Resolver

• In solution inherit RenderingContentsResolver

• Customize behaviour in c#

return new{

name = "Contents Resolvers",sitecoreDeploymentNeeded = true,sitecoreChanges = new[] { "code", "content" },

};

Page 13: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Context Extensions

• Use cases

• Navigation // Header // Footer

• In solution inherit JssGetLayoutServiceContextProcessor

• Filter behaviour in config or c#

return new{

name = "Context Extensions",sitecoreDeploymentNeeded = true,sitecoreChanges = new[] { "code", "config" },

};

Page 14: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Layout Service Variables Querystring / Context

• Site (sc_site)

• Route (item)

• Language (sc_lang)

• Database (sc_database)

Page 15: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Chained Contents Resolvers

• Create a Json Rendering and attach a Rendering Contents Resolver

• Merge the default output with your custom content

return new{

name = "Chained Contents Resolvers",sitecoreDeploymentNeeded = true,sitecoreChanges = new[] { "code", "content" },

};

Page 16: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Demo time

Page 17: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Zero* Sitecore deploymentsYou what?!? I thought deploying Sitecore was easy?

* Code free deployments

Page 18: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Integrated Graph QL

• Configure a GraphQL endpoint

• Create a Json Rendering and set a Component GraphQL Query

return new{

name = "Integrated Graph QL",sitecoreDeploymentNeeded = false,sitecoreChanges = new[] { "content" },

};

Page 19: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Connected Graph QL

• Configure a GraphQL endpoint

• Create queries in your consuming application

return new{

name = "Connected Graph QL",sitecoreDeploymentNeeded = false,sitecoreChanges = new[] { },

};

Page 20: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Dynamic Content Resolvers

• Create a Json Rendering and set a Parameters Query

• [--datasource:fields:*]

• [/sitecore/content/jss-your-data-your-way/Datasource Examples/Datasource Example:fields:*]

• [/sitecore/content/Home:fields:Text->Remapped Text]

• Casting, Field remapping, Wildcards, Children, Lists, Linked items, Aggregation

return new{

name = "Dynamic Content Resolvers",sitecoreDeploymentNeeded = false,sitecoreChanges = new[] { "content" },

};

Page 21: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Demo time

Page 22: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Performance

considerations

Page 23: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Consuming App

SitecoreLayout Service / GraphQL

AWS Lambda

Azure Functions

System X

Customer

Caching options

Page 24: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

SSR Consuming App

SitecoreLayout Service / GraphQL

AWS Lambda

Azure Functions

System X

Customer

Monitoring the system

1 2 3 4

1. 200 Rates, 4XX Rates, 5XX Rates, Request counts2. Call times (ms - av, max, %iles), site/lang/url breakdown,

cached vs uncached rates3. 200 Rates, 4XX Rates, 5XX Rates, Request counts4. Page load times & other browser metrics

Page 25: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Monitoring the system

Page 26: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

”–

JSS – Your Data, Your Way

Nick Hills

1. Any source of data is viable

2. Caching is your friend

3. Monitor the seams

https://github.com/boro2g/JssYourDataYourWay

Page 27: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

I am a proud community member! Please contact me on the following handles:

sitecorechat.slack.com twitter sitecore.stackexchange.com

nickhills @boro2g boro2g

Page 28: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Breakroom / Chillout lounge

https://bit.ly/VirtualSugcon2020

Password: virtual20

Please do not share this slide or the password to the Breakroom on social media. We are concerned about Zoombombing/trolls.

Page 29: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

• Please insert a background image that suits your presentation,

or leave it empty.© 2020 Sitecore User Group Conference Global and its respective speakers. All rights reserved.

Donate

https://virtual.sugcon.events/Donate

Page 30: Your data, your way - Some ideas about ASP.Net & Sitecore€¦ · 2 What’s the plan? • Out the box Sitecore data • ‘Zero Sitecore deployments’ • Adding custom data •

Thank youand stay safe folks!

[email protected]

blog.boro2g.co.uk