There is no app! – LevelUp Mobile slides

 

On September 22nd, 2016 I presented a session called “There is no app!” at the LevelUp Mobile 2016 event in Leusden. Here are the slides and video of that presentation:

[The video will be placed here shortly]

Abstract
Mobile platforms are evolving and getting richer and richer in features with every new release. The OS itself is becoming the primary interface for users to interact with, as are a new category of (wearable) devices.

What does this mean for us as app developers? Are the days of the traditional “mobile app” numbered? How do we serve our end users and optimize their mobile moment as much as possible?

The average smartphone owner has installed over 100 apps on their phone while they only use between 3 and 5 apps a day. By integrating your app more deeply into the mobile operating system can greatly increase the usage of the app. During this session we will show what you can do to integrate your apps in the Windows, iOS and Android platforms to keep your app top of mind. We’ll look at spotlight search, universal links, app indexing, Cortana integration and other APIs provided by iOS and Google Play services to engage your users in your apps. We’ll also look at new interaction models that are closer to the mobile platform: widgets, 3D-Touch, etc.

Ceci n’est pas une app

LevelUpMobile_logoRGBCall to action: join us at LevelUp Mobile on September 22nd in Leusden for a FREE inspirational evening on the future of Mobility and Devices.

 

The mobile platform war has been raging for almost ten years now. For now, it seems that Google (Android) and Apple (iOS) have won. (link) Microsoft, though still pushing Windows 10 for mobile as well, has accepted this and started providing high quality mobile apps for both Android and iOS.

Apple and Google have invested a lot in making their platforms richer and richer to attract and retain users. Apple’s advantage of 100% vertical integration of software and hardware has allowed them to create experiences like Apple Pay, 3D-Touch and Touch-ID that are very appealing to users and developers alike. At the same time, both Apple and Google have been putting features into the OS and stock apps that are competing with 3rd party offerings in the App Store. Furthermore, users have come to expect the same experience they get from their OS from 3rd party apps. Though some platform features might seem alike between iOS, Android and Windows, the way they are implemented can vastly differ and require access to core platform API’s.

As a strong proponent of Xamarin, I’ve been working in the world of cross platform mobile app development for almost 6 years now. The reason we chose to go with Xamarin was – first of all – of course the ability to share code amongst platforms, but – equally important – full access to the native platform API’s and the ability to create 100% native experiences. Given the trend of ever innovating mobile platforms, this puts us at a huge advantage over cross platform solutions that go for the lowest common denominator, both in UI (the same UI across all platforms) and UX (most of the time just the common superficial feature set across platforms).

With iOS 10, Apple is showing us a trend where apps can be integrated even deeper in the core OS experience. Of course we already had widgets in Android, but what to think about interactive widgets in iOS’s Today view, enriched with Siri’s AI capabilities? Interactive notifications are becoming more popular. Where a notification used to be a way to alert the user and allow them to open the accompanying app by tapping on it, notifications are becoming a User Interface by themselves, allowing the user to deal with the app’s functionality right from the lock screen.

ios-10-interactive-notifications
Deal with a notification right away from the Home screen. No need to open the app!
The boundaries of apps are blurring even more with advanced features like 3D-touch on the Home screen, and the ability to interact with apps from the Siri screen:

iOS-10-Control-Center-3D-Touch-iPhone-screenshot-001
Direct access to an app’s features through 3D-Touch. No need to open the app!

open_app_in_siri
Siri knows how to invoke your app and show it as a widget right inside its own interface. No need to open the app!

apps_in_imessage
iMessage can invoke your app right from its own interface. No need to open your app!
These are all iOS examples, by the way, but similar features can be found in Android and Windows 10, with its Live Tiles, Cortana integration, etcetera.

In general, user interaction with their mobile devices is becoming more and more streamlined, and to stay ahead as developers, we need to start thinking about these micro-interactions, these Mobile Moments, and offer the most efficient experience with our apps.

Mobile is not a neutral platform (link). The philosophy of web applications (built for browsers, available everywhere, with a consistent user experience everywhere) doesn’t apply here. We don’t build for the web, we build for the OS. Yay for native development! 🙂

spoon-boy
There is no spoon.
If we follow this train of thought, it leads us to an existential question: is there actually an app?

