SlideShare a Scribd company logo
Use the mobile SDK to create personalized
cross-platform apps leveraging the xDB
Presented by // Mark vanAalst
12 june 2015
Sitecore Mobile SDK Family
Mobile SDK for Xamarin
Mobile SDK for .NET
Mobile SDK for iOS
Mobile SDK for Android
Sitecore Mobile SDK for Xamarin
Powered by the Mobile SDK for .NET portable class library (PCL)
Currently consistent features
Single package on NuGet
Xamarin SDK expected to grow
Sitecore Mobile SDKs for mobile content delivery
Manage in-app content directly from Sitecore
Content marketing and updates without the traditional app update process
Sitecore provides the client/serverAPIs, you provide the app
One JSON REST-like web services server API – ItemWeb API
Many native web service clients
Clients de-serialize JSON (JavaScript) into strongly typed objects
Asynchronous -Thread friendly / non-blocking
5
What’s the
difference?
6
Why Xamarin?
Build native iOS and Android apps inVisual Studio
Write C#. Run on 2.6 billion devices
Share Code and UI
Use NuGet and the Xamarin Component Store
Xamarin Advantages
Where does the SDK fit in?
8
Sitecore Mobile SDK for XamarinShared C# App Logic
Platform Specific C# Platform Specific C#Platform Specific C#
Diving into the Mobile SDK
9
10
What is the SDK
ItemWebAPI
Request Builder
WebApiRequest
ScApiSession
Sitecore MobileC# SDK
Item Objects Response
HTTP Request
HTTP Response
Item Objects Request
Advantages
Build requests using native methods
Wraps ItemWebAPI requests
Deserializes response in to strong typed objects
Setting up a session
12
Use SitecoreWebApiSessionBuilder class
Security
• Anonymous
Session
• Authenticated
Session
Permissions
• Read-only
• Read/Write
Endpoint
• Instance URL
• Credentials
• Context Site
• Wep API version
Item Source
• Default Database
• Default Language
Media Library
Parameters
• Media Root item
• Media Prefix
• Default Extension
• Resizing strategy
var session =SitecoreWebApiSessionBuilder.AuthenticatedSessionWithHost(“http://my-host.com”)
.Credentials(loginAndPasswordProvider)
.Site("/sitecore/shell")
.WebApiVersion("v1")
.DefaultDatabase("web")
.DefaultLanguage("en")
.MediaLibraryRoot("/sitecore/media library")
.MediaPrefix("~/media/")
.DefaultMediaResourceExtension("ashx")
.MediaResizingStrategy(DownloadStrategy.Plain)
.BuildSession();
Building sessions
13
The Mobile SDK provides the following builder methods:
BuildReadonlySession()
BuildSession()
Warning: If you use a read-only session but your code contains methods that
change/create content, the application will not compile.
SitecoreWebApiSessionBuilder.AnonymousSessionWithHost(“http://my-host.com”).BuildReadonlySession();
SitecoreWebApiSessionBuilder.AnonymousSessionWithHost(“http://my-host.com”).BuildSession();
Configuring your request
14
• Create, Read, Update and Delete functionality
• RequestBuilder syntax is the same, scope may vary
The Mobile SDK provides a set of methods to define the following properties:
Database Language Version Payload Fields Scope Paging
Usage
Configure the database to get items from
Mobile SDK method: Database(string)
ItemWeb API param: sc_database
Optional: Yes
Item Request Parameters - Database
15
Database Language Version Payload Fields Scope Paging
Usage
Define the item language
Mobile SDK method: Language(string)
ItemWeb API param: language
Optional: Yes
Item Request Parameters - Language
16
Database Language Version Payload Fields Scope Paging
Usage
Define the specific version. Do not invoke for the latest version
Mobile SDK method: Version(int?)
ItemWeb API param: sc_itemversion
Optional: Yes
Item Request Parameters -Version
17
Database Language Version Payload Fields Scope Paging
Usage
Use payload type enumerator (content, default, full, min) to define the field
list returned
Mobile SDK method: Payload(PayloadType)
ItemWeb API param: payload
Optional: Yes
Item Request Parameters - Payload
18
Database Language Version Payload Fields Scope Paging
Usage
Use as an alternative for payload. Set the fields returned explicitly.
Mobile SDK method: AddFieldsToRead(string), AddFieldsToRead(Ilist<string>)
ItemWeb API param: fields
Optional: Yes
Item Request Parameters - Fields
19
Database Language Version Payload Fields Scope Paging
Usage
Retrieve additional content from parent or child items
Mobile SDK method: AddScope(ScopeType),AddScope(IEnummerable<ScopeType>)
ItemWeb API param: scope
Optional: Yes
Item Request Parameters - Scope
20
Database Language Version Payload Fields Scope Paging
Usage
Get paginated data in case of large result sets
Mobile SDK method: ItemsPerPage(int) PageNumber(int)
ItemWeb API param: perPage page
Optional: Yes Yes
Item Request Parameters - Paging
21
Database Language Version Payload Fields Scope Paging
22
Execute
Request
Session
Executing the request
23
All requests are executed by the ISitecoreWebApiSession interface instance
Three overloads for ReadItemAsync
• IReadItemsByIdRequest
• IReadItemsByPathRequest
• IReadItemsByQueryRequest
* If you cannot use the async keyword with your method, use theTask.WaitAll() method instead
ScItemsResponse response = await session.ReadItemAsync(request);
Creating Items
24
Requires authenticated session!
Must specify
• Parent id or path
• Item name
• ItemTemplate
var request = ItemWebApiRequestBuilder.CreateItemRequestWithParentParentPath("/path/to/parent")
.ItemTemplatePath(“Sample/Sample Item”)
.ItemName(“Name of new item”)
.Build();
Updating Items
25
Requires authenticated session
Must specify
• Field name
• Field value (raw value)
• Optional: language
var request = ItemWebApiRequestBuilder.UpdateItemRequestWithId(“{item-id-GUID}”)
.Language("en")
.AddFieldsRawValuesByNameToSet("Text", “Hello!”)
.Build();
var request = ItemWebApiRequestBuilder.UpdateItemRequestWithId(“{item-id-GUID}”)
.Language(“dk")
.AddFieldsRawValuesByNameToSet("Text", “Hej!”)
.Build();
Deleting Items
26
Requires authenticated session
Must specify
• Database
• Optional: Scope (remove parent or children)
No support for language versions!
var request = ItemWebApiRequestBuilder.DeleteItemRequestWithPath(itemPath)
.Database(“master”)
.Build();
What about media?
27
Retrieving media
28
By default the mobile SDK returns the media item path
Use the ItemWebApiRequestBuilder to download the media content
// constructing a request
string mediaPath = "/Images/green_mineraly1";
var request =
ItemWebApiRequestBuilder.DownloadResourceRequestWithMediaPath(mediaPath).Build();
// processing the request
using ( Stream response = awaitthis.session.DownloadMediaResourceAsync(request) )
{
// working with the media resource stream
}
Uploading Media
29
Required parameters
• Item name
• File name
• Resource data
• Parent item path or parent GUID
var request = ItemWebApiRequestBuilder.UploadResourceRequestWithParentId({GUID-ITEM-ID})
.ItemDataStream(stream)
.ItemName("MyMediaItem")
.FileName("myPhoto.jpg")
.Build();
var response = await session.UploadMediaResourceAsync(request);
HTML rendering request
30
Gets the HTML output of a Sitecore rendering
Required parameters:
• Source ID (Item ID)
• Rendering ID
var request =ItemWebApiRequestBuilder.RenderingHtmlRequestWithSourceAndRenderingId(sourceGUID, renderingGUID).
Build();
What about personalization?
31
Sorry, the current SDK
(1.0) does not support
personalization
Vision on Mobile and the SDK
33
Become the Sitecore integration layer for mobile apps
• Upgrade the SDK to leverage the newest Sitecore features
• No custom Sitecore integration needed
• Easy maintainability and lower costs
Proof of concept
34
Use Mobile SDK to retrieve items
Requires personalized data
Do not modify Mobile SDK since this runs client side
Modifications must be done server side
Use plain Sitecore installation
Sitecore.Services.Client provides a service layer on both
the server and the client side of Sitecore applications
that you use to develop data-driven applications.
36
The idea
37
ServicesAPI Controller
SC_ANALYTICS_GLOBAL_COOKIE
“Register device”
Store cookie
on device
ServicesAPI Controller xDB
xDB
Response data
Request with included cookie
Create
request
Sitecore ServicesWebAPI
38
Why should you use Sitecore.Services?
• Anonymous user filters
• Security policies
• Handles logging
Exposes two services
• Item Service
• Entity Service
The first steps
39
• Create CustomWebClient
• Add CookieContainer
• Create SessionApi Controller
• Register routes
Customize ItemWebAPI
40
Mobile SDK ItemWeb API
Challenges
41
Pass data within the Mobile SDK to the ItemWeb API
Add personalization to the ItemWeb API
42
Why?
Pipelines & Processors!
Sending custom data using the Mobile SDK
43
Abuse fields field in a read request
Mobile SDK method: AddFieldsToRead(string)
ItemWeb API param: fields
Receiving data in the ItemWeb API
44
Add custom processor in the itemWebApiGetField pipeline
Add method to retrieve data
Do something with the results
45
Other options?
46
47
Visit community.sitecore.net
48
Questions?
Do you have more questions ?
Go to community.sitecore.net
1900+ professionals are there to help you

More Related Content

What's hot

Webinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
Webinar: Building HTML5 Mobile Apps with Kinvey and GizmoxWebinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
Webinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
Gizmox
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
Mike Melusky
 
Pragmatic approach to building native apps hybrid way
Pragmatic approach to building native apps hybrid wayPragmatic approach to building native apps hybrid way
Pragmatic approach to building native apps hybrid way
Thoughtworks
 
Open Source World : Using Web Technologies to build native iPhone and Android...
Open Source World : Using Web Technologies to build native iPhone and Android...Open Source World : Using Web Technologies to build native iPhone and Android...
Open Source World : Using Web Technologies to build native iPhone and Android...
Jeff Haynie
 
AppBattler - An Android-based SDK for game developers to enable social gaming
AppBattler - An Android-based SDK for game developers to enable social gamingAppBattler - An Android-based SDK for game developers to enable social gaming
AppBattler - An Android-based SDK for game developers to enable social gaming
Neev Technologies
 
Build Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkBuild Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic Framework
Salesforce Developers
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
Andrew Ferrier
 
Cross platform mobile application architecture for enterprise
Cross platform mobile application architecture for enterpriseCross platform mobile application architecture for enterprise
Cross platform mobile application architecture for enterprise
Venkat Alagarsamy
 
Re Inventing Enterprise IT around APIs and Apps
Re Inventing Enterprise IT around APIs and AppsRe Inventing Enterprise IT around APIs and Apps
Re Inventing Enterprise IT around APIs and Apps
WSO2
 
HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7
Gizmox
 
Nathan Crone - Resume
Nathan Crone - ResumeNathan Crone - Resume
Nathan Crone - Resume
Nathan Crone
 
BBM Social Platform and App Monetization
BBM Social Platform and App MonetizationBBM Social Platform and App Monetization
BBM Social Platform and App Monetization
Kyle McInnes
 
Salesforce Mobile Developer Week
Salesforce Mobile Developer WeekSalesforce Mobile Developer Week
Salesforce Mobile Developer Week
John Stevenson
 
AppNotch Enterprise
AppNotch EnterpriseAppNotch Enterprise
AppNotch Enterprise
appnotch
 
Mobile architecture options
Mobile architecture optionsMobile architecture options
Mobile architecture options
johnsprunger
 
WSO2 & eBay Case Study
WSO2 & eBay Case StudyWSO2 & eBay Case Study
WSO2 & eBay Case Study
WSO2
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
Paula Peña (She, Her, Hers)
 
The App Evolution
The App Evolution The App Evolution
The App Evolution
Dev_Events
 
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKQuickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Michael Welburn
 
Hybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and WorklightHybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and Worklight
Mohammad Omer Raza
 

What's hot (20)

Webinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
Webinar: Building HTML5 Mobile Apps with Kinvey and GizmoxWebinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
Webinar: Building HTML5 Mobile Apps with Kinvey and Gizmox
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
Pragmatic approach to building native apps hybrid way
Pragmatic approach to building native apps hybrid wayPragmatic approach to building native apps hybrid way
Pragmatic approach to building native apps hybrid way
 
Open Source World : Using Web Technologies to build native iPhone and Android...
Open Source World : Using Web Technologies to build native iPhone and Android...Open Source World : Using Web Technologies to build native iPhone and Android...
Open Source World : Using Web Technologies to build native iPhone and Android...
 
AppBattler - An Android-based SDK for game developers to enable social gaming
AppBattler - An Android-based SDK for game developers to enable social gamingAppBattler - An Android-based SDK for game developers to enable social gaming
AppBattler - An Android-based SDK for game developers to enable social gaming
 
Build Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic FrameworkBuild Consumer Apps Using Mobile SDK and Ionic Framework
Build Consumer Apps Using Mobile SDK and Ionic Framework
 
Building Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst PlatformBuilding Effective and Rapid Applications with IBM MobileFirst Platform
Building Effective and Rapid Applications with IBM MobileFirst Platform
 
Cross platform mobile application architecture for enterprise
Cross platform mobile application architecture for enterpriseCross platform mobile application architecture for enterprise
Cross platform mobile application architecture for enterprise
 
Re Inventing Enterprise IT around APIs and Apps
Re Inventing Enterprise IT around APIs and AppsRe Inventing Enterprise IT around APIs and Apps
Re Inventing Enterprise IT around APIs and Apps
 
HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7HTML5 Development with Gizmox Visual WebGui7
HTML5 Development with Gizmox Visual WebGui7
 
Nathan Crone - Resume
Nathan Crone - ResumeNathan Crone - Resume
Nathan Crone - Resume
 
BBM Social Platform and App Monetization
BBM Social Platform and App MonetizationBBM Social Platform and App Monetization
BBM Social Platform and App Monetization
 
Salesforce Mobile Developer Week
Salesforce Mobile Developer WeekSalesforce Mobile Developer Week
Salesforce Mobile Developer Week
 
AppNotch Enterprise
AppNotch EnterpriseAppNotch Enterprise
AppNotch Enterprise
 
Mobile architecture options
Mobile architecture optionsMobile architecture options
Mobile architecture options
 
WSO2 & eBay Case Study
WSO2 & eBay Case StudyWSO2 & eBay Case Study
WSO2 & eBay Case Study
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
 
The App Evolution
The App Evolution The App Evolution
The App Evolution
 
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDKQuickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
Quickly Build a Native Mobile App for your Community using Salesforce Mobile SDK
 
Hybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and WorklightHybrid Applications with WebSphere commerce and Worklight
Hybrid Applications with WebSphere commerce and Worklight
 

Viewers also liked

Provoke: Achieving enhanced personalisation through big data – David Sigerson...
Provoke: Achieving enhanced personalisation through big data – David Sigerson...Provoke: Achieving enhanced personalisation through big data – David Sigerson...
Provoke: Achieving enhanced personalisation through big data – David Sigerson...
Mando
 
What I Eat
What I EatWhat I Eat
What I Eat
guesta975ce
 
Serious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKsSerious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKs
SafeDK
 
Personalization in mobile services
Personalization in mobile servicesPersonalization in mobile services
Personalization in mobile services
Qvik
 
Why apps
Why appsWhy apps
Why apps
Krux Apps
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
Harsha Nagaraj
 
This time it's personal - iBeacon and personalisation (Jon Little)
This time it's personal - iBeacon and personalisation (Jon Little)This time it's personal - iBeacon and personalisation (Jon Little)
This time it's personal - iBeacon and personalisation (Jon Little)
Jon Little
 
Platform - Technical architecture
Platform - Technical architecturePlatform - Technical architecture
Platform - Technical architecture
David Rundle
 
PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014
Cloud Sung
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Salesforce Developers
 
The Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK AdoptionThe Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK Adoption
Kate Pietrelli
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
Jos Boumans
 
Speed to Advocacy: The New Measure of Customer Experience Excellence
Speed to Advocacy: The New Measure of Customer Experience ExcellenceSpeed to Advocacy: The New Measure of Customer Experience Excellence
Speed to Advocacy: The New Measure of Customer Experience Excellence
Bill Hobbib
 
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
ad:tech London, MMS & iMedia
 
The DMP
The DMPThe DMP
The DMP
David Tam
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
Salesforce Developers
 
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDKDeep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Amazon Web Services
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
Salesforce Developers
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning Components
Salesforce Developers
 

Viewers also liked (19)

Provoke: Achieving enhanced personalisation through big data – David Sigerson...
Provoke: Achieving enhanced personalisation through big data – David Sigerson...Provoke: Achieving enhanced personalisation through big data – David Sigerson...
Provoke: Achieving enhanced personalisation through big data – David Sigerson...
 
What I Eat
What I EatWhat I Eat
What I Eat
 
Serious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKsSerious About Your App Marketing? Here Are Your Must Have SDKs
Serious About Your App Marketing? Here Are Your Must Have SDKs
 
Personalization in mobile services
Personalization in mobile servicesPersonalization in mobile services
Personalization in mobile services
 
Why apps
Why appsWhy apps
Why apps
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
This time it's personal - iBeacon and personalisation (Jon Little)
This time it's personal - iBeacon and personalisation (Jon Little)This time it's personal - iBeacon and personalisation (Jon Little)
This time it's personal - iBeacon and personalisation (Jon Little)
 
Platform - Technical architecture
Platform - Technical architecturePlatform - Technical architecture
Platform - Technical architecture
 
PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014PIXNET iOS SDK @OSDC 2014
PIXNET iOS SDK @OSDC 2014
 
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps WebinarIntro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
Intro to Salesforce Mobile SDK: Building Hybrid Apps Webinar
 
The Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK AdoptionThe Marketing Playbook for API & SDK Adoption
The Marketing Playbook for API & SDK Adoption
 
How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...How to measure everything - a million metrics per second with minimal develop...
How to measure everything - a million metrics per second with minimal develop...
 
Speed to Advocacy: The New Measure of Customer Experience Excellence
Speed to Advocacy: The New Measure of Customer Experience ExcellenceSpeed to Advocacy: The New Measure of Customer Experience Excellence
Speed to Advocacy: The New Measure of Customer Experience Excellence
 
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
Joe Reid, Krux: People Data Activation, from paradox to paradigm @ iMedia Dat...
 
The DMP
The DMPThe DMP
The DMP
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
 
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDKDeep-Dive: Building Mobile Web Applications with AWS Mobile SDK
Deep-Dive: Building Mobile Web Applications with AWS Mobile SDK
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning Components
 

Similar to Creating personalized cross platform mobile apps with the Sitecore Mobile SDK

Sug bangalore - headless jss
Sug bangalore - headless jssSug bangalore - headless jss
Sug bangalore - headless jss
Anindita Bhattacharya
 
Developing ionic apps for android and ios
Developing ionic apps for android and iosDeveloping ionic apps for android and ios
Developing ionic apps for android and ios
gautham_m79
 
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet""BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
Software Park Thailand
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
Aleksandar Bozinovski
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
Amit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JSAmit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JS
Amit Kumar
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365
Luis Valencia
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
JUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGearJUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGear
prajods
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile Architectures
Salesforce Developers
 
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
UA Mobile
 
Headless CMS. Sitecore JSS getting started, tips and tricks
Headless CMS. Sitecore JSS getting started, tips and tricksHeadless CMS. Sitecore JSS getting started, tips and tricks
Headless CMS. Sitecore JSS getting started, tips and tricks
Artsem Prashkovich
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdk
Toby Corbin
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Bram de Jager
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
LivePerson
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
NCCOMMS
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
Stfalcon Meetups
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
Андрей Вандакуров
 

Similar to Creating personalized cross platform mobile apps with the Sitecore Mobile SDK (20)

Sug bangalore - headless jss
Sug bangalore - headless jssSug bangalore - headless jss
Sug bangalore - headless jss
 
Developing ionic apps for android and ios
Developing ionic apps for android and iosDeveloping ionic apps for android and ios
Developing ionic apps for android and ios
 
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet""BlackBerry Webworks : Apps for The Smartphone and Tablet"
"BlackBerry Webworks : Apps for The Smartphone and Tablet"
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Amit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JSAmit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JS
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB Stitch
 
JUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGearJUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGear
 
Understanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile ArchitecturesUnderstanding Native, Hybrid, and Web Mobile Architectures
Understanding Native, Hybrid, and Web Mobile Architectures
 
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
 
Headless CMS. Sitecore JSS getting started, tips and tricks
Headless CMS. Sitecore JSS getting started, tips and tricksHeadless CMS. Sitecore JSS getting started, tips and tricks
Headless CMS. Sitecore JSS getting started, tips and tricks
 
A164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdkA164 enterprise javascript ibm node sdk
A164 enterprise javascript ibm node sdk
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
 
Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices Mobile SDK: Considerations & Best Practices
Mobile SDK: Considerations & Best Practices
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 
Frontend. Global domination.
Frontend. Global domination.Frontend. Global domination.
Frontend. Global domination.
 

Recently uploaded

Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
AnkitaPandya11
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 

Recently uploaded (20)

Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 

Creating personalized cross platform mobile apps with the Sitecore Mobile SDK

  • 1. Use the mobile SDK to create personalized cross-platform apps leveraging the xDB Presented by // Mark vanAalst 12 june 2015
  • 2. Sitecore Mobile SDK Family Mobile SDK for Xamarin Mobile SDK for .NET Mobile SDK for iOS Mobile SDK for Android
  • 3. Sitecore Mobile SDK for Xamarin Powered by the Mobile SDK for .NET portable class library (PCL) Currently consistent features Single package on NuGet Xamarin SDK expected to grow
  • 4. Sitecore Mobile SDKs for mobile content delivery Manage in-app content directly from Sitecore Content marketing and updates without the traditional app update process Sitecore provides the client/serverAPIs, you provide the app One JSON REST-like web services server API – ItemWeb API Many native web service clients Clients de-serialize JSON (JavaScript) into strongly typed objects Asynchronous -Thread friendly / non-blocking
  • 7. Build native iOS and Android apps inVisual Studio Write C#. Run on 2.6 billion devices Share Code and UI Use NuGet and the Xamarin Component Store Xamarin Advantages
  • 8. Where does the SDK fit in? 8 Sitecore Mobile SDK for XamarinShared C# App Logic Platform Specific C# Platform Specific C#Platform Specific C#
  • 9. Diving into the Mobile SDK 9
  • 10. 10 What is the SDK ItemWebAPI Request Builder WebApiRequest ScApiSession Sitecore MobileC# SDK Item Objects Response HTTP Request HTTP Response Item Objects Request
  • 11. Advantages Build requests using native methods Wraps ItemWebAPI requests Deserializes response in to strong typed objects
  • 12. Setting up a session 12 Use SitecoreWebApiSessionBuilder class Security • Anonymous Session • Authenticated Session Permissions • Read-only • Read/Write Endpoint • Instance URL • Credentials • Context Site • Wep API version Item Source • Default Database • Default Language Media Library Parameters • Media Root item • Media Prefix • Default Extension • Resizing strategy var session =SitecoreWebApiSessionBuilder.AuthenticatedSessionWithHost(“http://my-host.com”) .Credentials(loginAndPasswordProvider) .Site("/sitecore/shell") .WebApiVersion("v1") .DefaultDatabase("web") .DefaultLanguage("en") .MediaLibraryRoot("/sitecore/media library") .MediaPrefix("~/media/") .DefaultMediaResourceExtension("ashx") .MediaResizingStrategy(DownloadStrategy.Plain) .BuildSession();
  • 13. Building sessions 13 The Mobile SDK provides the following builder methods: BuildReadonlySession() BuildSession() Warning: If you use a read-only session but your code contains methods that change/create content, the application will not compile. SitecoreWebApiSessionBuilder.AnonymousSessionWithHost(“http://my-host.com”).BuildReadonlySession(); SitecoreWebApiSessionBuilder.AnonymousSessionWithHost(“http://my-host.com”).BuildSession();
  • 14. Configuring your request 14 • Create, Read, Update and Delete functionality • RequestBuilder syntax is the same, scope may vary The Mobile SDK provides a set of methods to define the following properties: Database Language Version Payload Fields Scope Paging
  • 15. Usage Configure the database to get items from Mobile SDK method: Database(string) ItemWeb API param: sc_database Optional: Yes Item Request Parameters - Database 15 Database Language Version Payload Fields Scope Paging
  • 16. Usage Define the item language Mobile SDK method: Language(string) ItemWeb API param: language Optional: Yes Item Request Parameters - Language 16 Database Language Version Payload Fields Scope Paging
  • 17. Usage Define the specific version. Do not invoke for the latest version Mobile SDK method: Version(int?) ItemWeb API param: sc_itemversion Optional: Yes Item Request Parameters -Version 17 Database Language Version Payload Fields Scope Paging
  • 18. Usage Use payload type enumerator (content, default, full, min) to define the field list returned Mobile SDK method: Payload(PayloadType) ItemWeb API param: payload Optional: Yes Item Request Parameters - Payload 18 Database Language Version Payload Fields Scope Paging
  • 19. Usage Use as an alternative for payload. Set the fields returned explicitly. Mobile SDK method: AddFieldsToRead(string), AddFieldsToRead(Ilist<string>) ItemWeb API param: fields Optional: Yes Item Request Parameters - Fields 19 Database Language Version Payload Fields Scope Paging
  • 20. Usage Retrieve additional content from parent or child items Mobile SDK method: AddScope(ScopeType),AddScope(IEnummerable<ScopeType>) ItemWeb API param: scope Optional: Yes Item Request Parameters - Scope 20 Database Language Version Payload Fields Scope Paging
  • 21. Usage Get paginated data in case of large result sets Mobile SDK method: ItemsPerPage(int) PageNumber(int) ItemWeb API param: perPage page Optional: Yes Yes Item Request Parameters - Paging 21 Database Language Version Payload Fields Scope Paging
  • 23. Executing the request 23 All requests are executed by the ISitecoreWebApiSession interface instance Three overloads for ReadItemAsync • IReadItemsByIdRequest • IReadItemsByPathRequest • IReadItemsByQueryRequest * If you cannot use the async keyword with your method, use theTask.WaitAll() method instead ScItemsResponse response = await session.ReadItemAsync(request);
  • 24. Creating Items 24 Requires authenticated session! Must specify • Parent id or path • Item name • ItemTemplate var request = ItemWebApiRequestBuilder.CreateItemRequestWithParentParentPath("/path/to/parent") .ItemTemplatePath(“Sample/Sample Item”) .ItemName(“Name of new item”) .Build();
  • 25. Updating Items 25 Requires authenticated session Must specify • Field name • Field value (raw value) • Optional: language var request = ItemWebApiRequestBuilder.UpdateItemRequestWithId(“{item-id-GUID}”) .Language("en") .AddFieldsRawValuesByNameToSet("Text", “Hello!”) .Build(); var request = ItemWebApiRequestBuilder.UpdateItemRequestWithId(“{item-id-GUID}”) .Language(“dk") .AddFieldsRawValuesByNameToSet("Text", “Hej!”) .Build();
  • 26. Deleting Items 26 Requires authenticated session Must specify • Database • Optional: Scope (remove parent or children) No support for language versions! var request = ItemWebApiRequestBuilder.DeleteItemRequestWithPath(itemPath) .Database(“master”) .Build();
  • 28. Retrieving media 28 By default the mobile SDK returns the media item path Use the ItemWebApiRequestBuilder to download the media content // constructing a request string mediaPath = "/Images/green_mineraly1"; var request = ItemWebApiRequestBuilder.DownloadResourceRequestWithMediaPath(mediaPath).Build(); // processing the request using ( Stream response = awaitthis.session.DownloadMediaResourceAsync(request) ) { // working with the media resource stream }
  • 29. Uploading Media 29 Required parameters • Item name • File name • Resource data • Parent item path or parent GUID var request = ItemWebApiRequestBuilder.UploadResourceRequestWithParentId({GUID-ITEM-ID}) .ItemDataStream(stream) .ItemName("MyMediaItem") .FileName("myPhoto.jpg") .Build(); var response = await session.UploadMediaResourceAsync(request);
  • 30. HTML rendering request 30 Gets the HTML output of a Sitecore rendering Required parameters: • Source ID (Item ID) • Rendering ID var request =ItemWebApiRequestBuilder.RenderingHtmlRequestWithSourceAndRenderingId(sourceGUID, renderingGUID). Build();
  • 32. Sorry, the current SDK (1.0) does not support personalization
  • 33. Vision on Mobile and the SDK 33 Become the Sitecore integration layer for mobile apps • Upgrade the SDK to leverage the newest Sitecore features • No custom Sitecore integration needed • Easy maintainability and lower costs
  • 35. Use Mobile SDK to retrieve items Requires personalized data Do not modify Mobile SDK since this runs client side Modifications must be done server side Use plain Sitecore installation
  • 36. Sitecore.Services.Client provides a service layer on both the server and the client side of Sitecore applications that you use to develop data-driven applications. 36
  • 37. The idea 37 ServicesAPI Controller SC_ANALYTICS_GLOBAL_COOKIE “Register device” Store cookie on device ServicesAPI Controller xDB xDB Response data Request with included cookie Create request
  • 38. Sitecore ServicesWebAPI 38 Why should you use Sitecore.Services? • Anonymous user filters • Security policies • Handles logging Exposes two services • Item Service • Entity Service
  • 39. The first steps 39 • Create CustomWebClient • Add CookieContainer • Create SessionApi Controller • Register routes
  • 41. Challenges 41 Pass data within the Mobile SDK to the ItemWeb API Add personalization to the ItemWeb API
  • 43. Sending custom data using the Mobile SDK 43 Abuse fields field in a read request Mobile SDK method: AddFieldsToRead(string) ItemWeb API param: fields
  • 44. Receiving data in the ItemWeb API 44 Add custom processor in the itemWebApiGetField pipeline Add method to retrieve data
  • 45. Do something with the results 45
  • 48. 48 Questions? Do you have more questions ? Go to community.sitecore.net 1900+ professionals are there to help you