SlideShare uma empresa Scribd logo
1 de 22
Headless CMS. Sitecore JSS getting started,
tips and tricks
Artsem Prashkovich
Lead Sitecore Developer, Sitecore MVP 2018
twitter.com/apr_dev
a.prashkovich@brimit.com
Ihar Pauliuk
Lead Frontend Developer
i.pavlyuk@brimit.com
What is Headless Content Management?
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Headless CMS
What is Headless Content Management?
Creation and organization
of content
Content Management
Delivery of content and
presentation to one or
more channels
Content Delivery Content Rendering
The rendering of the
content and presentation
on one or multiple devices
Headless is an architecture that allows the physical decoupling of:
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
What is Headless Content Management?
… or,
CMS without the front-end (rendering) part.
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
What exactly is JSS?
Sitecore JavaScript Services is a toolkit for JavaScript developers allowing to
build full-fledged customer solutions (SPAs, web apps, websites)
using modern JS libraries and frameworks (React.js, Angular)
by being completely unplugged from Sitecore.
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Two ways to start your JSS project
Code-first Sitecore-first
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Code-first vs Sitecore-first
Code-first
• FED works disconnected from Sitecore and defines
Sitecore structures via in-code component defenitions
and route data.
• Sitecore IA (templates, renderings, etc.) is generated
via the import process.
• Good for:
o Smaller projects or temporary sites (e.g.
campaigns)
o Front-end led projects
o Micro-apps within a larger site
Sitecore-first
• Sitecore IA (templates, renderings, etc) are created by
the Sitecore developer – no import process utilized.
• FED works disconnected from Sitecore and creates
components and mock route data based on
spec/contract provided by Sitecore developer.
• Contract can be defined first to allow concurrent work.
• Good for:
o Larger / complex projects
o Organizations looking for full control over Sitecore
IA
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Installation process
Installation of Sitecore modules:
1. Download and install two packages from Sitecore site:
o Sitecore JavaScript Services Tech Preview Server
o Sitecore JavaScript Services Tech Preview Infrastructure
Installation of Front-end project:
1. Download an advanced app example from JSS github repository:
o https://github.com/Sitecore/jss
2. Setup the application. Run the following commands in console:
• npm install -g @sitecore-jss/sitecore-jss-cli
• jss create my-first-jss-app basic-sample-react
• jss start
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
JSS application modes
For development
• Disconnected dev mode
• Connected dev mode
• Integrated mode
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
For demo
• Static browser
rendering mode
For production
• Integrated mode
• Headless server-side
rendering mode
• Headless browser
rendering mode
High level structure and Data Flow
Items
Packaged Manifest
Import Service
Sitecore.Ship
Update Package
Layout Service
Content Service
or SSC
Dictionary
Service
Route
JSON
pull
Item JSON
Dictionary JSON
Browser / App
Route
JSON
Server-side
Rendered HTML
<app />
Config
Route JSON
View Engine
Server
HTML
Dev or CI Environment
{ manifest }
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Description of front-end project structure
DEMO TIME
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Deploying changes to the Sitecore
o Deploy Sitecore IA without content and dictionary items (only templates, renderings, placeholders):
jss deploy package
o Deploy Sitecore IA like templates, renderings, placeholders WITH content an dictionary items:
jss deploy package --includeContent --includeDictionary --language=en
o Ability to deploy Sitecore IA and artefacts separately:
jss deploy package --noItems and jss deploy package --noFiles
All options are available by a command: jss deploy package --help
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Features
Layout Service and extensibility
Dictionary Service
Content Service (GraphQL)
Supporting Multi-language and Multi-sites
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Layout Service
Layout Service - is fundamental thing in JSS which outputs Sitecore item's
presentation data in JSON format with applied personalization rules.
http://{appName} /sitecore/api/layout/render/jss?item=/&sc_lang=en&tracking=true&sc_apikey={YOUR_API_KEY}
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Parameters
• item=
• sc_lang=
• tracking=true/false
Extending Context Data Returned by the Layout Service
Allows you to add your own data to the context object.
It's useful for providing data for statically placed
components on a page, that not managed through a
Placeholder and Sitecore layout, such as header and
footer navigation
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Customizing Rendering Serialization in Layout Service
By default, the Layout Service populates the
rendering contents object with the fields of the
rendering's datasource item. But sometimes we
need to output something else, such as:
 Data from a different item
 A calculated or otherwise more complex value
 Non-item data, such as information from xDB
 Non-Sitecore data from external systems
The Layout Service allows the customization of the
serialized rendering content.
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Supporting Multi-language and Multi-sites
 Multi-sites - a separate front-end project needs to be created with a