I would argue: not anymore – at least not in the traditional sense where we have an icon sitting on the home screen that launches into an application that comes into the foreground and occupies the whole screen. It seems like the days of the mobile “app” are numbered and we have to start thinking about apps as a set of autonomous micro-interactions that work together with the OS and/or other apps.

Luckily for us, as developers, there are plenty of new API’s and frameworks that help us build these interactions and I think it will only become more exciting from a technical perspective to build mobile experiences.

LevelUpMobile_logoRGB

On September 22nd, I’m joining Brechtje de Leij (mobile strategist and expert), Jorn de Vries of Flitsmeister fame, Johan Gorter & Rick Hoving from AFAS Software and the ever brilliant Laurent Bugnion to speak at a one-off inspiring event about the future of Mobile and Devices: LevelUp Mobile. Together with my colleague Geert, our talk is going to be about the exact topic of this blogpost and we’ll show some real life examples of how to implement these Mobile Moments using Xamarin.

If you have not registered yet, you can do it here: http://www.levelupmobile.nl! It’s free and it’s going to be fun!

To get more inspired, read Laurent’s teaser blog post about his upcoming talk: A world of devices.

Xamarin Evolve 16 – Training Day 2

Time flies! The second day of training at Xamarin Evolve is over already and I just came back from the awesome opening party in the Darwin Lounge.

The main conference starts tomorrow. I’m honored to be on stage with some industry giants at the Evolve Mobile Leaders Summit track in a panel discussion about The Unique Challenges of Mobile DevOps. But that’s tomorrow!

About today: before the training, the day started at 6:15am (!) with a 5k test run with for the first Mini-Hack tomorrow morning. I spot an orange Xpirit T-shirt 🙂

The training part was another intense day from 9am-6pm, but it was a good day. I’d say the content of today was a bit better and deeper than what we learned yesterday, at least for me personally. We covered three major topics:

Securing local data
This part was all about dealing with data locally on the device, especially sensitive data in terms of privacy and security. We had a look at what the Xamarin.Auth component has to offer for local storage of sensitive data. This component (you can find it on GitHub and on Nuget) uses the platform specific facilities for storing data in a secure container, i.e. the KeyChain on iOS and a secure KeyStore inside the app’s sandbox on Android.

Be sure to get the latest 1.3.0 version of the Xamarin.Auth component though, as this is a bait-and-switch PCL library that also offers support for the Windows platform, whereas the older 1.2.x version doesn’t.

warning-stamp.png

There’s one caveat with the Xamarin.Auth component though… The KeyStore file on Android is locked with a hard coded password. The Android app in one of my previous projects was actually flagged in a security audit because they extracted the Xamarin.Auth DLL, decompiled it and found the hard coded key. Pretty iffy, because this means that the KeyStore data in every app that uses this library can be easily opened and read by extracting the file from the sandbox and using the key that’s publicly available on GitHub!

I made a pull request about 2 years ago that fixes this problem, at least in a way that you can provide your own key. But somehow Xamarin didn’t get around to merge it yet, so the vulnerability was still there, also in the 1.3.x version. The funny thing was that as we were doing the training, one of the Xamarin developers was actively working on this component. We pulled him into the training, explained the problem and he immediately went to work to see if he could merge my fix. How awesome!

FullSizeRender 4.jpg
How awesome is this: Xamarin Developer DNA… everyone could add their own string, picking the pegs that fit with their preference. The result is this awesome, unique “Xamarin DNA” sequence. A work of art!

The other part of this chapter was about the awesome PCL.Crypto component. This component is also a bait-and-switch PCL library, which means that the PCL portion contains nothing more than the API definitions for your shared code to compile against (the bait), but uses the actual device specific implementation at runtime (the switch). This means that PCL.Crypto can use the platform specific crypto API’s developed by Google, Apple and Microsoft themselves instead of relying on its own security implementation. Much the same as the Xamarin.Auth component solves its local storage issues. For developers familiar with the WinRT crypt API’s for example, there is a special WinRTCrypto API that you can program against, but PCL.Crypto will map this to the underlying native API’s. Pretty clever. For example: a method for encrypting some data could look like this:

public static byte[] Encrypt (byte[] plainText, byte[] keyMaterial)
{
  var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider
    .OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7);

  var key = provider.CreateSymmetricKey(keyMaterial);
  var IV = WinRTCrypto.CryptographicBuffer.GenerateRandom(16);
  var cipher = WinRTCrypto.CryptographicEngine.Encrypt(key, plainText, IV);

  var cipherText = new byte[IV.Length + cipher.Length];
  IV.CopyTo(cipherText, 0);
  cipher.CopyTo(cipherText, IV.Length);

  return cipherText;
}

