SlideShare uma empresa Scribd logo
1 de 144
Building Solutions on the Microsoft Platformthat target iPhone, iPad, and Android Simon Guest Director, Mobility Solutions simon.guest@neudesic.com
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar)
www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar) WM6 loses 10% share in 12 months.  What will WP7 bring? RIM remains strong, but steadily eroding share Android on fire.  From 2.8% to 28.7% in 12 months iOS holding steady around 25% market share
Many customers looking at building applications targeting iPhone, iPad, and Android devices
But what if you have an existing investment  in Microsoft technology?
To give you the tools and knowledge  to connect iPhone, iPad, and Android devices to a Microsoft platform and infrastructure
“I’ve got an existing web site...”   “How do I make it render well on the iPhone and Android handsets?”
Step 1:  Need to identify mobile browsers
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) HTTP Request HTTP Response Pages Windows 7 / IE8.0
UserAgent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5 HTTP Request HTTP Response Pages iPhone OS 4.2
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.2.1 Mobile/7B334b Safari/531.21.10 HTTP Request HTTP Response Pages iPad OS 4.2
Mozilla/5.0 (Linux; U; Android 2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 HTTP Request HTTP Response Pages Android 2.2
if (useragent contains  ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 Pages if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Pages Android 2.2
if (useragent contains  ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
if (useragent contains  ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
if (useragent contains  ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
Demo:  Implementing Mobile View Engines in ASP.NET MVC 3
“Errr…  OK – but it still looks like my original webpage”
User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
Mobile Web Frameworks iUI http://iui-js.org jQTouch http://jqtouch.com jQueryMobile http://jquerymobile.com
Device-Integrated Web Frameworks Sencha Touch http://sencha.com Unify http://unify.github.com/unify PhoneGap http://phonegap.com
User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 1. Copy SiteMaster into MobileSiteMaster 2. Import jQueryMobile ASP.NET MVC ViewEngine 3. Annotate structure  of  MobileSiteMaster Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 4. Annotate  individual views Android 2.2
Demo:  Using jQueryMobile to create device specific UI
Takeaways Recommendations: ,[object Object]
Use ASP.NET MVC with ViewEngine support for device specific views
Use ASP.NET MVC 3 (not 2) for improved HTML5 attributesWatch out for: ,[object Object]
MEAPs – Mobile Enterprise Application Platforms (auto gen’d UI from single source) ,[object Object]
“We’ve covered Mobile Web pages,  but how about if my site has REST/SOAP services?”
Native Application REST iPad/iPhone OS 4.2 (ObjC) SOAP (WS-I) Android 2.2 (Java)
Native Application REST REST.svc <%@ ServiceHost Service="TRMobile.Web.Services.SessionService" Factory="System.ServiceModel.Activation.WebServiceHostFactory"  %> iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
Native Application SessionService.cs REST public class SessionService : ISessionService { public SessionSummary[] GetData() { // return active sessions     } }  iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
Native Application ISessionService.cs REST  [ServiceContract]     public interface ISessionService     { [WebGet(UriTemplate = "/Sessions", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]         [OperationContract] SessionSummary[] GetData();     } iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 1:  Youneed a JSON library http://stig.github.com
iPhoneClientViewController.m -(IBAction)callRESTService:(id)sender { 	NSURL *url = [NSURL URLWithString:@"http://sguest01/TRMobile/Services/REST.svc/Sessions"]; NSMutableURLRequest *request = [NSMutableURLRequestrequestWithURL:url]; 	[request setHTTPMethod:@"GET"]; connection = [[NSURLConnectionalloc] initWithRequest:requestdelegate:self]; 	if (connection) 	{ NSLog(@"Connection was established"); receivedData = [[NSMutableData data] retain]; 	} else { NSLog(@"Connection wasnull"); 	} } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 2:  UseNSMutableURLRequest to call the service
iPhoneClientViewController.m - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { NSLog(@"Received response from the REST call"); 	[receivedData setLength:0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { NSLog(@"Received data from the REST call"); 	[receivedDataappendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"REST call failed with an error"); } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 3:  Handle callbacks
iPhoneClientViewController.m -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"Connection finished loading"); NSString *responseString = [[NSStringalloc]initWithData:receivedData encoding:NSUTF8StringEncoding]; NSLog(@"%@",responseString); NSArray *dict = [responseStringJSONValue];  	for (id obj in dict) 	{ NSDictionary *session = [[NSDictionaryalloc] initWithDictionary:obj]; NSString *sessionCode = [session valueForKey:@"Code"]; NSLog(@"%@",sessionCode); 	} NSLog(@"Complete"); } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 4:  Get the response, deserialize JSON
Demo:  Consuming a REST based service on iPhone/iPad
“Great!  Is it a similar process on Android?”
Native Application REST Main.java HttpClienthttpClient = new DefaultHttpClient(); HttpGetrequest = new HttpGet("http://sguest01/TRMobile/Services/REST.svc/Sessions"); HttpEntityrestEntity= httpClient.execute(request).getEntity(); String restResult= new BufferedReader(new InputStreamReader(restEntity.getContent())).readLine(); Android 2.2 (Java) Step 1:  UseHttpClient and HttpGet to makeconnection
Native Application REST Main.java JSONArrayjArray = new JSONArray(restResult); for(inti=0; i<jArray.length(); i++) { JSONObject session = jArray.getJSONObject(i); Log.i("Session retrieved", "Code: "+session.getString("Code")+" - "+session.getString("Title")); } Android 2.2 (Java) Step 2:  Useorg.jsonlibraries to deserialize JSON
public void runJSONParser(){         try{         Log.i("MY INFO", "Json Parser started..");         Gsongson = new Gson(); Reader r = new InputStreamReader(getJSONData("http://search.twitter.com/trends.json”));         Log.i("MY INFO", r.toString());         TwitterTrendsobjs = gson.fromJson(r, TwitterTrends.class);         Log.i("MY INFO", ""+objs.getTrends().size());         for(TwitterTrendtr : objs.getTrends()){             Log.i("TRENDS", tr.getName() + " - " + tr.getUrl());         }         }catch(Exception ex){             ex.printStackTrace();         }     } Native Application REST Android 2.2 (Java) Step 3:  Optional – use GSON to supportserialization http://code.google.com/p/google-gson
Demo:  Consuming a REST based service on Android
“REST appears to be fairly straightforward –  but how about my services use SOAP?”
Native Application iSOAP.cs  [ServiceContract] public interface ISOAP { [OperationContract] List<SessionSummary> GetSessions(); } SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) SOAP.svc.cs public class SOAP : ISOAP { public List<SessionSummary> GetSessions() { // code to return active sessions } } Android 2.2 (Java)
No easy way of saying this, but:  “It’s not as easy as you were hoping!”
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 1:  Handcraft the SOAP request/handle the SOAP response
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 2:  Yoursearcheswilllikelytakeyou down the road of gSOAP and WSMakeStubs
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3:  wsdl2objc  (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended http://code.google.com/p/wsdl2objc
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3:  wsdl2objc  (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended
iPhoneClientViewController.m BasicHttpBinding_ISOAPBinding *myBinding = [SOAP BasicHttpBinding_ISOAPBinding]; myBinding.logXMLInOut= true; SOAP_GetTitleForCode*parameters = [[SOAP_GetTitleForCode new] autorelease]; parameters.code= [[NSStringalloc]initWithString:[numberTextField text]]; BasicHttpBinding_ISOAPBindingResponse*response = [myBindingGetTitleForCodeUsingParameters:parameters]; NSArray*responseBodyParts = response.bodyParts; for (id bodyPart in responseBodyParts) { NSString *message = [bodyPartGetTitleForCodeResult]; } Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3:  wsdl2objc  (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended
Demo:  Consuming a SOAP based service on iPhone/iPad
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3:  wsdl2objc  (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended WSDL XSD XSD
Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Step 1:  Ensurethat the namespace of the XSD elementsmatches the namespace of the service [DataContract(Namespace = "http://neudesic.com")] WSDL XSD XSD Step 2:  Considerflattening WSDL and XSD http://wcfextras.codeplex.com
“How about SOAP support on Android?  A similar story?”
wsimport Usage: wsimport [options] <WSDL_URI> where [options] include:   -b <path>                 specify jaxws/jaxb binding files or additional schemas                             (Each <path> must have its own -b)   -B<jaxbOption>            Pass this option to JAXB schema compiler   -catalog <file>           specify catalog file to resolve external entity references                             supports TR9401, XCatalog, and OASIS XML Catalog format.   -d <directory>            specify where to place generated output files   -extension                allow vendor extensions - functionality not specified                             by the specification.  Use of extensions may                             result in applications that are not portable or                             may not interoperate with other ... Native Application SOAP (WS-I) Android 2.2 (Java) Youwouldthinkthatwsimportshouldwork
Native Application SOAP (WS-I) Android 2.2 (Java) http://ksoap2.sourceforge.net
Native Application SOAP (WS-I) Android 2.2 (Java) http://code.google.com/p/ksoap2-android
Native Application SOAP (WS-I) Android 2.2 (Java) maveninstall KSOAP2-Android
Main.java String SOAP_ACTION = "http://tempuri.org/ISOAP/GetTitleForCode"; String METHOD_NAME = "GetTitleForCode"; String NAMESPACE = "http://tempuri.org/"; String URL = "http://sguest01/TRMobile/Services/SOAP.svc"; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("code","ARC310"); SoapSerializationEnvelopeenv = new SoapSerializationEnvelope(SoapEnvelope.VER11); env.dotNet= true; env.setOutputSoapObject(request); HttpTransportSE transport = new HttpTransportSE(URL); transport.call(SOAP_ACTION, env); SoapPrimitivereturnedTitle = (SoapPrimitive)env.getResponse(); Native Application SOAP (WS-I) Android 2.2 (Java)
Demo:  Consuming a SOAP based service on Android
“How about connecting iPhone, iPad, and Android to Windows Azure?”
Native Application iPad/iPhone OS 4.2 (ObjC) Web Role Mobile Web (ASP.NET MVC + jQueryMobile) REST Endpoint SOAP Endpoint Android 2.2 (Java)
Native Application PUT http://myaccount.blob.core.windows.net/mycontainer/myblockblob HTTP/1.1 Request Headers: x-ms-version: 2009-09-19 x-ms-date: Sun, 27 Sep 2009 22:33:35 GMT Content-Type: text/plain; charset=UTF-8 x-ms-blob-type: BlockBlob x-ms-meta-m1: v1 x-ms-meta-m2: v2 Authorization: SharedKey myaccount:YhuFJjN4fAR8/AmBrqBz7MG2uFinQ4rkh4dscbj598g= Content-Length: 11 Request Body: {binary representation of photo} REST AzureBlob Storage REST iPad/iPhone OS 4.2 (ObjC) AzureTable Storage REST AzureQueues Android 2.2 (Java)
Token Length Payload Length JSON formatted 0 0 32 deviceToken 0 34 message Native Application App User Acceptance TCP SSL connection Anytime when on Every 15 mins when sleep iPad/iPhone OS 4.2 (ObjC) Worker Role
https://android.apis.google.com/c2dm/send registration_id collapse_key data.<key> delay_while_idle AuthToken C2DM Native Application User Acceptance Register Intent Send Message Additional Data Android 2.2 (Java) Worker Role http://code.google.com/android/c2dm
Takeaways Recommendations: ,[object Object]
Push notification to both iOS and Android possible using Windows Azure worker roles
Get a good development environment setup with Fiddler/network snifferWatch out for: ,[object Object]
Very limited support for WS-* on native iOS and Android libraries,[object Object]
“Many of Microsoft’s server products also expose REST/SOAP.  What options exist for consuming these?”
“Let’s start with SharePoint Server”
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
Basic:  Use OOB Mobile Rendering Pros:  Easy to setup, works out of the box (with SPS2010) Cons:  Basic, non-native CSS.  No support for browser-based NTLM from Android.   No caching of username/password credentials. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2 http://itunes.apple.com/us/app/filamente-sharepoint-client
iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2 http://itunes.apple.com/us/app/shareplus-office-mobile-client
iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
Packaged:  Use AppStore/Market Client Pros:  Cheap ($10 – $20 per client).   Multiple authentication schemes.   Cached credentials.   Some offline/sync support. Cons:  All site content for mobile users.   Leaf nodes are mostly read only HTML (e.g. Announcements).  Most solutions are iPhone only (limited Android) iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
SPWeb (2007) ODATA (2010) Custom:  Native Client or Middle Web Tier Pros:  Complete custom solution.   Can even hide fact that back end is SharePoint-based. Cons: More expensive option.   Limitations with SOAP client libraries for iPhone/Android. iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
“Do the same options apply to Dynamics CRM?”
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f592ec6c-f412-4fd5-9a80-cd3bcbd26d8b
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
Basic:  Use OOB Mobile Rendering Pros:  Easy to setup, works out of the box.   Forms based authentication works with non-NTLM browsers. Cons:  Basic, non-native CSS.   Controls a little awkward.   No user-agent detection.  No caching of username/password credentials. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://tendigits.com/mobileaccess.html
iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://itunes.apple.com/us/app/cwr-mobile-crm-v4-2-for-microsoft
iPad/iPhone OS 4.2 Optimized rendering Dynamics CRM 4.0/2011 CWR/TenDigits Middle Tier Android 2.2
Packaged:  Use AppStore/Market Client Pros:  Offline access.   Cached credentials. Cons:  All site content for mobile users.  Most solutions are iPhone only (limited Android) iPad/iPhone OS 4.2 Optimized rendering Dynamics CRM 4.0/2011 CWR/TenDigits Middle Tier Android 2.2
Custom:  Native Client to Services  or Mobile Web Middle Tier Packaged:  Use AppStore/Market Client iPad/iPhone OS 4.2 Basic:  Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
Custom:  Native Client or Middle Web Tier Pros:  Complete custom solution.   Can even hide fact that back end is Dynamics-based. Cons: Limitations with SOAP client libraries for iPhone/Android.  On CRM 2011, REST endpoint only provides limited CRUD.   Web Service (SOAP) endpoint uses WS-Security with Kerberos. SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
Takeaways Recommendations: ,[object Object]
Basic Web
Packaged
Custom
Custom is (IMO) the most interesting to customersWatch out for: ,[object Object]
Packaged solutions are good, but expose whole site
Pains with SOAP libraries on devices
CRM 2011 REST interface only allows certain CRUD operations
CRM 2011 Web Service uses WS-Security w/ Kerberos tokens,[object Object]
X TDS Protocol iPad/iPhone OS 4.2 SQL Server Android 2.2
Native Application OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service SQL Server EDMX
Native Application ODATA.svc  public class ODATA : DataService<SessionModelContainer> {      public static void InitializeService(DataServiceConfigurationconfig) { config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } } ODATA iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
Native Application ODATA iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server http://interoperabilitybridges.com
Native Application odatagen ./odatagen /uri=http://sguest01/TRMobile/Services/ODATA.svc /out=. -rw-r--r--  1 Simon  staff   5738 Feb 10 13:09 SessionModelContainer.h -rw-r--r--  1 Simon  staff  14735 Feb 10 13:09 SessionModelContainer.m OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
iPhoneClientViewController.m -(IBAction)callODATAService:(id)sender { SessionModelContainer *proxy = [[SessionModelContaineralloc] initWithUri:@"http://sguest01/TRMobile/Services/ODATA.svc" credential:nil]; QueryOperationResponse *response = [proxy execute:@"Sessions"]; NSMutableArray *sessions =[response getResult]; 	for (id session in sessions) 	{ NSLog(@"Session Code: %@",[session getCode]); NSLog(@"Session Title: %@", [session getTitle]); 	} NSLog(@"Complete"); } Native Application OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
Demo:  Consuming an ODATA service on iPhone/iPad
Native Application OData Android 2.2 WCF Data Service EDMX SQL Server
Native Application ODATA Android 2.2 WCF Data Service EDMX SQL Server http://code.google.com/p/odata4j
Native Application ODATA Android 2.2 WCF Data Service EDMX SQL Server http://www.restlet.org
Note:  Must be done with the full JSE version of Restlet.jarlibraries (no generator in the Android version)! Native Application Proxy Generation lib Simon$ java -cp org.restlet.jar:org.restlet.ext.xml.jar:org.restlet.ext.atom.jar:org.restlet.ext.freemarker.jar:org.restlet.ext.odata.jar:org.freemarker.jar org.restlet.ext.odata.Generator http://sguest01/TRMobile/Services/ODATA.svc ~/Desktop/ARC310/restlet-proxy/ --------------------------- OData client code generator --------------------------- ... The source code has been generated in directory: /Users/Simon/Desktop/ARC310/restlet-proxy ODATA Android 2.2 WCF Data Service EDMX SQL Server
Main.java TrmobileWebModelsServiceservice = new TrmobileWebModelsService(); Query<sessionmodel.Session> query = service.createSessionQuery("/Sessions?$filter=startswith(Code,'VIR')%20eq%20true"); for (Session session : query) { // do work } Native Application OData Android 2.2 WCF Data Service EDMX SQL Server
Demo:  Consuming an OData service on Android
Core Data SQLLite iPad/iPhone OS 4.2 OData+Sync WCF Data Service EDMX SQL Server SQLLite Android 2.2
Takeaways Recommendations: ,[object Object]
Easy to consume through native libraries
Easy to consume lists exposed by SharePoint 2010Watch out for: ,[object Object]

Mais conteúdo relacionado

Mais procurados

Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Fabien Marry
 
Architecture app
Architecture appArchitecture app
Architecture appYnon Perek
 
Do Try This at Home! Extend IBM Connections using IBM Worklight
Do Try This at Home! Extend IBM Connections using IBM WorklightDo Try This at Home! Extend IBM Connections using IBM Worklight
Do Try This at Home! Extend IBM Connections using IBM WorklightProlifics
 
IOS8 tuto by Phonevalley-DigitasLBi
IOS8 tuto by Phonevalley-DigitasLBiIOS8 tuto by Phonevalley-DigitasLBi
IOS8 tuto by Phonevalley-DigitasLBiDigitasLBi Paris
 
iOS Ecosystem @ Fiera del Radioamatore Pordenone
iOS Ecosystem @ Fiera del Radioamatore PordenoneiOS Ecosystem @ Fiera del Radioamatore Pordenone
iOS Ecosystem @ Fiera del Radioamatore PordenoneKlaus Lanzarini
 
Life Cycle of an iPhone App
Life Cycle of an iPhone AppLife Cycle of an iPhone App
Life Cycle of an iPhone AppJohn McKerrell
 
iOS Developer Interview Questions
iOS Developer Interview QuestionsiOS Developer Interview Questions
iOS Developer Interview QuestionsClark Davidson
 
Cordova 3, apps para android
Cordova 3, apps para androidCordova 3, apps para android
Cordova 3, apps para androidDroidcon Spain
 
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
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgZiyad Bazed
 
Training on webwroks1
Training on webwroks1Training on webwroks1
Training on webwroks1sumeettechno
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Matheus Cardoso
 
Introduction to j query mobile framework
Introduction to j query mobile frameworkIntroduction to j query mobile framework
Introduction to j query mobile frameworkShreerang Patwardhan
 
Join the geeks: why designers should contribute to free and open source software
Join the geeks: why designers should contribute to free and open source softwareJoin the geeks: why designers should contribute to free and open source software
Join the geeks: why designers should contribute to free and open source softwareBelen Barros Pena
 
Mobile fragmentation, fact or myth?
Mobile fragmentation, fact or myth?Mobile fragmentation, fact or myth?
Mobile fragmentation, fact or myth?Belen Barros Pena
 
Fragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionFragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionBelen Barros Pena
 

Mais procurados (20)

Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
Why the iPad UI matters, And how it differs from the Tablet PC, but also from...
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Do Try This at Home! Extend IBM Connections using IBM Worklight
Do Try This at Home! Extend IBM Connections using IBM WorklightDo Try This at Home! Extend IBM Connections using IBM Worklight
Do Try This at Home! Extend IBM Connections using IBM Worklight
 
Sharepoint mobile
Sharepoint mobileSharepoint mobile
Sharepoint mobile
 
IOS8 tuto by Phonevalley-DigitasLBi
IOS8 tuto by Phonevalley-DigitasLBiIOS8 tuto by Phonevalley-DigitasLBi
IOS8 tuto by Phonevalley-DigitasLBi
 
iOS Ecosystem @ Fiera del Radioamatore Pordenone
iOS Ecosystem @ Fiera del Radioamatore PordenoneiOS Ecosystem @ Fiera del Radioamatore Pordenone
iOS Ecosystem @ Fiera del Radioamatore Pordenone
 
Life Cycle of an iPhone App
Life Cycle of an iPhone AppLife Cycle of an iPhone App
Life Cycle of an iPhone App
 
Android
AndroidAndroid
Android
 
iOS Developer Interview Questions
iOS Developer Interview QuestionsiOS Developer Interview Questions
iOS Developer Interview Questions
 
Cordova 3, apps para android
Cordova 3, apps para androidCordova 3, apps para android
Cordova 3, apps para 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...
Open Source World : Using Web Technologies to build native iPhone and Android...
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdg
 
Training on webwroks1
Training on webwroks1Training on webwroks1
Training on webwroks1
 
Android Workshop PPT
Android Workshop PPTAndroid Workshop PPT
Android Workshop PPT
 
Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!Ionic Framework: Let's build amazing apps. No Excuses!
Ionic Framework: Let's build amazing apps. No Excuses!
 
Introduction to Android Environment
Introduction to Android EnvironmentIntroduction to Android Environment
Introduction to Android Environment
 
Introduction to j query mobile framework
Introduction to j query mobile frameworkIntroduction to j query mobile framework
Introduction to j query mobile framework
 
Join the geeks: why designers should contribute to free and open source software
Join the geeks: why designers should contribute to free and open source softwareJoin the geeks: why designers should contribute to free and open source software
Join the geeks: why designers should contribute to free and open source software
 
Mobile fragmentation, fact or myth?
Mobile fragmentation, fact or myth?Mobile fragmentation, fact or myth?
Mobile fragmentation, fact or myth?
 
Fragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionFragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fiction
 

Destaque

Developing Enterprise-Grade Mobile Applications
Developing Enterprise-Grade Mobile ApplicationsDeveloping Enterprise-Grade Mobile Applications
Developing Enterprise-Grade Mobile ApplicationsSimon Guest
 
Developing iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureDeveloping iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureSimon Guest
 
TechEd Preconference
TechEd PreconferenceTechEd Preconference
TechEd PreconferenceSimon Guest
 
Top Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentTop Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentSimon Guest
 
Demystifying The Cloud
Demystifying The CloudDemystifying The Cloud
Demystifying The CloudSimon Guest
 
Objective View of MEAPs
Objective View of MEAPsObjective View of MEAPs
Objective View of MEAPsSimon Guest
 
Windows Azure Toolkit for iOS
Windows Azure Toolkit for iOSWindows Azure Toolkit for iOS
Windows Azure Toolkit for iOSSimon Guest
 
My customers are using iPhone/Android, but I'm a Microsoft Guy.
My customers are using iPhone/Android, but I'm a Microsoft Guy.My customers are using iPhone/Android, but I'm a Microsoft Guy.
My customers are using iPhone/Android, but I'm a Microsoft Guy.Simon Guest
 
Patterns For Moving To The Cloud
Patterns For Moving To The CloudPatterns For Moving To The Cloud
Patterns For Moving To The CloudSimon Guest
 
Patterns for Cloud Computing
Patterns for Cloud ComputingPatterns for Cloud Computing
Patterns for Cloud ComputingSimon Guest
 
iPhone and iPad Security
iPhone and iPad SecurityiPhone and iPad Security
iPhone and iPad SecuritySimon Guest
 
Impact Of The Cloud For IT Managers
Impact Of The Cloud For IT ManagersImpact Of The Cloud For IT Managers
Impact Of The Cloud For IT ManagersSimon Guest
 
Architectural Principles for Software + Services
Architectural Principles for Software + ServicesArchitectural Principles for Software + Services
Architectural Principles for Software + ServicesSimon Guest
 
ReMix Keynote (Vienna, Austria)
ReMix Keynote (Vienna, Austria)ReMix Keynote (Vienna, Austria)
ReMix Keynote (Vienna, Austria)Simon Guest
 
Interviewing Techniques
Interviewing TechniquesInterviewing Techniques
Interviewing TechniquesSimon Guest
 
Next Generation LOB (Line of Business) Applications
Next Generation LOB (Line of Business) ApplicationsNext Generation LOB (Line of Business) Applications
Next Generation LOB (Line of Business) ApplicationsSimon Guest
 
Indoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsIndoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsSimon Guest
 
Future of Mobility
Future of MobilityFuture of Mobility
Future of MobilitySimon Guest
 
Creating Context-Aware Applications
Creating Context-Aware ApplicationsCreating Context-Aware Applications
Creating Context-Aware ApplicationsSimon Guest
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 

Destaque (20)

Developing Enterprise-Grade Mobile Applications
Developing Enterprise-Grade Mobile ApplicationsDeveloping Enterprise-Grade Mobile Applications
Developing Enterprise-Grade Mobile Applications
 
Developing iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows AzureDeveloping iPhone and iPad apps that leverage Windows Azure
Developing iPhone and iPad apps that leverage Windows Azure
 
TechEd Preconference
TechEd PreconferenceTechEd Preconference
TechEd Preconference
 
Top Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web DevelopmentTop Ten Tips for HTML5/Mobile Web Development
Top Ten Tips for HTML5/Mobile Web Development
 
Demystifying The Cloud
Demystifying The CloudDemystifying The Cloud
Demystifying The Cloud
 
Objective View of MEAPs
Objective View of MEAPsObjective View of MEAPs
Objective View of MEAPs
 
Windows Azure Toolkit for iOS
Windows Azure Toolkit for iOSWindows Azure Toolkit for iOS
Windows Azure Toolkit for iOS
 
My customers are using iPhone/Android, but I'm a Microsoft Guy.
My customers are using iPhone/Android, but I'm a Microsoft Guy.My customers are using iPhone/Android, but I'm a Microsoft Guy.
My customers are using iPhone/Android, but I'm a Microsoft Guy.
 
Patterns For Moving To The Cloud
Patterns For Moving To The CloudPatterns For Moving To The Cloud
Patterns For Moving To The Cloud
 
Patterns for Cloud Computing
Patterns for Cloud ComputingPatterns for Cloud Computing
Patterns for Cloud Computing
 
iPhone and iPad Security
iPhone and iPad SecurityiPhone and iPad Security
iPhone and iPad Security
 
Impact Of The Cloud For IT Managers
Impact Of The Cloud For IT ManagersImpact Of The Cloud For IT Managers
Impact Of The Cloud For IT Managers
 
Architectural Principles for Software + Services
Architectural Principles for Software + ServicesArchitectural Principles for Software + Services
Architectural Principles for Software + Services
 
ReMix Keynote (Vienna, Austria)
ReMix Keynote (Vienna, Austria)ReMix Keynote (Vienna, Austria)
ReMix Keynote (Vienna, Austria)
 
Interviewing Techniques
Interviewing TechniquesInterviewing Techniques
Interviewing Techniques
 
Next Generation LOB (Line of Business) Applications
Next Generation LOB (Line of Business) ApplicationsNext Generation LOB (Line of Business) Applications
Next Generation LOB (Line of Business) Applications
 
Indoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsIndoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeacons
 
Future of Mobility
Future of MobilityFuture of Mobility
Future of Mobility
 
Creating Context-Aware Applications
Creating Context-Aware ApplicationsCreating Context-Aware Applications
Creating Context-Aware Applications
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 

Semelhante a Building solutions on the Microsoft platform that target iPhone, iPad, and Android devices

Internet explorer mobile 6
Internet explorer mobile 6Internet explorer mobile 6
Internet explorer mobile 6Ralph Vaz
 
Advanced Netscaler Customizations-BriForum 2011
Advanced Netscaler Customizations-BriForum 2011Advanced Netscaler Customizations-BriForum 2011
Advanced Netscaler Customizations-BriForum 2011shoesing
 
Bri forum 2011 advanced netscaler customizations
Bri forum 2011   advanced netscaler customizationsBri forum 2011   advanced netscaler customizations
Bri forum 2011 advanced netscaler customizationsCCOSTAN
 
Os Henrikson
Os HenriksonOs Henrikson
Os Henriksonoscon2007
 
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...MongoDB
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppSt. Petersburg College
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaChristian Heilmann
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Patrick Lauke
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile TechnologiesTalentica Software
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-airbrucelawson
 
Going mobile with Kentico CMS
Going mobile with Kentico CMSGoing mobile with Kentico CMS
Going mobile with Kentico CMSThomas Robbins
 
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationOpen Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationTom Deryckere
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material designSrinadh Kanugala
 
Don't touch the mobile parts
Don't touch the mobile partsDon't touch the mobile parts
Don't touch the mobile partsFrancesco Fullone
 

Semelhante a Building solutions on the Microsoft platform that target iPhone, iPad, and Android devices (20)

Internet explorer mobile 6
Internet explorer mobile 6Internet explorer mobile 6
Internet explorer mobile 6
 
Advanced Netscaler Customizations-BriForum 2011
Advanced Netscaler Customizations-BriForum 2011Advanced Netscaler Customizations-BriForum 2011
Advanced Netscaler Customizations-BriForum 2011
 
Bri forum 2011 advanced netscaler customizations
Bri forum 2011   advanced netscaler customizationsBri forum 2011   advanced netscaler customizations
Bri forum 2011 advanced netscaler customizations
 
Os Henrikson
Os HenriksonOs Henrikson
Os Henrikson
 
Flourish2011
Flourish2011Flourish2011
Flourish2011
 
Mobile for web
Mobile for webMobile for web
Mobile for web
 
DDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su LotusDDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su Lotus
 
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
MongoDB.local Atlanta: MongoDB Mobile: Bringing the Power of MongoDB to Your ...
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
Micro frontends
Micro frontendsMicro frontends
Micro frontends
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
 
Going mobile with Kentico CMS
Going mobile with Kentico CMSGoing mobile with Kentico CMS
Going mobile with Kentico CMS
 
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web FragmentationOpen Source to the Rescue of Mobile App and Mobile Web Fragmentation
Open Source to the Rescue of Mobile App and Mobile Web Fragmentation
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
mobicon_paper
mobicon_papermobicon_paper
mobicon_paper
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
 
Don't touch the mobile parts
Don't touch the mobile partsDon't touch the mobile parts
Don't touch the mobile parts
 

Mais de Simon Guest

10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity10 Life Hacks for Better Productivity
10 Life Hacks for Better ProductivitySimon Guest
 
Building a Great Engineering Culture
Building a Great Engineering CultureBuilding a Great Engineering Culture
Building a Great Engineering CultureSimon Guest
 
Presentation Anti-Patterns
Presentation Anti-PatternsPresentation Anti-Patterns
Presentation Anti-PatternsSimon Guest
 
10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity10 Life Hacks for Better Productivity
10 Life Hacks for Better ProductivitySimon Guest
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScriptSimon Guest
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSSimon Guest
 
Enterprise Social Networking - Myth or Magic?
Enterprise Social Networking - Myth or Magic?Enterprise Social Networking - Myth or Magic?
Enterprise Social Networking - Myth or Magic?Simon Guest
 
Patterns For Cloud Computing
Patterns For Cloud ComputingPatterns For Cloud Computing
Patterns For Cloud ComputingSimon Guest
 
User Driven Software Architecture
User Driven Software ArchitectureUser Driven Software Architecture
User Driven Software ArchitectureSimon Guest
 

Mais de Simon Guest (9)

10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity
 
Building a Great Engineering Culture
Building a Great Engineering CultureBuilding a Great Engineering Culture
Building a Great Engineering Culture
 
Presentation Anti-Patterns
Presentation Anti-PatternsPresentation Anti-Patterns
Presentation Anti-Patterns
 
10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity10 Life Hacks for Better Productivity
10 Life Hacks for Better Productivity
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Enterprise Social Networking - Myth or Magic?
Enterprise Social Networking - Myth or Magic?Enterprise Social Networking - Myth or Magic?
Enterprise Social Networking - Myth or Magic?
 
Patterns For Cloud Computing
Patterns For Cloud ComputingPatterns For Cloud Computing
Patterns For Cloud Computing
 
User Driven Software Architecture
User Driven Software ArchitectureUser Driven Software Architecture
User Driven Software Architecture
 

Último

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Building solutions on the Microsoft platform that target iPhone, iPad, and Android devices

  • 1. Building Solutions on the Microsoft Platformthat target iPhone, iPad, and Android Simon Guest Director, Mobility Solutions simon.guest@neudesic.com
  • 2.
  • 15. www.comscore.com/Products_Services/Product_Index/MobiLens (trend used for Dec and Mar) WM6 loses 10% share in 12 months. What will WP7 bring? RIM remains strong, but steadily eroding share Android on fire. From 2.8% to 28.7% in 12 months iOS holding steady around 25% market share
  • 16. Many customers looking at building applications targeting iPhone, iPad, and Android devices
  • 17. But what if you have an existing investment in Microsoft technology?
  • 18.
  • 19. To give you the tools and knowledge to connect iPhone, iPad, and Android devices to a Microsoft platform and infrastructure
  • 20.
  • 21.
  • 22. “I’ve got an existing web site...” “How do I make it render well on the iPhone and Android handsets?”
  • 23. Step 1: Need to identify mobile browsers
  • 24. User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) HTTP Request HTTP Response Pages Windows 7 / IE8.0
  • 25. UserAgent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5 HTTP Request HTTP Response Pages iPhone OS 4.2
  • 26. Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.2.1 Mobile/7B334b Safari/531.21.10 HTTP Request HTTP Response Pages iPad OS 4.2
  • 27. Mozilla/5.0 (Linux; U; Android 2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 HTTP Request HTTP Response Pages Android 2.2
  • 28. if (useragent contains ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 Pages if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Pages Android 2.2
  • 29. if (useragent contains ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
  • 30. if (useragent contains ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
  • 31. if (useragent contains ”MSIE”)… User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine if (useragentcontains ”Android”)… Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
  • 32. Demo: Implementing Mobile View Engines in ASP.NET MVC 3
  • 33. “Errr… OK – but it still looks like my original webpage”
  • 34. User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
  • 35. Mobile Web Frameworks iUI http://iui-js.org jQTouch http://jqtouch.com jQueryMobile http://jquerymobile.com
  • 36. Device-Integrated Web Frameworks Sencha Touch http://sencha.com Unify http://unify.github.com/unify PhoneGap http://phonegap.com
  • 37. User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 View CSS Controller ASP.NET MVC ViewEngine Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 View CSS Android 2.2
  • 38. User-Agent: Mozilla/4.0 (compatible; MSIE8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Windows 7 / IE8.0 1. Copy SiteMaster into MobileSiteMaster 2. Import jQueryMobile ASP.NET MVC ViewEngine 3. Annotate structure of MobileSiteMaster Mozilla/5.0 (Linux; U; Android2.2; en-gb; Nexus One Build/FRF50) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 4. Annotate individual views Android 2.2
  • 39. Demo: Using jQueryMobile to create device specific UI
  • 40.
  • 41. Use ASP.NET MVC with ViewEngine support for device specific views
  • 42.
  • 43.
  • 44. “We’ve covered Mobile Web pages, but how about if my site has REST/SOAP services?”
  • 45. Native Application REST iPad/iPhone OS 4.2 (ObjC) SOAP (WS-I) Android 2.2 (Java)
  • 46. Native Application REST REST.svc <%@ ServiceHost Service="TRMobile.Web.Services.SessionService" Factory="System.ServiceModel.Activation.WebServiceHostFactory" %> iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
  • 47. Native Application SessionService.cs REST public class SessionService : ISessionService { public SessionSummary[] GetData() { // return active sessions } } iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
  • 48. Native Application ISessionService.cs REST [ServiceContract] public interface ISessionService { [WebGet(UriTemplate = "/Sessions", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] [OperationContract] SessionSummary[] GetData(); } iPad/iPhone OS 4.2 (ObjC) Android 2.2 (Java)
  • 49. Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 1: Youneed a JSON library http://stig.github.com
  • 50. iPhoneClientViewController.m -(IBAction)callRESTService:(id)sender { NSURL *url = [NSURL URLWithString:@"http://sguest01/TRMobile/Services/REST.svc/Sessions"]; NSMutableURLRequest *request = [NSMutableURLRequestrequestWithURL:url]; [request setHTTPMethod:@"GET"]; connection = [[NSURLConnectionalloc] initWithRequest:requestdelegate:self]; if (connection) { NSLog(@"Connection was established"); receivedData = [[NSMutableData data] retain]; } else { NSLog(@"Connection wasnull"); } } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 2: UseNSMutableURLRequest to call the service
  • 51. iPhoneClientViewController.m - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { NSLog(@"Received response from the REST call"); [receivedData setLength:0]; } -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { NSLog(@"Received data from the REST call"); [receivedDataappendData:data]; } -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"REST call failed with an error"); } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 3: Handle callbacks
  • 52. iPhoneClientViewController.m -(void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"Connection finished loading"); NSString *responseString = [[NSStringalloc]initWithData:receivedData encoding:NSUTF8StringEncoding]; NSLog(@"%@",responseString); NSArray *dict = [responseStringJSONValue]; for (id obj in dict) { NSDictionary *session = [[NSDictionaryalloc] initWithDictionary:obj]; NSString *sessionCode = [session valueForKey:@"Code"]; NSLog(@"%@",sessionCode); } NSLog(@"Complete"); } Native Application REST iPad/iPhone OS 4.2 (ObjC) Step 4: Get the response, deserialize JSON
  • 53. Demo: Consuming a REST based service on iPhone/iPad
  • 54. “Great! Is it a similar process on Android?”
  • 55. Native Application REST Main.java HttpClienthttpClient = new DefaultHttpClient(); HttpGetrequest = new HttpGet("http://sguest01/TRMobile/Services/REST.svc/Sessions"); HttpEntityrestEntity= httpClient.execute(request).getEntity(); String restResult= new BufferedReader(new InputStreamReader(restEntity.getContent())).readLine(); Android 2.2 (Java) Step 1: UseHttpClient and HttpGet to makeconnection
  • 56. Native Application REST Main.java JSONArrayjArray = new JSONArray(restResult); for(inti=0; i<jArray.length(); i++) { JSONObject session = jArray.getJSONObject(i); Log.i("Session retrieved", "Code: "+session.getString("Code")+" - "+session.getString("Title")); } Android 2.2 (Java) Step 2: Useorg.jsonlibraries to deserialize JSON
  • 57. public void runJSONParser(){         try{         Log.i("MY INFO", "Json Parser started..");         Gsongson = new Gson(); Reader r = new InputStreamReader(getJSONData("http://search.twitter.com/trends.json”));         Log.i("MY INFO", r.toString());         TwitterTrendsobjs = gson.fromJson(r, TwitterTrends.class);         Log.i("MY INFO", ""+objs.getTrends().size());         for(TwitterTrendtr : objs.getTrends()){             Log.i("TRENDS", tr.getName() + " - " + tr.getUrl());         }         }catch(Exception ex){             ex.printStackTrace();         }     } Native Application REST Android 2.2 (Java) Step 3: Optional – use GSON to supportserialization http://code.google.com/p/google-gson
  • 58. Demo: Consuming a REST based service on Android
  • 59. “REST appears to be fairly straightforward – but how about my services use SOAP?”
  • 60. Native Application iSOAP.cs [ServiceContract] public interface ISOAP { [OperationContract] List<SessionSummary> GetSessions(); } SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) SOAP.svc.cs public class SOAP : ISOAP { public List<SessionSummary> GetSessions() { // code to return active sessions } } Android 2.2 (Java)
  • 61. No easy way of saying this, but: “It’s not as easy as you were hoping!”
  • 62. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 1: Handcraft the SOAP request/handle the SOAP response
  • 63. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 2: Yoursearcheswilllikelytakeyou down the road of gSOAP and WSMakeStubs
  • 64. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3: wsdl2objc (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended http://code.google.com/p/wsdl2objc
  • 65. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3: wsdl2objc (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended
  • 66. iPhoneClientViewController.m BasicHttpBinding_ISOAPBinding *myBinding = [SOAP BasicHttpBinding_ISOAPBinding]; myBinding.logXMLInOut= true; SOAP_GetTitleForCode*parameters = [[SOAP_GetTitleForCode new] autorelease]; parameters.code= [[NSStringalloc]initWithString:[numberTextField text]]; BasicHttpBinding_ISOAPBindingResponse*response = [myBindingGetTitleForCodeUsingParameters:parameters]; NSArray*responseBodyParts = response.bodyParts; for (id bodyPart in responseBodyParts) { NSString *message = [bodyPartGetTitleForCodeResult]; } Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3: wsdl2objc (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended
  • 67. Demo: Consuming a SOAP based service on iPhone/iPad
  • 68. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Option 3: wsdl2objc (http://code.google.com/p/wsdl2objc/) Version 0.7-pre1 recommended WSDL XSD XSD
  • 69. Native Application SOAP (WS-I) iPad/iPhone OS 4.2 (ObjC) Step 1: Ensurethat the namespace of the XSD elementsmatches the namespace of the service [DataContract(Namespace = "http://neudesic.com")] WSDL XSD XSD Step 2: Considerflattening WSDL and XSD http://wcfextras.codeplex.com
  • 70. “How about SOAP support on Android? A similar story?”
  • 71. wsimport Usage: wsimport [options] <WSDL_URI> where [options] include: -b <path> specify jaxws/jaxb binding files or additional schemas (Each <path> must have its own -b) -B<jaxbOption> Pass this option to JAXB schema compiler -catalog <file> specify catalog file to resolve external entity references supports TR9401, XCatalog, and OASIS XML Catalog format. -d <directory> specify where to place generated output files -extension allow vendor extensions - functionality not specified by the specification. Use of extensions may result in applications that are not portable or may not interoperate with other ... Native Application SOAP (WS-I) Android 2.2 (Java) Youwouldthinkthatwsimportshouldwork
  • 72. Native Application SOAP (WS-I) Android 2.2 (Java) http://ksoap2.sourceforge.net
  • 73. Native Application SOAP (WS-I) Android 2.2 (Java) http://code.google.com/p/ksoap2-android
  • 74. Native Application SOAP (WS-I) Android 2.2 (Java) maveninstall KSOAP2-Android
  • 75. Main.java String SOAP_ACTION = "http://tempuri.org/ISOAP/GetTitleForCode"; String METHOD_NAME = "GetTitleForCode"; String NAMESPACE = "http://tempuri.org/"; String URL = "http://sguest01/TRMobile/Services/SOAP.svc"; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("code","ARC310"); SoapSerializationEnvelopeenv = new SoapSerializationEnvelope(SoapEnvelope.VER11); env.dotNet= true; env.setOutputSoapObject(request); HttpTransportSE transport = new HttpTransportSE(URL); transport.call(SOAP_ACTION, env); SoapPrimitivereturnedTitle = (SoapPrimitive)env.getResponse(); Native Application SOAP (WS-I) Android 2.2 (Java)
  • 76. Demo: Consuming a SOAP based service on Android
  • 77. “How about connecting iPhone, iPad, and Android to Windows Azure?”
  • 78. Native Application iPad/iPhone OS 4.2 (ObjC) Web Role Mobile Web (ASP.NET MVC + jQueryMobile) REST Endpoint SOAP Endpoint Android 2.2 (Java)
  • 79. Native Application PUT http://myaccount.blob.core.windows.net/mycontainer/myblockblob HTTP/1.1 Request Headers: x-ms-version: 2009-09-19 x-ms-date: Sun, 27 Sep 2009 22:33:35 GMT Content-Type: text/plain; charset=UTF-8 x-ms-blob-type: BlockBlob x-ms-meta-m1: v1 x-ms-meta-m2: v2 Authorization: SharedKey myaccount:YhuFJjN4fAR8/AmBrqBz7MG2uFinQ4rkh4dscbj598g= Content-Length: 11 Request Body: {binary representation of photo} REST AzureBlob Storage REST iPad/iPhone OS 4.2 (ObjC) AzureTable Storage REST AzureQueues Android 2.2 (Java)
  • 80. Token Length Payload Length JSON formatted 0 0 32 deviceToken 0 34 message Native Application App User Acceptance TCP SSL connection Anytime when on Every 15 mins when sleep iPad/iPhone OS 4.2 (ObjC) Worker Role
  • 81. https://android.apis.google.com/c2dm/send registration_id collapse_key data.<key> delay_while_idle AuthToken C2DM Native Application User Acceptance Register Intent Send Message Additional Data Android 2.2 (Java) Worker Role http://code.google.com/android/c2dm
  • 82.
  • 83. Push notification to both iOS and Android possible using Windows Azure worker roles
  • 84.
  • 85.
  • 86. “Many of Microsoft’s server products also expose REST/SOAP. What options exist for consuming these?”
  • 87. “Let’s start with SharePoint Server”
  • 88. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
  • 89. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 90. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 91. Basic: Use OOB Mobile Rendering Pros: Easy to setup, works out of the box (with SPS2010) Cons: Basic, non-native CSS. No support for browser-based NTLM from Android. No caching of username/password credentials. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 92. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
  • 93. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2 http://itunes.apple.com/us/app/filamente-sharepoint-client
  • 94. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2 http://itunes.apple.com/us/app/shareplus-office-mobile-client
  • 95. iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 96. Packaged: Use AppStore/Market Client Pros: Cheap ($10 – $20 per client). Multiple authentication schemes. Cached credentials. Some offline/sync support. Cons: All site content for mobile users. Leaf nodes are mostly read only HTML (e.g. Announcements). Most solutions are iPhone only (limited Android) iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 97. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering SharePoint Server 2007/2010 Android 2.2
  • 98. SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 SharePoint Server 2007/2010 Android 2.2
  • 99. SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
  • 100. SPWeb (2007) ODATA (2010) iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
  • 101. SPWeb (2007) ODATA (2010) Custom: Native Client or Middle Web Tier Pros: Complete custom solution. Can even hide fact that back end is SharePoint-based. Cons: More expensive option. Limitations with SOAP client libraries for iPhone/Android. iPad/iPhone OS 4.2 Mobile Web Rendering of information useful to Mobile clients SharePoint Server 2007/2010 ASP.NET MVC Middle Tier (jQueryMobile) Android 2.2
  • 102. “Do the same options apply to Dynamics CRM?”
  • 103. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
  • 104. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 105. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f592ec6c-f412-4fd5-9a80-cd3bcbd26d8b
  • 106. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 107. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 108. Basic: Use OOB Mobile Rendering Pros: Easy to setup, works out of the box. Forms based authentication works with non-NTLM browsers. Cons: Basic, non-native CSS. Controls a little awkward. No user-agent detection. No caching of username/password credentials. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 109. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
  • 110. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://tendigits.com/mobileaccess.html
  • 111. iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2 http://itunes.apple.com/us/app/cwr-mobile-crm-v4-2-for-microsoft
  • 112. iPad/iPhone OS 4.2 Optimized rendering Dynamics CRM 4.0/2011 CWR/TenDigits Middle Tier Android 2.2
  • 113. Packaged: Use AppStore/Market Client Pros: Offline access. Cached credentials. Cons: All site content for mobile users. Most solutions are iPhone only (limited Android) iPad/iPhone OS 4.2 Optimized rendering Dynamics CRM 4.0/2011 CWR/TenDigits Middle Tier Android 2.2
  • 114. Custom: Native Client to Services or Mobile Web Middle Tier Packaged: Use AppStore/Market Client iPad/iPhone OS 4.2 Basic: Use OOB Mobile Rendering Dynamics CRM 4.0/2011 Android 2.2
  • 115. SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 116. SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 117. Custom: Native Client or Middle Web Tier Pros: Complete custom solution. Can even hide fact that back end is Dynamics-based. Cons: Limitations with SOAP client libraries for iPhone/Android. On CRM 2011, REST endpoint only provides limited CRUD. Web Service (SOAP) endpoint uses WS-Security with Kerberos. SOAP Web Services (4.0) REST Endpoint (2011) Updated Web Services (2011) ODATA (2011) iPad/iPhone OS 4.2 Dynamics CRM 4.0/2011 Android 2.2
  • 118.
  • 121. Custom
  • 122.
  • 123. Packaged solutions are good, but expose whole site
  • 124. Pains with SOAP libraries on devices
  • 125. CRM 2011 REST interface only allows certain CRUD operations
  • 126.
  • 127.
  • 128. X TDS Protocol iPad/iPhone OS 4.2 SQL Server Android 2.2
  • 129. Native Application OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service SQL Server EDMX
  • 130. Native Application ODATA.svc public class ODATA : DataService<SessionModelContainer> { public static void InitializeService(DataServiceConfigurationconfig) { config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } } ODATA iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
  • 131. Native Application ODATA iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server http://interoperabilitybridges.com
  • 132. Native Application odatagen ./odatagen /uri=http://sguest01/TRMobile/Services/ODATA.svc /out=. -rw-r--r-- 1 Simon staff 5738 Feb 10 13:09 SessionModelContainer.h -rw-r--r-- 1 Simon staff 14735 Feb 10 13:09 SessionModelContainer.m OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
  • 133. iPhoneClientViewController.m -(IBAction)callODATAService:(id)sender { SessionModelContainer *proxy = [[SessionModelContaineralloc] initWithUri:@"http://sguest01/TRMobile/Services/ODATA.svc" credential:nil]; QueryOperationResponse *response = [proxy execute:@"Sessions"]; NSMutableArray *sessions =[response getResult]; for (id session in sessions) { NSLog(@"Session Code: %@",[session getCode]); NSLog(@"Session Title: %@", [session getTitle]); } NSLog(@"Complete"); } Native Application OData iPad/iPhone OS 4.2 (ObjC) WCF Data Service EDMX SQL Server
  • 134. Demo: Consuming an ODATA service on iPhone/iPad
  • 135. Native Application OData Android 2.2 WCF Data Service EDMX SQL Server
  • 136. Native Application ODATA Android 2.2 WCF Data Service EDMX SQL Server http://code.google.com/p/odata4j
  • 137. Native Application ODATA Android 2.2 WCF Data Service EDMX SQL Server http://www.restlet.org
  • 138. Note: Must be done with the full JSE version of Restlet.jarlibraries (no generator in the Android version)! Native Application Proxy Generation lib Simon$ java -cp org.restlet.jar:org.restlet.ext.xml.jar:org.restlet.ext.atom.jar:org.restlet.ext.freemarker.jar:org.restlet.ext.odata.jar:org.freemarker.jar org.restlet.ext.odata.Generator http://sguest01/TRMobile/Services/ODATA.svc ~/Desktop/ARC310/restlet-proxy/ --------------------------- OData client code generator --------------------------- ... The source code has been generated in directory: /Users/Simon/Desktop/ARC310/restlet-proxy ODATA Android 2.2 WCF Data Service EDMX SQL Server
  • 139. Main.java TrmobileWebModelsServiceservice = new TrmobileWebModelsService(); Query<sessionmodel.Session> query = service.createSessionQuery("/Sessions?$filter=startswith(Code,'VIR')%20eq%20true"); for (Session session : query) { // do work } Native Application OData Android 2.2 WCF Data Service EDMX SQL Server
  • 140. Demo: Consuming an OData service on Android
  • 141. Core Data SQLLite iPad/iPhone OS 4.2 OData+Sync WCF Data Service EDMX SQL Server SQLLite Android 2.2
  • 142.
  • 143. Easy to consume through native libraries
  • 144.
  • 146.
  • 147. “…but I don’t want to learn Objective C or Java!” “I just want to do C#...”
  • 148. Mono 1.0 (C# 1.0) 1.2 (C# 2.0) 2.0 (C# 3.0) 2.8 (C# 4.0) Mono Touch 1.0 Mono Droid Beta Sharp Develop Full AOT Mono Touch 2.0/3.0 1.1 2004 2005 2006 2007 2008 2009 2010 2011
  • 149. MacOSX/XCode specific MonoDevelop Interface Builder Uses Uses C# UI Kit Mono compiler Saved as MSIL XIB “mscorlib.dll” AOT (Ahead of Time) compiler Native iPad/iPhone OS 4.2
  • 150. Demo: Building a simple application using MonoTouch
  • 151. Use MT for library only Interface Builder XCode MonoDevelop Uses Uses Import existing UI Kit Objective C C# Library Saved as Compiles to Mono compiler XIB MSIL AOT compiler Native mylibrary.dll.s iPad/iPhone OS 4.2
  • 152. Eclipse optional MonoDevelop Eclipse ADT Uses Saved as Android bindings C# main.axml Mono compiler MSIL <application>.apk – includes assemblies and “runtime” Dalvik VM Android 2.2
  • 153.
  • 154.
  • 155. MonoDevelop is more “Eclipse-like”
  • 157. Apple XCode 4 support?
  • 158. MonoDroid in open preview – no go live license yet
  • 159.
  • 160. The momentum behind iPhone, iPad, and Android continues…
  • 161. Knowledge and tools to ensure that your mobile applications are able to take full advantage of the Microsoft platform
  • 163. Thank You! Simon Guest Director, Mobility Solutions simon.guest@neudesic.com