configured different app and site names.
 Multi-language - the “jss-advanced-app” provides an example of
multi-language application. Only one language version can be
imported into Sitecore via the manifest. Multi-language import
currently is not supported.
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Dictionary Service
REST endpoint for retrieving an app-specific translation dictionary.
$your-app-domain/sitecore/api/jss/dictionary/<app>/<language>/
http://jssdemoapp/sitecore/api/jss/dictionary/jssDemoApp/es-mx/
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Content Service
Experimental service which provides access to content items outside of the Layout Service usage.
URL Example:
http://jssdemoapp/sitecore/api/jss/contentsvc?itemPath=/content/FooterNavigation&sc_lang=en
Currently the Sitecore JSS team works on the in-depth integration with Sitecore Services Client for
retrieving content data. The JSS Content Service will not be supported in the future.
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
JSS Features
DEMO TIME
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Conclusion
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
Thank you for attention!
Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.

Mais conteúdo relacionado

Mais procurados (20)

Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
React js
React jsReact js
React js
 
React js
React jsReact js
React js
 
React Native Workshop
React Native WorkshopReact Native Workshop
React Native Workshop
 
React Native
React Native React Native
React Native
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
How native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentHow native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App Development
 
Reactjs
ReactjsReactjs
Reactjs
 
React Native
React NativeReact Native
React Native
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
Ajax
AjaxAjax
Ajax
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
React native
React nativeReact native
React native
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
 
Angular
AngularAngular
Angular
 
React Native
React NativeReact Native
React Native
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
ReactJS
ReactJSReactJS
ReactJS
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 

Semelhante a Headless CMS. Sitecore JSS getting started, tips and tricks

Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experienceThe Reference
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?CodeValue
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourBrian Culver
 
Going Serverless with Iron.io
Going Serverless with Iron.ioGoing Serverless with Iron.io
Going Serverless with Iron.ioIsak Rickyanto
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesBrian Culver
 
SPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFxSPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFxNCCOMMS
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePointKirti Prajapati
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5Vinayak Tavargeri
 
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Sitecore Knowledge Transfer 2018 day-1
Sitecore  Knowledge Transfer 2018 day-1Sitecore  Knowledge Transfer 2018 day-1
Sitecore Knowledge Transfer 2018 day-1Manish Puri
 
JOB PORTALProject SummaryTitle JOB-PORT.docx
JOB PORTALProject SummaryTitle    JOB-PORT.docxJOB PORTALProject SummaryTitle    JOB-PORT.docx
JOB PORTALProject SummaryTitle JOB-PORT.docxchristiandean12115
 

Semelhante a Headless CMS. Sitecore JSS getting started, tips and tricks (20)

Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
Introducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFxIntroducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFx
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
Going Serverless with Iron.io
Going Serverless with Iron.ioGoing Serverless with Iron.io
Going Serverless with Iron.io
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure Services
 
SPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFxSPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFx
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePoint
 
Sug bangalore - headless jss
Sug bangalore - headless jssSug bangalore - headless jss
Sug bangalore - headless jss
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Resume
ResumeResume
Resume
 
WebMatrix2
WebMatrix2WebMatrix2
WebMatrix2
 
Sitecore Knowledge Transfer 2018 day-1
Sitecore  Knowledge Transfer 2018 day-1Sitecore  Knowledge Transfer 2018 day-1
Sitecore Knowledge Transfer 2018 day-1
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
Rendering engine
Rendering engineRendering engine
Rendering engine
 
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
 
JOB PORTALProject SummaryTitle JOB-PORT.docx
JOB PORTALProject SummaryTitle    JOB-PORT.docxJOB PORTALProject SummaryTitle    JOB-PORT.docx
JOB PORTALProject SummaryTitle JOB-PORT.docx
 