PCL.Crypto can be used quite easily in combination with Xamarin.Auth to encrypt or hash data before storing it. At least as long as your app is using the not-so-secure version of Xamarin.Auth – with the hard coded key – using something like PCL.Crypto to secure the values that go into the secure storage is a real necessity! But it’s good practice to do it anyway.

OAuth
Next we went into OAuth for authorizing access to an API from a mobile app. OAuth in itself is a pretty broad topic and enough to fill tens of blogposts. One of the important points here is that for mobile apps, basically there are only two OAuth flows that are really usable:

Screen Shot 2016-04-26 at 22.50.26

The Implicit flow or the Authorization Code flow. The other flows aren’t really suitable for mobile apps (or browser apps involving JavaScript code), since this means that there will be client secrets hidden inside the app, and they involve dealing with a user’s password in the app itself instead of handing that off to an Identity Provider. The Client Credentials flow is typically used for service-to-service communication, usually on behalf of the user.

Xamarin.Auth provides some nice API’s to easily initiate a login sequence, using a web view that follows all the redirects that are part of the OAuth flow, to obtain an access token (or authorization code).

Memory Management Issues
The most interesting part of today was about diagnosing and dealing with Memory Management Issues. I actually learned a lot about how both the Xamarin.iOS and Xamarin.Android frameworks work in terms of memory allocation. It’s important to understand that in both cases, you are always dealing with native objects, managed peers and a binding layer in between, provided by Xamarin. At least, for those objects that are actual native platform classes.

Under the hood, there are some intricacies to be aware of. For example: in order for iOS’s reference counting mechanism to work, you have to be very careful to release references to native objects, for example by making sure to always unsubscribe from event handlers. For Android, it’s important to realise that you’re working with two Garbage Collectors: the Mono one and the one in the Android Java VM. There are a lot of details, but there is some nice guidance up on the Xamarin Developer site about this [iOS] [Android].

You can prevent a lot of memory issues by following a couple of important guidelines. Also the Xamarin Profiler is a great tool for diagnosing possible memory leaks.

Lots of excitement for the opening of the Darwin Lounge at #XamarinEvolve

A post shared by Roy Cornelissen (@roycornelissen) on

 

Darwin Lounge
As for the (other) fun part of Evolve: the Darwin Lounge was opened this evening, accompanied by a huge buffet and a nice range of tasting stands for artisanal chocolate, local beers and hipster coffee 🙂 This tweet sums up how I felt this evening:

It’s no secret that I’m an avid foodie, so suffice to say that I was in seventh heaven when it comes to the food that was served here. This means that you have to sit through my Instagram food porn pictures now:

Excellent chocolate. The Phillipines one is a clear winner #food #XamarinEvolve

A post shared by Roy Cornelissen (@roycornelissen) on

 

I expected to visit a mobile dev conference but instead I've come into food discovery heaven. #XamarinEvolve #coffee

A post shared by Roy Cornelissen (@roycornelissen) on

 

Great hipster pour-over coffee at #XamarinEvolve

A post shared by Roy Cornelissen (@roycornelissen) on

 

Hmm, macarons #XamarinEvolve #food

A post shared by Roy Cornelissen (@roycornelissen) on

 

Beer tasting at #XamarinEvolve. Local beer from Orlando Brewery. Good stuff.

A post shared by Roy Cornelissen (@roycornelissen) on

 

 

So… Xamarin sure knows how to throw a party 🙂 Of course, the Darwin Lounge at Evolve is mainly about cool geek stuff and tech inspiration. There’s lots of that going on as well. Lots of IoT stuff, drones flying around, etcetera. Check out the Twitter timeline for #XamarinEvolve for a great impression of the fun things out there.

IMG_0946
Great buzz and lots of hacking going on in the Darwin Lounge
IMG_0944
These robot spiders are pretty creepy!
IMG_0943
LEGO Mindstorms, totally cool! Their official iPad app for programming the Mindstorms robot was built with Xamarin

Be sure to tune into the Evolve keynote tomorrow at 9am EST. Rumours are that it’ll be spectacular! 😉

Xamarin Evolve 2013 – Day 1

