Post on 26-May-2020
Amsterdam Las Vegas Melbourne
Amsterdam Las Vegas Melbourne
Sitecore Content as a Service
Sean Kearney, Solution Architect
Hedgehog Development
Amsterdam Las Vegas Melbourne
Introductions
• Sean Kearney
– Sitecore developer for 5+ years
– Sitecore MVP since 2009
– Contributed to
“Professional Sitecore Development”
Amsterdam Las Vegas Melbourne
Introductions
• Hedgehog Development
– Team Development for Sitecore
– CMS Database Compare Tool
– Sitecore Solution & Technology Partner
– Multiple Site of the Year winner
Amsterdam Las Vegas Melbourne
Agenda
• Your content everywhere!
• Demo applications using Sitecore content.
• What is required?
• How to implement now!
Amsterdam Las Vegas Melbourne
Beyond the Traditional
Web • Single page applications
• Mobile applications
• App/Web-enabled devices
– Smart TVs
– Set-top devices
• Other
Amsterdam Las Vegas Melbourne
Sitecore as Our Enterprise
CMS
• Sitecore is our platform of choice.
• Content is more than stuff on a page.
• The CMS that powers our site should
power our organization!
Amsterdam Las Vegas Melbourne
EXAMPLE
Demo
http://bit.ly/sym-spa
Amsterdam Las Vegas Melbourne
What Sitecore Has…
• Powerful / friendly UI for managing content
• Robust .NET API
– Only available within Sitecore application
• SOAP Web Service
– Unfriendly.
• API based on Items and Fields
– Non-serializable
Amsterdam Las Vegas Melbourne
What Do We Need?
• Web API - A “REST” service – “Sitecore Navigator”
– POCO content models
– Mapping framework
– Efficient JSON Serialization
• Consumable APIs – JavaScript API
– iOS
– .NET API
Amsterdam Las Vegas Melbourne
Architecture
Sit
eco
re S
erv
er
Content Navigator
RE
ST
Se
rvic
e
Content APIs
Sitecore Kernel
Get Content Item(s)
.NET API
JavaScript API
iOS API
JSON Serialization
Plain JSON
Get Content Item(s)
Get Sitecore Item(s)
Item Mapping
Amsterdam Las Vegas Melbourne
Content Models • POCO Classes
– Simple and lightweight
– Sitecore fields are mapped to a model’s properties
• Base ContentItem – Key
– Name
– Template
– Path
• Content Fields – Rich Text
– Image
– Link
– Reference
Amsterdam Las Vegas Melbourne
Mapping Framework
• We require a way to convert our Sitecore
item into a Content item
• Possible approaches:
– Manual
– Attributes
– Convention
Amsterdam Las Vegas Melbourne
REST Content Service
• A service endpoint inside our Sitecore site
• Multiple ways to implement:
– Generic/HTTP Handler
– MVC Controller/Action
– WCF Web API (pre-MVC 4)
– ASP.NET Web API (MVC 4+)
Amsterdam Las Vegas Melbourne
REST Content Service
• Based on Sitecore’s hierarchical structure
• Seven generic methods to get any piece of content: – Item
– Items
– Parent
– Ancestors
– Children
– Descendants
– Referrers
Amsterdam Las Vegas Melbourne
THE CODE
Demo
Amsterdam Las Vegas Melbourne
Content as a Service
• By leveraging existing technology we
expand the capabilities of Sitecore.
• Having a REST service enables
interoperability across many platforms.
• Sitecore can publish content to your entire
organization!
Amsterdam Las Vegas Melbourne
Helpful Tools
• Code Generation
Team Development for Sitecore
http://TeamDevelopmentForSitecore.com
• Editing Sitecore items in Visual Studio
Sitecore Rocks
http://vsplugins.sitecore.net
Amsterdam Las Vegas Melbourne
Resources
• Blog: http://SeanKearney.com
• Twitter: @SeanKearney
• Code:
github.com/hedgehogdevelopment
bit.ly/hhog-git
Amsterdam Las Vegas Melbourne
Q&A
Sitecore Content as a Service
Amsterdam Las Vegas Melbourne
Feedback Appreciated!
Please take a moment to provide session feedback via the mobile site.
http://www.sitecore.net/SymNA
Amsterdam Las Vegas Melbourne