Último

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Headless CMS. Sitecore JSS getting started, tips and tricks

  • 1. Headless CMS. Sitecore JSS getting started, tips and tricks Artsem Prashkovich Lead Sitecore Developer, Sitecore MVP 2018 twitter.com/apr_dev a.prashkovich@brimit.com Ihar Pauliuk Lead Frontend Developer i.pavlyuk@brimit.com
  • 2. What is Headless Content Management? Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018. Headless CMS
  • 3. What is Headless Content Management? Creation and organization of content Content Management Delivery of content and presentation to one or more channels Content Delivery Content Rendering The rendering of the content and presentation on one or multiple devices Headless is an architecture that allows the physical decoupling of: Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 4. What is Headless Content Management? … or, CMS without the front-end (rendering) part. Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 5. What exactly is JSS? Sitecore JavaScript Services is a toolkit for JavaScript developers allowing to build full-fledged customer solutions (SPAs, web apps, websites) using modern JS libraries and frameworks (React.js, Angular) by being completely unplugged from Sitecore. Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 6. Two ways to start your JSS project Code-first Sitecore-first Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 7. Code-first vs Sitecore-first Code-first • FED works disconnected from Sitecore and defines Sitecore structures via in-code component defenitions and route data. • Sitecore IA (templates, renderings, etc.) is generated via the import process. • Good for: o Smaller projects or temporary sites (e.g. campaigns) o Front-end led projects o Micro-apps within a larger site Sitecore-first • Sitecore IA (templates, renderings, etc) are created by the Sitecore developer – no import process utilized. • FED works disconnected from Sitecore and creates components and mock route data based on spec/contract provided by Sitecore developer. • Contract can be defined first to allow concurrent work. • Good for: o Larger / complex projects o Organizations looking for full control over Sitecore IA Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 8. Installation process Installation of Sitecore modules: 1. Download and install two packages from Sitecore site: o Sitecore JavaScript Services Tech Preview Server o Sitecore JavaScript Services Tech Preview Infrastructure Installation of Front-end project: 1. Download an advanced app example from JSS github repository: o https://github.com/Sitecore/jss 2. Setup the application. Run the following commands in console: • npm install -g @sitecore-jss/sitecore-jss-cli • jss create my-first-jss-app basic-sample-react • jss start Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 9. JSS application modes For development • Disconnected dev mode • Connected dev mode • Integrated mode Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018. For demo • Static browser rendering mode For production • Integrated mode • Headless server-side rendering mode • Headless browser rendering mode
  • 10. High level structure and Data Flow Items Packaged Manifest Import Service Sitecore.Ship Update Package Layout Service Content Service or SSC Dictionary Service Route JSON pull Item JSON Dictionary JSON Browser / App Route JSON Server-side Rendered HTML <app /> Config Route JSON View Engine Server HTML Dev or CI Environment { manifest } Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 11. Description of front-end project structure DEMO TIME Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 12. Deploying changes to the Sitecore o Deploy Sitecore IA without content and dictionary items (only templates, renderings, placeholders): jss deploy package o Deploy Sitecore IA like templates, renderings, placeholders WITH content an dictionary items: jss deploy package --includeContent --includeDictionary --language=en o Ability to deploy Sitecore IA and artefacts separately: jss deploy package --noItems and jss deploy package --noFiles All options are available by a command: jss deploy package --help Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 13. Features Layout Service and extensibility Dictionary Service Content Service (GraphQL) Supporting Multi-language and Multi-sites Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 14. Layout Service Layout Service - is fundamental thing in JSS which outputs Sitecore item's presentation data in JSON format with applied personalization rules. http://{appName} /sitecore/api/layout/render/jss?item=/&sc_lang=en&tracking=true&sc_apikey={YOUR_API_KEY} Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018. Parameters • item= • sc_lang= • tracking=true/false
  • 15. Extending Context Data Returned by the Layout Service Allows you to add your own data to the context object. It's useful for providing data for statically placed components on a page, that not managed through a Placeholder and Sitecore layout, such as header and footer navigation Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 16. Customizing Rendering Serialization in Layout Service By default, the Layout Service populates the rendering contents object with the fields of the rendering's datasource item. But sometimes we need to output something else, such as:  Data from a different item  A calculated or otherwise more complex value  Non-item data, such as information from xDB  Non-Sitecore data from external systems The Layout Service allows the customization of the serialized rendering content. Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 17. Supporting Multi-language and Multi-sites  Multi-sites - a separate front-end project needs to be created with a configured different app and site names.  Multi-language - the “jss-advanced-app” provides an example of multi-language application. Only one language version can be imported into Sitecore via the manifest. Multi-language import currently is not supported. Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 18. Dictionary Service REST endpoint for retrieving an app-specific translation dictionary. $your-app-domain/sitecore/api/jss/dictionary/<app>/<language>/ http://jssdemoapp/sitecore/api/jss/dictionary/jssDemoApp/es-mx/ Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 19. Content Service Experimental service which provides access to content items outside of the Layout Service usage. URL Example: http://jssdemoapp/sitecore/api/jss/contentsvc?itemPath=/content/FooterNavigation&sc_lang=en Currently the Sitecore JSS team works on the in-depth integration with Sitecore Services Client for retrieving content data. The JSS Content Service will not be supported in the future. Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 20. JSS Features DEMO TIME Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 21. Conclusion Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.
  • 22. Thank you for attention! Artsem Prashkovich and Ihar Pauliuk. Brimit. 2018.