Austin, TX skyline

Hello from Austin, TX! So today was day 1 of the Xamarin Evolve conference. What a day! Marcel (@marcelv) and I flew in on Saturday and we arrived at the hotel late in the evening, so there was no time to check out downtown Austin, famous for its live music scene. It’s obvious as soon as you arrive on Austin airport.

Finally arrived in Austin for #xamarin Evolve w/ @marcelv

A post shared by Roy Cornelissen (@roycornelissen) on

After a good night’s sleep, we went down to the conference area in the Hilton hotel to register and have a nice breakfast. Immediately, the great attention to detail Xamarin put into organising Evolve was apparent. Have a look at the conference badge:

Yeah, @InfoSupportBV present at #xamarin Evolve!

A post shared by Roy Cornelissen (@roycornelissen) on

Ready to go! #xamarin

A post shared by Roy Cornelissen (@roycornelissen) on

The name badge also serves as a booklet containing the conference schedule and speaker information. The emphasis on the first name (printed in big bold letters) makes it personal and informal.

Next, the names of the conference rooms… They were all named after scientists related to Evolution (get it… Evolve) or monkeys. Illustrious people like Darwin, Dawkins, Gould, Goodall, Fossey, etcetera.

Things that make you feel that a lot of thought and attention to detail went into this conference. Xamarin can be proud of this.

We were also proud to see Info Support listed on the banner as a Silver Sponsor. 🙂

The welcome and keynote by Xamarin CEO Nat Friedman was nice. He told us how they were completely overwhelmed by the interest in Evolve. At first they anticipated around 250 people, but it soon went up to 400, and later on sold out at 600 people! Xamarin even had to change the venue and date in order to fit in all these people. A testament of Xamarin’s success and community passion for their products!

Passion is actually what describes Xamarin and Evolve best. All 70 (!) Xamarin employees are present at the conference, walking around, always available for a quick talk or questions, and all of them radiate passion for their job. The same with the participants. Mobile is fun. I’m confident that this vibe will stay during the remaining three days.

It was also great to meet and greet the Xamarin leaders. Nat, Miguel, Stephanie, all taking time to talk to everyone and eager to work together with their partners and the developer community.

This first day was dedicated to the Xamarin training. We did the Advanced track. After some technical difficulties – Wifi at a conference always sucks – we covered Notifications, Touch, Android Fragments, Animations and Graphics in iOS and Android. The training material is quite nice, as are the demo apps.

All day, we were very well taken care of in terms of food and drinks. Austin is a nice place for a foodie 🙂 To celebrate our first day at Evolve, we were all invited to Stubb’s Bar-B-Q restaurant, where we enjoyed a nice BBQ… pulled pork, beef briskett, cole slaw, nachos and quacamole, you name it. All that in a nice atmosphere and accompanied with a couple of beers. Oh and great weather!

Great evening with a real Texas BBQ! Great to meet the passionate folks from #xamarin

A post shared by Roy Cornelissen (@roycornelissen) on

Tomorrow it’s day 2 of the Advanced training. Looking forward to that. Tuesday and Wednesday are conference days, and then it’s our turn to talk about mobile development with Xamarin. See you at our sessions?

Tuesday, 2.30PM: Creating a Uniform Login for Apps
Wednesday, 1.30PM: Sharing up to 80% Code for iOS, Android and Windows

Airstream

A post shared by Roy Cornelissen (@roycornelissen) on

Welcome Xamarin 2.0!

The past year, Xamarin has been working hard on their new product suite, Xamarin 2.0. Their awesome product suite for cross platform mobile development with C#, consisting of MonoTouch for iOS, Mono for Android and Xamarin.Mac, based on the MonoDevelop IDE has been completely revamped and rebranded.

Say hello to Xamarin Studio, Xamarin.iOS, Xamarin.Android and Xamarin.Mac! This is a more integrated, modern and gorgeous looking version of their delightful tool suite.

Xamarin Studio start screen (Windows version)

Develop iOS on Windows!
Along with this release, Xamarin also made it possible to develop iOS apps on Windows using Visual Studio! Wow! You can develop and compile apps in Visual Studio and, with a remote debugger, debug your apps on a Mac running Apple’s iOS Simulator. This means that you still need a Mac for finishing the app, and also for designing your XIB files, but this is a huge improvement, making it possible for your Visual Studio devs to open and compile your iOS apps. This is very useful e.g. when you do bugfixes in shared code and will ease the workflow of devs working on Windows Phone, Android and iOS apps at the same time.

