A survey of connectivity options available to folks who want to leverage their favorite business collaboration platform interacting with their favorite mobile client. Wverything from "non-app" solutions (stuff already in the smartphone) to C#/CSOM with a few alternatives in between.
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
Mobile for SharePoint with Windows Phone
1. Mobile for SharePoint
with Windows Phone Jim Wilcox
Enterprise Software Application Architect
Edgewater Technology
2. Agenda
Introductions
Client “Non-Apps”
SharePoint Web Interfaces
Development Tools / Silverlight
Office 365 SharePoint
Demo loading & updating SP List items on Windows
Phone
Best Practices
3. Introductions: Myself
Jim Wilcox
Enterprise Software Application Architect
Edgewater Technology (GOLD SPONSOR THIS YEAR!)
Hobbyist Windows Phone App Publisher
Co-Founder of
Granite State (NH) SharePoint Users Group
Granite State (NH) Windows Phone Users Group
Co-Organizer of SharePoint Saturday New Hampshire
4. Introductions: Session
Survey of ways to create SharePoint-integrated clients
on the Windows Phone platform… with a focus on
apps
Based In Part On
“SharePoint 2010 and Windows Phone 7 Training Course”
http://msdn.microsoft.com/en-us/hh292769
Developer training | Apps for Office and SharePoint
(“MODULE 19: Create Mobile Apps for SharePoint 2013”)
http://msdn.microsoft.com/en-US/office/dn448488
Office 365 Integration
Demos / Code Walkthroughs
5. Quick Rundown on Client
“Non-Apps”
May be helpful to consider tools already in the phone
Office Hub / SharePoint Workspaces
Internet Explorer
Desktop Mode
Mobile Mode
6. Quick Rundown on Client
“Non-Apps”
Office Hub / SharePoint Workspaces
Pro’s
Readily available, “free”
Con’s
Not so nicely customizable
7. Quick Rundown on Client
“Non-Apps”
Internet Explorer
Desktop Mode
Pros
Emulates desktop browser well
Fairly compatible, with lots of common functionality
Cons
Small, tough to navigate
8. Quick Rundown on Client
Non-Apps
Internet Explorer
Mobile Mode
Pros
Still excellent support for compatibility
Improves visibility on small screen
Cons
Limited functionality
Limited User experience
9. SharePoint Web Interfaces
REST API (ODATA)
_api
RSS
Social Web services
Classic SOAP Web Service Interfaces (e.g. lists.asmx)
Client Side Object Model (CSOM)
10. SharePoint Client App Dev
Challenges (for any client)
Authentication
Config
Data Caching
Exception Handling
Windows Phone Challenges
Client Side Object Model not supported in WP7
NTLM authentication not available
Silverlight framework “limitations”
everything Async
11. Silverlight
SILVERLIGHT IS DEAD! LONG LIVE XAML!
WPF like, uses XAML
Stripped down .NET even compared to the .NET Client
profile
Async everything
12. Silverlight
Dev Environment
Setting up PHONE Dev Environment
Visual Studio Express 2012 on Windows 8 (Requires Hyper-V for device
emulation)
Windows Phone 8 SDK (Installed with Visual Studio 2012 & 2013)
Bing: “Microsoft SharePoint SDK for Windows Phone 8”
http://www.microsoft.com/en-us/download/details.aspx?id=36818
SharePoint 2013 server environment
CSOM has tools to support Windows Phone 8
13. Async
Communications in Silverlight force Async, multi-
threading model.
Building UI’s with XAML
UI must be on single thread.
Deploy.Dispatch.BeginInvoke is key to getting back to UI
thread
14. Demo: Walk-thru basic WSS3
app
Visual Studio 2012 Express for Windows Phone
GSSPUG Hub
Free App
WSS3 SOAP client
Anonymous Authentication
18. Office 365 Authentication
(WITHOUT CSOM)
Present SAML token to web service
const string _login="/_forms/default.aspx?wa=wsignin1.0";
private void SubmitTokenAsync()
{
UriBuilder bldr = new UriBuilder(_uri.Scheme, _uri.Host, _uri.Port);
_submitTokenRequest = HttpWebRequest.CreateHttp(bldr.Uri + _login);
_submitTokenRequest.CookieContainer = Cookies;
_submitTokenRequest.Method = "POST";
_submitTokenRequest.BeginGetRequestStream(new AsyncCallback(Get_SubmitToken_RequestStreamCallback), null);
}
private void Get_SubmitToken_RequestStreamCallback(IAsyncResult result)
{
var requestStream = _submitTokenRequest.EndGetRequestStream(result);
using (StreamWriter w = new StreamWriter(requestStream))
{
w.Write(_token);
w.Flush();
}
_submitTokenRequest.BeginGetResponse(new AsyncCallback(Get_SubmitToken_ResponseCallback), null);
}
19. Office 365 Authentication
(WITHOUT CSOM)
Include cookie in GetListItems service call.
private void Get_SubmitToken_ResponseCallback(IAsyncResult result)
{
UriBuilder bldr = new UriBuilder(_uri.Scheme, _uri.Host, _uri.Port);
bldr.Path = null;
Cookies = _submitTokenRequest.CookieContainer;
_isAuthenticationInProgress = false;
IsAuthenticated = true;
if (OnAuthenticated != null)
{
EventArgs args = new EventArgs();
OnAuthenticated(this, args); //Call back the parent
}
}
----------------- parent
_listsClient = new ListsSoapClient();
void OnAuthenticated_GetTasks(object sender, EventArgs e)
{
_authenticationHelper = (SPAuthenticationHelper)sender;
_listsClient.CookieContainer = _authenticationHelper.Cookies;
BeginGetTasksList();
}
20. Windows Phone 8 /
SharePoint 2013
MS Training video was outdated…
….VS 2012, not 2010
…. WP8 not WP7
…. Office 365
“List” apps
CSOM
Push notifications
22. CSOM
Variant of CSOM used by SharePoint 2010
To say authentication is simplified…
public class ListDataProvider : ListDataProviderBase
{
/// <summary>
/// Provides access to ClientContext object which is used to execute queries to fetch ListItems from SharePoint server
/// </summary>
private ClientContext m_Context;
public override ClientContext Context
{
get
{
if (m_Context != null)
return m_Context;
m_Context = new ClientContext(SiteUrl);
Authenticator at = new Authenticator();
at.CookieCachingEnabled = true; //Allows authenticator to save cookies for future usage
// In case of Microsoft Online federated authentication, set ADFS authentication scheme preference for passive authentication
// Example, to set client preference for SAML 2.0 username-password authentication scheme:
// at.FederationPassiveAuthUri = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password";
m_Context.Credentials = at;
return m_Context;
}
}
23. Push Notifications
Device requests URI from PNS
Device registers URI with SharePoint App
SharePoint app is implemented to send notification
via PNS to URI,
which in turn pings the phone.
24. Push Notification Types
Toast
Appears at top of UI inside or outside of app
Tile
Updates live tile info
Raw
Notification event raised to app, which implements
its own handler (app must be running)
30. Thank You
For taking personal time to make this presentation and
event a part of your professional portfolio
Feel free to connect with me on:
Facebook: http://www.facebook.com/jwilcox1701
LinkedIn: http://www.linkedin.com/in/jimwilcox2
Twitter: @GraniteStHacker
Blog: http://GraniteStateHacker.kataire.com
Granite State (NH) SharePoint Users Group:
http://www.granitestatesharepoint.com
Granite State (NH) Windows Phone Users Group:
http://granitestatewinphone.Eventbrite.com
Yammer, Foursquare, Klout….
Notas do Editor
Who Am I? Why am I here? Husband / Dad, Tech Geek from before it was cool.Big fan of all kinds of development… Started developing software when I was in grade school, portageek… loved my TI-81 / TI-89Professional career Microsoft Geek, especially… SharePoint’s the classic jack-knife in my tool kit. It does a lot, but it’s not all I do.I also get into ASP.NET / WCF / SQL / WPF / SharePoint / Win Forms / Win PhoneFirst act of public evangelism.
Why I Hope You’re Here…But… if you need a “why/why not” or two…Pro’sIntegrationSupport (free tools!)It’s fun (Silverlight, Mobile Dev)Con’sWin Phone Not a common platform (Yet)
Talk about why it’s helpful….
Summary Slide
Summary Slide
Expand on each point
Must do WP dev direct on iron. Emulator is effectively a VM, doesn’t run inside a VM…
Begin / End, watch threading
Look around the VS 2010 Cheated: using anonymous authentication.
This is what OTHER platforms have to do without CSOM to authenticate with Office 365
Leverage these abilities with SharePoint in mind. Use Isolated Storage to support intermittent connectivity. Consider reporting errors / logging to a SharePoint list, include ULS ID in report . Consider leveraging lists and views to support view/sorts, also consider using a list by convention for configuration settings. Windows Phone supports SSL as well as a number of common crytpo algorithms.
Unit testing not supported in Express edition, of course, so you’re somewhat on your own there. I recommend taking the time to build a solution for it.WPF default templates are… minimal.App publishing experience better, but still not what I hope they may still become for Windows / WP 8.