November 2018 Xamarin and Azure Office Hours Recap

Matt Soucoup

I ❤️ every single developer.

And I want to hear your stories. I want to hear about your successes, your “not-so-much” successes, and any questions or concerns you may have about our tooling. This way I can bring all of those back to the product teams to advocate for you. I’ll get the answers, inform the product teams of what’s working and what’s not, and together we’ll influence the products and make developing even more fun – for everybody.

I'm Listening Image

I also want to tell your stories to the community. If you created something cool – I want people to know about it! If you’re having issues with something, somebody else is too, trust me.

That’s why I started hosting office hours. Anybody can sign up for a 30-minute slot of time (though to be honest, the conversations often go longer) to tell me your story of developing with Xamarin or Azure or both.

Go ahead – sign up for an office hour now – and tell me your story!

And here’s a recap of the stories I heard in November – the successes, the challenges, and the questions.

The Successes

Let’s start out by talking about the successes. These ranged from creating apps that integrated several Azure services in innovative ways of using individual products or frameworks to their fullest potential.

Stringing Together Several Azure Services

I saw a demo of a very cool app – and one which I promised the developer not to talk specifics about because it’s not in the stores yet – but I can tell you about how this Xamarin.Forms app is using several Azure offerings to produce a great experience for its users.

First it is using Azure Functions as the backend instead of the traditional web api written in ASP.NET or NodeJS. Beyond not having to maintain a server, this app is using bindings on the Functions – so they fire off when an item is inserted into an Azure Storage Queue. HTTP triggered functions and Queue triggered functions doing application logic on the backend together.

Not only that, but the app is going to make use of Azure Custom Vision Service. This will allow it to identify objects by running CoreML or TensorFlow models on a device. Assuming the app finds what it’s looking for in the image – it will trigger certain workflows.

Pushing Azure Mobile App Services

Azure Mobile App Services (or Zumo as I like to call it) is a Mobile Backend as a Service offering for Azure. It provides features such as authentication, push notifications, and offline data entry and sync.

The server-side portion of Azure Mobile App Services is an OData ASP.NET Controller. The person who shared this success story already had an OData solution up and working, but needed to make it work in a mobile context. Since Zumo makes use of OData, it was an easy swap to get it running. Additionally, Zumo is open source – meaning this person was able to run on-prem.

Pushing Azure Mobile App Services

Along with Zumo and its OData controllers – I heard a story about how in a project the developers were able to override the existing functionality of the controller and push it a bit beyond its built-in capabilities when it was performing an OData expand. This allowed them to shrink the resulting Entity Framework query down from a huge 12,000 lines to a much more manageable and performant one. Now, this may seem to be a knock against Zumo – but I think it speaks to it being open source that developers can peek into it, to see how it works, and then expand upon it – and plug their solutions in.

Xamarin.Essentials Saving the Day

Xamarin.Essentials is a new framework that wraps many different mobile operating system dependent APIs into an easy to use the cross-platform library. In other words, you can access things like secure storage – which is done differently on Android vs iOS – via a common API in your shared code.

I heard more than one story of Xamarin.Essentials stepping in and saving time. Not only does it provide a nice API – but since it bundles so many different pieces of functionality in a single library, you don’t have to go searching all over to find what you need.

The Challenges

Not everything is sunshine and flowers, however. There may have been some successes with Azure Mobile App Services, but there were challenges with it too. There were challenges with Azure AD B2C and Xamarin.Forms layouts too.

Azure AD B2C – Or Is That Azure AD?

Azure AD B2C – or Active Directory Business-to-Consumer – is a means by which you can provide consumers of your application to create accounts with social media providers like Facebook or Twitter.

But… Identity is hard. (I wrote 11 blog posts on it!)

And one of the stories that I heard from a developer was how difficult it was to wrap their head around the concepts. This is great feedback, and I’m able to talk to the product team on how we can improve our documentation.

Another story was a person was having trouble integrating sign-ups and logins of their internal line-of-business apps with their consumer-facing apps. In other words, having an internal superuser login to an app the same way a regular consumer would. The ideal way, from the developer’s perspective, would be to do both with Azure AD B2C. But upon conferring with the product teams – the best way would be to have the internal employees use Azure AD and have those users federated to AD B2C.

Xamarin.Forms Layouts

LayoutOptions.Fill  or LayoutOptions.FillAndExpand  – which one to use and when? That was another challenge I heard about, but the really challenging part was there was a bug underneath where FillAndExpand wasn’t acting as expected.

A great thing about a project being open sourced is that you can open issues with it to report bugs. And that’s exactly what I advised this person to do.

And check out this issue for a great example of a very detailed, well-reported one.

Azure Mobile App Services – Get That Data Flat!

I give a talk titled Lessons Learned from Making Mobile Apps Resilient. And one of the topics I touch on is to keep your database schemas as flat as possible – if possible, try to denormalize them.

Flatten data image

If you’re an old-timer like me, that flies in the face of everything you’ve been taught about database design, but it’s for good reason.

But an issue with having highly relational data is due to the way the controllers are set up on the server side. They are meant to model a single table. Which means if you need to get a customer name and their address, for example, and that data is in two different tables, you’re going to have to do something special. (Without getting into all the specifics here.)

Needless to say, that approximates a situation I heard about a couple of times in the office hours. In effect, retrofitting a legacy schema to work with Azure Mobile App Services server-side table controllers.

The Questions

And of course the questions. What follows are some common questions I heard several times, and go figure – Azure Mobile App Services comes up here too!

The Future of Azure Mobile App Services

I received several questions about the future of Azure Mobile App Services that can best be summed up as: “What’s the future of Azure Mobile App Services?”

I can’t really answer that one without getting myself into trouble – but we know that Azure Mobile App Services isn’t getting a lot of attention right now, and it’s something that we’re working to fix.

Visual Studio App Center Build vs Azure DevOps

Another question I heard in a couple different forms was “What is the difference between Visual Studio App Center Build and Azure DevOps”?

Think about it this way. If you really need to get in-depth and customize your build pipelines, Azure DevOps is for you. But if you’re happy with what Visual Studio App Center provides out of the box – go with that. VS App Center uses Azure DevOps under the hood, but the customization isn’t as verbose as Azure DevOps.

Is the .NET Framework Dead?

This is a big one of some consequence – is the full .NET framework dead?

No. It’s alive and well.

The .NET Framework may move a bit slower than .NET Core, but that’s because it needs to maintain compatibility across over a billion machines. Rest assured, .NET Framework is moving forward, as can be seen with the 4.8 version of the .NET Framework.

Read more about this with Scott Hunter’s blog post here.

Is Anybody Using GraphQL?

Good question! If you’re using GraphQL – I want to hear about it!

Schedule Your Office Hours!

Schedule some office hours with me to talk about how you’re using GraphQL – or about anything! Successes, challenges, or questions – anything is fair game!

I ❤️ developers and I want to hear your stories. Together we can make everybody’s experience developing with Xamarin and Azure better!


Discussion is closed.

Feedback usabilla icon