Being an Apple fanboy, I still prefer to use my Mac for iOS development though. Xamarin took care of that as well, with a fantastic new version of Xamarin Studio for Mac.

Component Store
As a bonus, Xamarin released a Component Store on their Developer Center, which makes it easy to discover and incorporate 3rd party libaries into your mobile apps, and provides a great market place for developers to publish their library. Even Microsoft has published a component for integration with their Azure Mobile Services!

Pricing
This release also features an attractive new pricing model. First of all, there is now a free Starter edition! This version makes it possible for small independent developers and students to build and release small apps. The Starter edition is limited to a maximum package size and cannot do P/Invoke, but it’s an awesome way to get on your way building mobile apps with C#!

Next, there’s an Indie version for individual developers, attractively priced at $299 per platform (e.g. iOS and Android are two platforms). For organizations, there are Business and Enterprise editions that enable full fledged, unlimited apps, Visual Studio development and full support. There’s a nice comparison on the Xamarin website.

Try it out!
I’ve been test driving this release for a while now and I can say that this is a great achievement and big step forward in productivity, integration and developer delight. You can try it yourself here.

UPDATE: Nic Wise (@fastchicken on Twitter) has a nice blog post detailing more changes in Xamarin 2.0. Click here!

I want to congratulate the Xamarin team on reaching this milestone! Here’s to many great projects using your tools! I can’t wait to show this off at the Evolve conference in April.

Beer toasting

GeekNight11 session online

Our “Mobile development using C#” session at GeekNight11 (at the DevDays 2011 conference) was a bit of a guerilla session. Non-Microsoft technologies, non-Microsoft platforms… a bit awkward. It worked out very nice, we got a full house (over 400 people!) and some very nice feedback. Marcel, Willem and I really enjoyed this one.

Since we were “the outlaws”, Microsoft made no official recording of the session to put on Channel9. Luckily for us, the whole session was recorded by an attendee, Tony Thijs (@tonythijs on Twitter). He used his Canon EOS500D, shooting “from the hip”. Thanks Tony!

  1. Part 1
  2. Part 2
  3. Part 3
  4. Part 4

The videos are a bit shaky and the sound is not all that, but what the heck!

Be sure to check out the DevDays sessions by my colleagues on Channel9 as well:

Full house at GeekNight... Tony is the guy in the white shirt on the left.

Speaking at GeekNight 11

The Microsoft DevDays in Den Haag are here again. It’s packed with lots of nice sessions by the likes of Scott Hanselman, Vittorio Bertocci, etc. Some of my Info Support colleagues will be doing a bunch of worthwile sessions as well. Marcel de Vries will speak at the pre-conference, Edwin van Wijk will be covering Azure, some sessions together with Bert ‘Java’ Ertman. Eric Denekamp is one of our infrastructure experts, doing two sessions in that area. Erno de Weerd will cover WCF Data Services, a true gem in the WCF stack, IMO. You should really check out OData some time. And Alex van Beek will talk about Silverlight and Entity Framework.

One tradition during DevDays is the GeekNight event. An evening full of fun tech talks, and the admission is free! The keyword is fun, you’ll sessions there that you won’t easily see during the more “serious” DevDays. Erik Oppedijk, another one of my colleagues and a sailing fanatic, will do a presentation on navigation on water.

This year, I’m honored to be speaking at GeekNight11 as well. I’ll be doing a session on Mobile development using C#, together with my partners in crime Marcel de Vries and Willem Meints. We’ll show you how to do cross platform software development for Android, iOS and Windows Phone 7 devices using the powerful C# language and .NET API. How to leverage as much code sharing as possible, whilst still preserving the native UI characteristics of the OS. Contrary to what frameworks such as PhoneGap (which is pretty nifty actually), we think that if you choose to do a native app, you should stick to the UI characteristics given by the platform natively. This way, you can leverage the strengths of the framework while engaging the user by providing them the best experience possible.

How? Come and see! I’d love to talk to you about our ideas afterwards.

Thursday, April 28th @ 19.30 – 20.15 – Meet you in Den Haag?

Marcel did a nice selection of sessions on his blog, and Edwin van Wijk blogged about his sessions at DevDays as well. Willem put up some info on our app on his blog. Check them out!