<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matthew Soucoup</title>
    <description>The latest articles on DEV Community by Matthew Soucoup (@codemillmatt).</description>
    <link>https://dev.to/codemillmatt</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F143429%2Fb86006ad-8b92-4a5c-80cc-d2773d98ea77.jpg</url>
      <title>DEV Community: Matthew Soucoup</title>
      <link>https://dev.to/codemillmatt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codemillmatt"/>
    <language>en</language>
    <item>
      <title>Power Apps and the .NET Developer</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Fri, 28 Jan 2022 23:56:21 +0000</pubDate>
      <link>https://dev.to/dotnet/power-apps-and-the-net-developer-5e4f</link>
      <guid>https://dev.to/dotnet/power-apps-and-the-net-developer-5e4f</guid>
      <description>&lt;p&gt;Power Apps is a low-code solution to building applications. A lot of the work needed to make the application work is done for you behind the scenes. You still have to write code to make the app work, but that's not the main focus when creating the app.&lt;/p&gt;

&lt;p&gt;An app built with .NET is high-code. I don't mean that .NET isn't elegant or libraries don't exist to help. Rather when you write a .NET app your primary focus is on writing code to make the app work.&lt;/p&gt;

&lt;p&gt;Both are incredibly powerful ways to build applications.&lt;/p&gt;

&lt;p&gt;And when you mix Power Apps with .NET - your productivity can go through the roof.&lt;/p&gt;

&lt;p&gt;So let's talk about why the .NET developer should know Power Apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Forms Over Data Like You've Never Seen Before
&lt;/h2&gt;

&lt;p&gt;I'm just going to state this as fact, and it's based off of 20 some years of working in and with large enterprises - most enterprise development is creating some type of forms over data application.&lt;/p&gt;

&lt;p&gt;In other words, an app that searches for data, views data, and modifies data. Yes, it may do other things, but the form over the data is the gist of the application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Most enterprise development is creating some type of forms over data application.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Power Apps excels at creating such apps. It will automatically scaffold out an entire forms over data application for you - you just need to point it at your data source, like Azure SQL... or an Excel sheet (because you know, why not).&lt;/p&gt;

&lt;p&gt;This then frees you up to concentrate on the core of the application. The portion of it that's not just the forms over data. But ... even then a lot of the time you're not starting from scratch. There are tons of components that give you a headstart on other development tasks. Like &lt;a href="https://docs.microsoft.com/powerapps/maker/canvas-apps/controls/control-audio-video?WT.mc_id=dotnet-55885-masoucou" rel="noopener noreferrer"&gt;media&lt;/a&gt; or &lt;a href="https://docs.microsoft.com/ai-builder/use-in-powerapps-overview?WT.mc_id=dotnet-55885-masoucou" rel="noopener noreferrer"&gt;AI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Right now you might be thinking ... so what exactly does this have to do with .NET development? The very simple answer ... it frees up your time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fc_scale%2Ch_313%2Cw_509%2Fv1643412013%2FDepositphotos_96626898_XL_qho08z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fc_scale%2Ch_313%2Cw_509%2Fv1643412013%2FDepositphotos_96626898_XL_qho08z.jpg" alt="photo of a woman leaning back at her desk enjoying free time"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use Power Apps and everything that it gives you to quickly create robust applications. But a Power App isn't appropriate in every single situation. I mean, you're not writing any web APIs in Power Apps. They're not meant for customer facing apps.&lt;/p&gt;

&lt;p&gt;But if you can speed up your development for internal frontend apps and that leaves you more time to concentrate on apps that need to be written in .NET - that's a win-win for everybody.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connectors - and Custom Connectors
&lt;/h2&gt;

&lt;p&gt;Part of what makes creating Power Apps such an attractive proposition are Connectors.&lt;/p&gt;

&lt;p&gt;A Connector supplies external functionality to Power Apps. In other words, a Connector connects your Power App to Azure Blob Storage for example. There's a Docusign Connector. One for LIFX (control those lights!), Salesforce ... you get the idea.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fc_scale%2Cw_500%2Fv1643412200%2Fmatt-1_g05sfi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fc_scale%2Cw_500%2Fv1643412200%2Fmatt-1_g05sfi.jpg" alt="drawing of lines intersecting with each other"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It connects your app to external data.&lt;/p&gt;

&lt;p&gt;External functionality made so it's easily consumable in a Power App.&lt;/p&gt;

&lt;p&gt;And here's where things get interesting. You can &lt;a href="https://docs.microsoft.com/connectors/custom-connectors/use-custom-connector-powerapps?WT.mc_id=dotnet-55885-masoucou" rel="noopener noreferrer"&gt;create your own Custom Connector&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you have an OpenAPI described web API, you can create a Custom Connector for it, and then consume it in Power Apps.&lt;/p&gt;

&lt;p&gt;Starting with Visual Studio 2019 and continuing with 2022 - or using the .NET CLI - it's as easy as checking a box to generate an OpenAPI definition for you web API.&lt;/p&gt;

&lt;p&gt;Now you're able to take your high-code .NET web API application - and maybe it's deployed in Azure App Service across several regions and managed in Azure API Management - and use it within your Power Apps App.&lt;/p&gt;

&lt;p&gt;Thanks to a Custom Connector and a .NET web API, the Power Apps App is becoming more than just a low-code app.&lt;/p&gt;

&lt;p&gt;You're mixing the best of both high-code and low-code worlds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fusion Development
&lt;/h2&gt;

&lt;p&gt;And that brings us to the concept of Fusion Development.&lt;/p&gt;

&lt;p&gt;Fusion Development is still new, but it's underlying concept is old: use the best tools for the right job.&lt;/p&gt;

&lt;p&gt;In this sense, use Power Apps where it excels, creating frontends quickly that support forms over data. Use .NET where it excels, such as responding to web requests to get data and perform business logic lightning fast.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the best tools for the right job.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mix and match where it makes sense. Once you get a feel for what Power Apps is capable of, you'll know when to use it. Just like you know when a &lt;code&gt;switch&lt;/code&gt; makes more sense than an &lt;code&gt;if&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Together you'll find yourself and your team building better apps faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;p&gt;The low-code revolution, if you will, and its intersection with professional development is incredibly interesting to me. &lt;/p&gt;

&lt;p&gt;If you want to learn more, I've created a couple of Pluralsight courses that explore Power Apps (and help prep you for the PL-200 certification exam). These links will give you a free trial:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pluralsight.pxf.io/c/1411097/1161411/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fdemonstrating-business-value-power-apps" rel="noopener noreferrer"&gt;Demonstrating the Business Value of Power Apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pluralsight.pxf.io/c/1411097/1161411/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fintegrate-power-apps-other-apps-services" rel="noopener noreferrer"&gt;Integrate Power Apps with Other Apps and Services&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've also helped write a Microsoft Learn Path on Fusion Development for the professional developer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/paths/transform-business-applications-with-fusion-development/?WT.mc_id=dotnet-55885-masoucou" rel="noopener noreferrer"&gt;Transform your business applications with Fusion Development&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check them out!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>powerapps</category>
    </item>
    <item>
      <title>Excel is Amazing! Name Cells Like a Variable!</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Mon, 10 Jan 2022 21:50:34 +0000</pubDate>
      <link>https://dev.to/codemillmatt/excel-is-amazing-name-cells-like-a-variable-5bjl</link>
      <guid>https://dev.to/codemillmatt/excel-is-amazing-name-cells-like-a-variable-5bjl</guid>
      <description>&lt;p&gt;Excel is so much more than a place to track who isn't ... I mean is ... coming to a party that I throw.&lt;/p&gt;

&lt;p&gt;It pretty much is a full-blown programming language upon itself. The more I mess around with it, the more I'm amazed with what it can do.&lt;/p&gt;

&lt;p&gt;Here's something I just learned that kinda blew my mind. You can give individual (or a range) of cells a name. Like naming a variable. And then refer to that name in various formulas.&lt;/p&gt;

&lt;p&gt;Think about how useful that can be - when you need to have a formula that calculates the sum of the cells that hold the values for the cost of eggs, milk, and bread - you could have:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bJIWI5bC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.21.42-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bJIWI5bC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.21.42-PM.png" alt="An excel formula that states: =SUM(A2,B2,C2)" width="274" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That'll do the trick - but you gotta hope that &lt;strong&gt;A2, B2,&lt;/strong&gt; and &lt;strong&gt;C2&lt;/strong&gt; refer to the correct cells. I mean by look at it who knows what they refer to.&lt;/p&gt;

&lt;p&gt;But ... but ... what if you could name those cells, so in the formula you would know? It would be super apparent and there would never be a question again.&lt;/p&gt;

&lt;p&gt;You can! Because Excel is amazing. And here's how.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Highlight the cell you want to name&lt;/li&gt;
&lt;li&gt;Go to the formulas menu / tab / ribbon (or whatever the proper nomenclature is).&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Define Name&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A modal window will show &amp;amp; it'll guess what you want to name the cell. The cell (or range of cells) that should be named. And will show you other cells that have been named. Go ahead and set the values (most likely just accepting the defaults).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qWl5448P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.17.36-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qWl5448P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.17.36-PM.png" alt="A screenshot of giving a cell a name from Excel" width="880" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;Then when you go back to your formula &amp;amp; start typing - Excel will even prompt you with the name of the cell - like Intellisense would.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eBdIlgKl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.09.10-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eBdIlgKl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.09.10-PM.png" alt="A screenshot of seeing the Excel cell's name show up when typing in the formula bar" width="340" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(And if you're more of a click-to-select-a-cell person than a typer when doing formulas - Excel still will use the name!)&lt;/p&gt;

&lt;p&gt;And the formula would look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8zNp5b5S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.22.58-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8zNp5b5S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.22.58-PM.png" alt="The excel formula with the cell name in place. It states: =SUM(Milk,B2,C2)" width="296" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And what's nice is that you can refer to those named cells on any sheet - not just the one they were defined on - super easy. No more trying to remember what the proper syntax is for cross-sheet cell reference.&lt;/p&gt;

&lt;p&gt;What about cell ranges?&lt;/p&gt;

&lt;p&gt;Pretty much same as before. Select the range you want to name - give it a name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hg1jhTho--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.18.32-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hg1jhTho--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://codemilltech.com/content/images/2022/01/Screen-Shot-2022-01-07-at-12.18.32-PM.png" alt="A screenshot of giving a cell range a name from Excel" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then when you reference it in a formula - reference it as before.&lt;/p&gt;

&lt;p&gt;Maybe everybody already knows about this - but when I found out that I could clean up my formulas and make them easier to understand ... so amazing!&lt;/p&gt;

</description>
      <category>excel</category>
    </item>
    <item>
      <title>Xamarin 101: Part 7 - Wrapping Up</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Fri, 11 Oct 2019 14:32:30 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-7-wrapping-up-573</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-7-wrapping-up-573</guid>
      <description>&lt;h1&gt;
  
  
  Xamarin 101: Part 7 - Summary
&lt;/h1&gt;

&lt;p&gt;You made it! You now have a fundamental understanding of Xamarin, Xamarin.Forms, how XAML makes a UI, and a bit about MVVM and navigation between pages.&lt;/p&gt;

&lt;p&gt;You should now be ready to take the next steps into your mobile app development journey!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/OgUrTaugxsw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/browse/?term=xamarin&amp;amp;WT.mc_id=xamarin101-c9-masoucou"&gt;There's a ton of self-paced courses to learn Xamarin from Microsoft Learn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin?WT.mc_id=xamarin101-c9-masoucou"&gt;And don't forget Microsoft's best in class documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.xamarinpodcast.com/"&gt;Plus a monthly Xamarin Developer's Podcast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Xamarin 101: Part 6 - Xamarin.Forms Navigation with XAML</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Thu, 10 Oct 2019 17:18:24 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-6-xamarin-forms-navigation-with-xaml-2de4</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-6-xamarin-forms-navigation-with-xaml-2de4</guid>
      <description>&lt;h1&gt;
  
  
  Xamarin 101: Part 6 - Xamarin.Forms Navigation with XAML
&lt;/h1&gt;

&lt;p&gt;You've learned how to build a user interface with XAML. Add some smarts to it with the MVVM pattern. Now it's time to add some more pages to the app and navigate around in it with this short video!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UPD_2SVGQ6M"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/get-started/quickstarts/multi-page?WT.mc_id=xamarin101-c9-masoucou"&gt;Multi-page applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/navigation/hierarchical?WT.mc_id=xamarin101-c9-masoucou"&gt;Xamarin.Forms navigation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Xamarin 101: Part 5 - Xamarin.Forms MVVM with XAML</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Wed, 09 Oct 2019 16:17:10 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-5-xamarin-forms-mvvm-with-xaml-48oo</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-5-xamarin-forms-mvvm-with-xaml-48oo</guid>
      <description>&lt;h1&gt;
  
  
  Xamarin 101: Part 5 - Xamarin.Forms MVVM with XAML
&lt;/h1&gt;

&lt;p&gt;Model-View-ViewModel (or MVVM) is the heart and soul of Xamarin.Forms. It allows you to add a ton of application logic to your app, but without dirtying up your views with that code. Separation of concerns FTW!&lt;/p&gt;

&lt;p&gt;And XAML is tailor made to implement MVVM - with specific attributes allowing for binding of properties and commanding. &lt;/p&gt;

&lt;p&gt;What does that all mean? Check out this short video to find out more!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VqZeTAjsgFQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/design-a-mvvm-viewmodel-for-xamarin-forms?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced course on learning MVVM with Xamarin.Forms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/separate-your-ui-and-code-with-xamarin-forms-data-binding?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced course on data binding with Xamarin.Forms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/xaml/xaml-basics/data-binding-basics?WT.mc_id=xamarin101-c9-masoucou"&gt;Data binding basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/xaml/xaml-basics/data-bindings-to-mvvm?WT.mc_id=xamarin101-c9-masoucou"&gt;From data binding to MVVM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Xamarin 101: Part 4 - Building a Xamarin.Forms UI with XAML</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Mon, 07 Oct 2019 17:20:32 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-4-building-a-xamarin-forms-ui-with-xaml-55f6</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-4-building-a-xamarin-forms-ui-with-xaml-55f6</guid>
      <description>&lt;h1&gt;
  
  
  Xamarin 101: Part 4 - Building a Xamarin.Forms UI with XAML
&lt;/h1&gt;

&lt;p&gt;XAML is a declarative markup language used to describe user interfaces. It allows you to build sophisticated UIs that are easy to understand at a quick glance. And it's straightforward to get started with too.&lt;/p&gt;

&lt;p&gt;In this short video, learn how to build your first Xamarin application for both iOS and Android using XAML for the user interface.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/5XgxZBK6uPM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/create-ui-in-xamarin-forms-apps-with-xaml?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced course on creating user interfaces with XAML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/xaml/xaml-basics/get-started-with-xaml?WT.mc_id=xamarin101-c9-masoucou"&gt;Getting started with XAML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/get-started/quickstarts/single-page?WT.mc_id=xamarin101-c9-masoucou"&gt;Step-by-step walk-thru of creating a single page application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/get-started/tutorials?WT.mc_id=xamarin101-c9-masoucou"&gt;User interface tutorial with XAML&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Xamarin 101: Part 3 - Solution Architecture</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Fri, 04 Oct 2019 14:56:28 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-3-solution-architecture-15oh</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-3-solution-architecture-15oh</guid>
      <description>&lt;h1&gt;
  
  
  Solution Architecture
&lt;/h1&gt;

&lt;p&gt;There are always a hundred ways to do something. And cross-platform mobile development with Xamarin is no different.&lt;/p&gt;

&lt;p&gt;In this short video, we explain the way that Xamarin projects are structured out of the box (or what happens after File-&amp;gt;New), and how that best enables you to create applications maximized for code reuse.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ESubeu0081U"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/get-started/first-app?WT.mc_id=xamarin101-c9-masoucou"&gt;Walk-thru of the Xamarin.Forms new project setup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Xamarin 101: Part 2 - Installing Xamarin</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Thu, 03 Oct 2019 14:42:19 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-2-installing-xamarin-c8m</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-2-installing-xamarin-c8m</guid>
      <description>&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;You very well can't start developing mobile apps without Xamarin without knowing how to install the platform and toolset!&lt;/p&gt;

&lt;p&gt;This short video walks you through the process, step-by-step on Windows.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/sn7kD9X4_5M"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;And this video walks you through the macOS installation process!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oU1pls9etrQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Get that Xamarin installed! 😀📱&lt;/p&gt;

&lt;h2&gt;
  
  
  More Info
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/get-started/installation/windows?WT.mc_id=xamarin101-c9-masoucou"&gt;Like reading better? Here's some docs on installing!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/visualstudio/mac/installation?WT.mc_id=xamarin101-c9-masoucou"&gt;Here's some reading for the Mac installation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Xamarin 101: Part 1 - Introduction to Xamarin</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Wed, 02 Oct 2019 21:51:46 +0000</pubDate>
      <link>https://dev.to/dotnet/xamarin-101-part-1-introduction-to-xamarin-4p99</link>
      <guid>https://dev.to/dotnet/xamarin-101-part-1-introduction-to-xamarin-4p99</guid>
      <description>&lt;h1&gt;
  
  
  The Introduction to Xamarin
&lt;/h1&gt;

&lt;p&gt;Cross-platform mobile apps. C#. iOS, Android. .NET. Shared Code. Xamarin.Forms.&lt;/p&gt;

&lt;p&gt;All of the terminology can be a little confusing. This short video below though takes the confusion out of it and explains what exactly Xamarin is, how it works, and how it can make you - a .NET developer - productive in mobile development right away.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/JH8ekYJrFHs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More!
&lt;/h2&gt;

&lt;p&gt;There's lots of great documentation - but here's where to start to make the most of your time!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/create-a-mobile-app-with-xamarin-forms/index?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced learning course on how to create an app with Xamarin.Forms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/introduction-to-xamarin-ios?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced learning course introducing Xamarin.iOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/learn/modules/introduction-to-xamarin-android?WT.mc_id=xamarin101-c9-masoucou"&gt;A self-paced learning course introducing Xamarin.Android&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy mobile coding! And as always, if you have any questions - please ping me on Twitter at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Build Amazing Cloud Connected Apps with Xamarin, Azure, and App Center</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Tue, 01 Oct 2019 23:38:35 +0000</pubDate>
      <link>https://dev.to/dotnet/build-amazing-cloud-connected-apps-with-xamarin-azure-and-app-center-5hkk</link>
      <guid>https://dev.to/dotnet/build-amazing-cloud-connected-apps-with-xamarin-azure-and-app-center-5hkk</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Before we get going, in order to follow along with this article, you should download this repository: &lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/codemillmatt"&gt;
        codemillmatt
      &lt;/a&gt; / &lt;a href="https://github.com/codemillmatt/dotnet-conf-2019"&gt;
        dotnet-conf-2019
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Build Amazing Apps with Xamarin, Azure, and App Center
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;
. Got it downloaded? Great - let's go!
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Build Amazing Cloud Connected Apps with Xamarin, Azure, and App Center
&lt;/h1&gt;

&lt;p&gt;Xamarin + Azure + App Center = One Amazing Cloud Connected App!&lt;/p&gt;

&lt;p&gt;Each of these technologies by themselves are powerful, but when you combine them, you're able to build a cloud connected cross platform app that is able to harness the power of Azure in a matter of minutes. And it's even able to create user accounts, a very tricky feature that's necessary, but difficult to understand.&lt;/p&gt;

&lt;p&gt;Now - I said you can create it in minutes ... that's not &lt;em&gt;exactly&lt;/em&gt; true. You can't create anything in minutes. It takes work. I won't kid you.&lt;/p&gt;

&lt;p&gt;But what does take minutes is to get a fundamental understanding of how these three pieces of technology work on a fundamental level and interact. And then once you have that - you can be off and running to create apps of your own!&lt;/p&gt;

&lt;h2&gt;
  
  
  Like Videos?
&lt;/h2&gt;

&lt;p&gt;Do you want to watch a recording of what this article is all about? &lt;/p&gt;

&lt;p&gt;Who wouldn't?&lt;/p&gt;

&lt;p&gt;It just so happens I did a live session for .NET Conf 2019 that demonstrates this app and gives a high level overview of all the concepts involved - in about 25 minutes!&lt;/p&gt;

&lt;p&gt;So &lt;a href="https://channel9.msdn.com/Events/dotnetConf/NET-Conf-2019/Build-Amazing-Cloud-Connected-Apps-With-Xamarin-Azure-and-App-Center?WT.mc_id=devto-dotnetconf-masoucou"&gt;check it out&lt;/a&gt; - and be sure to come back here for a more in-depth discussion.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are We Going to Build?
&lt;/h2&gt;

&lt;p&gt;In the video above, throughout this article, and with all the code in this repo you just downloaded; we're going to build a weather application. (Based on the &lt;a href="https://github.com/jamesmontemagno/app-pretty-weather"&gt;Pretty Weather sample&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I know, I know - another weather app.&lt;/p&gt;

&lt;p&gt;But this one goes further than most. It actually retrieves the weather via a custom API! It allows users to sign-in to an Active Directory B2C instance. It stores weather preferences into a Azure Cosmos DB instance!&lt;/p&gt;

&lt;p&gt;It's a fully enabled cloud app. Showing off how you can integrate a ton of cloud services into your Xamarin application.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Did We Build It?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An iOS and Android app - all built with Xamarin.Forms. Shared application logic. Shared user interface. Shared code all over the place!&lt;/li&gt;
&lt;li&gt;Azure Functions wraps up a 3rd party weather service into a custom API for the mobile app to call. &lt;/li&gt;
&lt;li&gt;The mobile app uses the Mobile Backend as a Service (MBaaS) functionality of App Center to build out a Azure AD B2C instance so users can log in. Authentication and authorization is... &lt;em&gt;confusing at best&lt;/em&gt; and App Center's MBaaS makes it easy.&lt;/li&gt;
&lt;li&gt;The mobile app makes uses Azure Cosmos DB - so users can persist the weather - again with App Center's MBaaS making authentication/authorization to Cosmos seamless.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Xamarin! Azure Functions! App Center! Amazing!&lt;/p&gt;

&lt;p&gt;Let's take a look at each of the components used to build this app in turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Xamarin
&lt;/h2&gt;

&lt;p&gt;Xamarin's claim to fame is that it allows you to build 100% completely native iOS and Android applications using C# and .NET. But it does more! You can also build macOS, UWP, tvOS, WatchOS, even Tizen applications using it too!&lt;/p&gt;

&lt;p&gt;You can find out how Xamarin works - it's techniques for &lt;a href="https://docs.microsoft.com/xamarin/get-started/what-is-xamarin?WT.mc_id=devto-dotnetconf-masoucou"&gt;code sharing here&lt;/a&gt;. And you can find out how Xamarin.Forms extends that &lt;a href="https://docs.microsoft.com/xamarin/get-started/what-is-xamarin-forms?WT.mc_id=devto-dotnetconf-masoucou"&gt;code sharing to the user interface layer here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QIGXV68a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/Forms_znwvaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QIGXV68a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/Forms_znwvaf.png" alt="" width="879" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this application - we use Xamarin.Forms to build out the user interface and the application logic layer. In fact, the only code that runs on iOS or Android alone is the code which bootstraps Xamarin.Forms. It's boilerplate code added with the File-&amp;gt;New process when creating a project. For our purposes - this application is 100% shared code!&lt;/p&gt;

&lt;p&gt;The app uses the following features of Xamarin.Forms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/enterprise-application-patterns/mvvm?WT.mc_id=devto-dotnetconf-masoucou"&gt;MVVM pattern&lt;/a&gt; - with &lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/xaml/xaml-basics/data-binding-basics?WT.mc_id=devto-dotnetconf-masoucou"&gt;data binding&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/introduction?WT.mc_id=devto-dotnetconf-masoucou"&gt;Shell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/messaging-center?WT.mc_id=devto-dotnetconf-masoucou"&gt;Messaging Center&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/xamarin/xamarin-forms/app-fundamentals/data-binding/converters?WT.mc_id=devto-dotnetconf-masoucou"&gt;Value Converters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app is built of 4 distinct pages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AppShell.xaml&lt;/code&gt; -&amp;gt; the overall container that provides Shell functionality&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MainPage.xaml&lt;/code&gt; -&amp;gt; displays the current weather conditions for the selected city &amp;amp; allows the user to log in via App Center&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SavedCitiesPage.xaml&lt;/code&gt; -&amp;gt; displays the saved cities from App Center&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AddCitySearchPage.xaml&lt;/code&gt; -&amp;gt; allows the user to select a new city to display weather conditions from and saves it to App Center&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  MVVM Pattern
&lt;/h3&gt;

&lt;p&gt;MVVM stands for Model-View-ViewModel. The pattern is a lot like MVC (just more V's and more M's 🤣). Its purpose in life is to decouple any application logic from the application's user interface. You put all logic into the ViewModel. The ViewModel returns information - in a Model class - to be displayed in a View.&lt;/p&gt;

&lt;p&gt;And you can use what's known as data binding to have the view updated automatically whenever the data it's bound to changes (and vice versa).&lt;/p&gt;

&lt;p&gt;This app uses the MVVM pattern for every page. For the &lt;code&gt;MainPage.xaml&lt;/code&gt; which shows the current weather conditions - it has an associated view model of &lt;code&gt;WeatherViewModel&lt;/code&gt;. And that's associated in the &lt;code&gt;MainPage.xaml&lt;/code&gt; with the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ContentPage.BindingContext&amp;gt;
    &amp;lt;viewmodel:WeatherViewModel Temp="61" /&amp;gt;
&amp;lt;/ContentPage.BindingContext&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the binding to each user control is done with a syntax that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Label Text="{Binding Temp}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That tells Xamarin.Forms to look into the ViewModel for a property called &lt;code&gt;Temp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then in order for the &lt;code&gt;Label&lt;/code&gt;s &lt;code&gt;Text&lt;/code&gt; property to change anytime the ViewModel's &lt;code&gt;Temp&lt;/code&gt; property changes - the ViewModel must implement the &lt;code&gt;INotifyPropertyChanged&lt;/code&gt; interface. And the &lt;code&gt;Temp&lt;/code&gt; property's implementation will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int temp;
public int Temp {
    get =&amp;gt; temp;
    set 
    {
        temp = value;
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Temp)));
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Learn more about data binding, MVVM, and building XAML-based Xamarin.Forms apps in this &lt;a href="https://www.youtube.com/watch?v=JH8ekYJrFHs&amp;amp;list=PLdo4fOcmZ0oU10SXt2W58pu2L0v2dOW"&gt;101 video series&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Shell
&lt;/h3&gt;

&lt;p&gt;So let's talk about Xamarin.Forms Shell for a bit. Shell gives applications an opinionated way to do a user interface. Tabs. Flyout menus. &lt;a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/shell/navigation"&gt;Navigation&lt;/a&gt;. This app only uses a subset of the &lt;a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/shell/navigation"&gt;navigation functionality&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can see the navigation happening in the &lt;code&gt;WeatherViewModel&lt;/code&gt; class's &lt;code&gt;ExecuteSavedCitiesCommand&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async Task ExecuteShowSavedCitiesCommand()
{
    try
    {
        // some App Center stuff we'll talk about later

        var citiesPage = new SavedCitiesPage();

        await Shell.Current.Navigation.PushModalAsync(citiesPage);
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine(ex);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Shell is cool in that it allows the app to navigate to new pages from view models. First we new up a &lt;code&gt;Page&lt;/code&gt;. Then navigate to it - asynchronously of course. &lt;code&gt;await Shell.Current.Navigation.PushModalAsync(citiesPage);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Shell provides means to both push onto the navigation stack and also push onto a modal stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GNvUNKRx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/xamagon_kjzies.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GNvUNKRx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/xamagon_kjzies.png" alt="" width="310" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Messaging Center
&lt;/h3&gt;

&lt;p&gt;Messaging Center is a great way to send... well messages.. between any class in a Xamarin.Forms solution - even the Android or iOS projects!&lt;/p&gt;

&lt;p&gt;In the weather app, I'm using Messaging Center to indicate when a city has been selected from the search list. This will allow the &lt;code&gt;SavedCitiesViewModel&lt;/code&gt; to add the newly selected city to its display list and also save it to Cosmos.&lt;/p&gt;

&lt;p&gt;One thing to note - when sending messages using Messaging Center - use custom classes as the origin of the message. &lt;em&gt;Not&lt;/em&gt; the view model or page which you sent them from. This makes the message more reusable. See &lt;a href="https://codemilltech.com/messing-with-xamarin-forms-messaging-center/"&gt;my article here&lt;/a&gt; for more info on it.&lt;/p&gt;

&lt;p&gt;And here's a quick code sample on how it's done.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var message = new SearchCitySelectedMessage { SelectedCity = SelectedCity };

MessagingCenter.Send(message, SearchCitySelectedMessage.Message);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;SearchCitySelectedMessage&lt;/code&gt; is the custom class. And &lt;code&gt;MessagingCenter&lt;/code&gt; is using it as the origin of the message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Value Converters
&lt;/h3&gt;

&lt;p&gt;The final cool thing that's happening in the application is the use of value converters. You use these cool cats during data binding, but when you don't want the control to display the value of the property you're binding to. Rather you want the control to display a different value - but that value is based on the property the view model.&lt;/p&gt;

&lt;p&gt;Take a peek at an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;FontImageSource Glyph="{Binding Icon, Converter={converters:CurrentConditionsIconConverter}}"/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the &lt;code&gt;Glyph&lt;/code&gt; property of &lt;code&gt;FontImageSource&lt;/code&gt; is bound to the view model's &lt;code&gt;Icon&lt;/code&gt; property. But I really want something else to be displayed. So it's attached to a value converter that looks something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class CurrentConditionsIconConverter : IMarkupExtension, IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        // these hex codes coorespond to font aweosome solid codes
        if (value is string condition)
        {
            if (condition == "clear-day")
                return ((char)0xf185).ToString();

            if (condition == "clear-night")
                return ((char)0xf186).ToString();

        // And there's more
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all the cool Xamarin.Forms stuff that's going into the app - now let's take a peek at what's happening in Azure Functions!&lt;/p&gt;

&lt;h2&gt;
  
  
  Azure Functions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=devto-dotnetconf-masoucou"&gt;Azure Functions&lt;/a&gt; is Microsoft's serverless offering. And you can think of serverless as the next evolution to the "as-a-Service". This is Functions-as-a-Service. And you only have to worry about writing code. No operating system. No hardware. You don't even have to think about scaling. You just have to think about what's core to your application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7-Z-1_IE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/Function_kbyemc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7-Z-1_IE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/Function_kbyemc.jpg" alt="" width="343" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And our application is using Functions as something of a backing Web API. Functions can do more - and you can read about &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-triggers-bindings?WT.mc_id=devto-dotnetconf-masoucou"&gt;bindings and triggers here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We're using HTTP triggers. Meaning anytime an HTTP request comes in - our function reacts to it. (And only while it's running do we get charged for it too!)&lt;/p&gt;

&lt;p&gt;You can find the code for our Function in the &lt;code&gt;PrettyWeather.Functions&lt;/code&gt; solution.&lt;/p&gt;

&lt;p&gt;There's one Function involved and it calls out to the Dark Sky Weather API.&lt;/p&gt;

&lt;p&gt;You may be wondering why don't we just put the call to Dark Sky right into the Xamarin app? There's a couple of reasons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dark Sky relies on an API key. We don't want that API key on a user device. So it's better to have it stored in the cloud.&lt;/li&gt;
&lt;li&gt;Having the weather API in a Function allows us to shape the response to make it easier for our app to deal with. And it makes it easier for other apps we create (even web apps) to consume it.&lt;/li&gt;
&lt;li&gt;And having all the logic for calling the 3rd party weather service in a single place makes it easier to refactor should we need to do that.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So ... if you want to reproduce this sample as is - &lt;a href="https://darksky.net/dev/register"&gt;sign up for a Dark Sky account&lt;/a&gt; - it's free. And then create a &lt;code&gt;local.settings.json&lt;/code&gt; file that looks like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "DarkSkyKey": "**** YOUR KEY IS GOING TO GO HERE ****",
    "DarkSkyUrl": "https://api.darksky.net/forecast",
    "DarkSkyParams": "exclude=minutely,hourly,alerts,flags,daily"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you'll be good to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  Invoking a Function From a Xamarin App
&lt;/h3&gt;

&lt;p&gt;There is nothing special calling an Azure Function from a Xamarin application. It's the same as &lt;a href="https://docs.microsoft.com/xamarin/cross-platform/data-cloud/web-services/?WT.mc_id=devto-dotnetconf-masoucou"&gt;calling any web api&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public async Task&amp;lt;WeatherInfo&amp;gt; GetWeatherInfo(double latitude, double longitude)
{
    try
    {
        var infoJson = await httpClient.GetStringAsync($"{functionsUrl}?lat={latitude}&amp;amp;long={longitude}");

        var weatherInfo = JsonConvert.DeserializeObject&amp;lt;WeatherInfo&amp;gt;(infoJson);

        return weatherInfo;
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine(ex);
    }

    return null;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;httpClient&lt;/code&gt; variable is of the type &lt;code&gt;System.Net.HttpClient&lt;/code&gt; - new'd up with the default constructor. That's it. Done and done.&lt;/p&gt;

&lt;h2&gt;
  
  
  App Center
&lt;/h2&gt;

&lt;p&gt;Now &lt;a href="https://docs.microsoft.com/appcenter/?WT.mc_id=devto-dotnetconf-masoucou"&gt;App Center&lt;/a&gt;. App Center is known for its DevOps functionality. You can hook it up to a source control repository and have it build on every push. Have it distribute to testers or the store. Have it track crashes and analytics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Svw-OQQ7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/AppCenter_bhicio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Svw-OQQ7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/code-mill-technologies-inc/image/upload/v1569972754/AppCenter_bhicio.png" alt="" width="309" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But recently App Center has been developing a Mobile Backend as a Service functionality that makes it &lt;a href="https://docs.microsoft.com/appcenter/auth/?WT.mc_id=devto-dotnetconf-masoucou"&gt;easier to interact with Azure AD B2C&lt;/a&gt; for letting users create accounts and sign-in to your apps. They have also been working with Azure Cosmos DB to make it &lt;a href="https://docs.microsoft.com/appcenter/data/?WT.mc_id=devto-dotnetconf-masoucou"&gt;better to work with data&lt;/a&gt; - both online and off - seamlessly. Including having it work with with Identity so you can store personal data without having to worry about handling the tokens from the AD B2C instance yourself!&lt;/p&gt;

&lt;p&gt;The MBaaS portion of App Center does have a bit of ceremony to setup - so follow the &lt;a href="https://docs.microsoft.com/appcenter/sdk/auth/xamarin?WT.mc_id=devto-dotnetconf-masoucou"&gt;steps here for Identity&lt;/a&gt;. And &lt;a href="https://docs.microsoft.com/appcenter/sdk/data/xamarin?WT.mc_id=devto-dotnetconf-masoucou"&gt;here for Data&lt;/a&gt;. But once you're up and running interacting with them from a Xamarin app couldn't be easier. Seriously.&lt;/p&gt;

&lt;p&gt;To sign somebody in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var userInfo = await Auth.SignInAsync();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yeah, that's it.&lt;/p&gt;

&lt;p&gt;Then to save some data to a user's private stash in Cosmos DB&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;await Data.CreateAsync&amp;lt;CityInfo&amp;gt;($"{city.CityName.Replace(" ",string.Empty)}-{city.State}", city,
        DefaultPartitions.UserDocuments);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That first parameter specifies the ID to be used in Cosmos. The second one the object to store. Then the last one where you want to store it. If you use &lt;code&gt;DefaultPartitions.UserDocuments&lt;/code&gt;, the App Center SDK will use the signed-in user from the Auth portion and do everything. You don't have to worry about handling tokens yourself.&lt;/p&gt;

&lt;p&gt;Similarly to read documents for a particular user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public async Task&amp;lt;IEnumerable&amp;lt;CityInfo&amp;gt;&amp;gt; GetSavedCities()
{
    var allSavedCities = new List&amp;lt;CityInfo&amp;gt;();

    var savedCitiesFromCosmos = await Data.ListAsync&amp;lt;CityInfo&amp;gt;(DefaultPartitions.UserDocuments);

    allSavedCities.AddRange(savedCitiesFromCosmos.CurrentPage.Items.Select(ci =&amp;gt; ci.DeserializedValue));

    while (savedCitiesFromCosmos.HasNextPage)
    {
        await savedCitiesFromCosmos.GetNextPageAsync();

        allSavedCities.AddRange(savedCitiesFromCosmos.CurrentPage.Items.Select(ci =&amp;gt; ci.DeserializedValue));
    }

    return allSavedCities;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's a bit more there - but that's because App Center returns data in pages - so it doesn't return everything all at once. But the key here is &lt;code&gt;Data.ListAsync&amp;lt;CityInfo&amp;gt;(DefaultPartitions.UserDocuments);&lt;/code&gt; That's going to use the signed in user - and only return they're documents that match the &lt;code&gt;CityInfo&lt;/code&gt; data type.&lt;/p&gt;

&lt;p&gt;The App Center SDKs are awesome. Check them out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summing It Up
&lt;/h2&gt;

&lt;p&gt;So while you won't be able to build a cloud connected app in minutes - there are a ton of tools at your disposal to let you build one in a straight forward manner.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Xamarin - for creating iOS and Android (and other) apps while sharing a ton of code across the platforms&lt;/li&gt;
&lt;li&gt;Azure Functions - for creating a Web API that lets you concentrate on your code and nothing else&lt;/li&gt;
&lt;li&gt;App Center - a new Mobile Backend as a Service that lets you connect to an AD B2C and Cosmos DB instance and handles all the hard work for you!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions - reach out anytime at &lt;a href="https://twitter.com/codemillmatt"&gt;@codemillmatt&lt;/a&gt; - I'd love to hear from you!&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>mobile</category>
      <category>azure</category>
      <category>mbaas</category>
    </item>
    <item>
      <title>5 Azure Offerings I ❤️ for Xamarin Development</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Tue, 02 Apr 2019 17:03:27 +0000</pubDate>
      <link>https://dev.to/azure/5-azure-offerings-i-for-xamarin-development-1mjb</link>
      <guid>https://dev.to/azure/5-azure-offerings-i-for-xamarin-development-1mjb</guid>
      <description>&lt;p&gt;I'll admit it... I ❤️ Xamarin and I ❤️ Azure. So I thought what better way to spread some ❤️for Xamarin, than to talk about five Azure offerings that I ❤️ when doing Xamarin development!&lt;/p&gt;

&lt;p&gt;And give all of these offerings a spin by signing up for a &lt;a href="https://azure.microsoft.com/en-us/free/?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;free Azure account&lt;/a&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Azure AD B2C
&lt;/h2&gt;

&lt;p&gt;It won't come as a surprise to anybody that &lt;a href="https://docs.microsoft.com/en-us/azure/active-directory-b2c?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure AD B2C&lt;/a&gt; is on my list of Azure offerings that I ❤️. After all, I've written something like a &lt;a href="https://codemilltech.com/tag/azure-ad-b2c/"&gt;13 part article series&lt;/a&gt; on it, instructed a Xamarin University guest lecture, not to mention given several conference talks too.&lt;/p&gt;

&lt;p&gt;But why do I like it so much?&lt;/p&gt;

&lt;p&gt;First and foremost, when combined with &lt;a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-v2-libraries?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;MSAL.NET&lt;/a&gt;, it allows for a pretty simple way to allow users to create accounts and sign in to your app. And not only that, the users can sign up using existing social accounts they may already have, like Twitter or Facebook. So they don't have to create and remember yet another account.&lt;/p&gt;

&lt;p&gt;Then once you have accounts created, an entire world of authentication and authorization opens up to you.&lt;/p&gt;

&lt;p&gt;Plus, it integrates seamlessly with other Azure services. You want to lock down your Azure Functions? It's straight-forward to do so with Azure AD B2C and the Functions portal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Azure Functions
&lt;/h2&gt;

&lt;p&gt;Speaking of &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure Functions&lt;/a&gt; - that's number two on my list. Functions are not something that get consumed by an SDK hosted within your Xamarin application. Rather they will generally get invoked by an HTTP call.&lt;/p&gt;

&lt;p&gt;But what make these amazing is that they allow you to create a backend for your app without having to spin up an entire ASP.NET WebAPI or Node.js backend which will sit idle most of the time waiting for a request to come in. With Azure Functions, you create a ... well, function ... and that singular function is the endpoint. You don't have to worry about the rest of the overhead that goes with hosting a web-based API. (This is where the term serverless comes in.)&lt;/p&gt;

&lt;p&gt;But what sets Functions apart is that they have bindings to other Azure services. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need to have a particular query run and the dataset populated from &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure Cosmos DB&lt;/a&gt; - and have that sent as an incoming parameter? ✅&lt;/li&gt;
&lt;li&gt;Need to write to an &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure BLOB Storage&lt;/a&gt;? ✅&lt;/li&gt;
&lt;li&gt;Even &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-signalr-service?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;write to SignalR clients&lt;/a&gt;? ✅ ✅ and ✅!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out &lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;all the bindings here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With all of this power attached to other Azure services - Functions are an amazing way to power your mobile backend!&lt;/p&gt;

&lt;h2&gt;
  
  
  Azure Key Vault
&lt;/h2&gt;

&lt;p&gt;Now this next one is a little tricky.&lt;/p&gt;

&lt;p&gt;First let me lay out a scenario...&lt;/p&gt;

&lt;p&gt;Let's say that you've been given the chance by your boss to develop the app that you've been talking about for the last 2 years. &lt;/p&gt;

&lt;p&gt;You have 2 months to put it together. So you move as fast as possible and hardcode database connection strings, Twitter keys, and anything else that needs a secret right into a config file (but at least you didn't push it to GitHub!)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hey, you got to get it done!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You do a tremendous job! So good in fact, that you get 3 more developers! But an issue quickly starts to arise - how do you distribute your app's secrets? And what happens when your teams grows even more? And even worse, what happens when Steve - and it's always Steve - is at a coffee shop and somebody snaps a photo of his laptop screen with your database connection string exposed?&lt;/p&gt;

&lt;p&gt;This is where &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure Key Vault&lt;/a&gt; comes in handy! It's a vault - that stores your keys - in Azure. By having a single point of where all of your secrets can be, it allows you to quickly cycle, or version, keys should a breach occur.&lt;/p&gt;

&lt;p&gt;All you need to do is tell Key Vault - hey, give me this key ... and it'll send the secret value down to you!&lt;/p&gt;

&lt;p&gt;But here's the tricky part. You really shouldn't ever have a secret on-device, even in a transient state. What you should do is request an access token, pass that token to a web service, and once that service verifies that you have access it grabs the key and does what it need to do.&lt;/p&gt;

&lt;p&gt;The web service, by virtue of being hosted in Azure, &lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/key-vault-secure-your-key-vault?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;will have access&lt;/a&gt; to Key Vault (after some config is done).&lt;/p&gt;

&lt;p&gt;So Key Vault - it's a great place to store your app's secrets. And there is a .NET SDK should you choose to access them on-device. But you should really consider authenticating, and passing a token to a web service (which uses the Key Vault SDK), and have that service grab whatever info it can based on the secret key.&lt;/p&gt;

&lt;p&gt;Still, use Key Vault whenever you can to store your secrets!&lt;/p&gt;

&lt;h2&gt;
  
  
  Azure Custom Vision API
&lt;/h2&gt;

&lt;p&gt;You've probably seen the cool demos from the &lt;a href="https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/home?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Cognitive Services Computer Vision API&lt;/a&gt; - where it tells you that it's looking at an "orange on a table".&lt;/p&gt;

&lt;p&gt;Yeah - that's cool and all. But there's something even better. There's an Azure service out there that let's you train up your own vision model... which is Machine Learning talk for telling the computer exactly what types of things you want it to recognize.&lt;/p&gt;

&lt;p&gt;And that service is the &lt;a href="https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/home?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Azure Custom Vision API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's say you want to identify individual varieties of plants by taking a photo of them.&lt;/p&gt;

&lt;p&gt;If you used the Cognitive Services Computer Vision API - all it would tell you is that it sees a plant.&lt;/p&gt;

&lt;p&gt;However, the Custom Vision API would tell you it found a Fiddlehead Fern!&lt;/p&gt;

&lt;p&gt;Now, all of this in-depth info does not come without its &lt;a href="https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/getting-started-build-a-classifier?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;share of work&lt;/a&gt;. In order for it to distinguish the species of plant, you first have to load in many different photos of that plant. Then &lt;em&gt;label&lt;/em&gt; each photo - or tell the machine what it is. After that, you train it. So it starts to learn how to identify which plants are which.&lt;/p&gt;

&lt;p&gt;It might take more initial work, but what you get in the long run is a more specific and tailored vision model that Cognitive Services and provide you out of the box.&lt;/p&gt;

&lt;p&gt;Oh! And you &lt;strong&gt;DO NOT&lt;/strong&gt; have to call a web api to use these! You can download a TensorFlow, CoreML, or even an Onnx (for Windows) model on device and run them that way! And that means fast, fast, fast! Always good for mobile development.&lt;/p&gt;

&lt;h2&gt;
  
  
  App Center
&lt;/h2&gt;

&lt;p&gt;Here I'm not going to talk about the existing &lt;a href="https://docs.microsoft.com/en-us/appcenter?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;App Center&lt;/a&gt; functionality of &lt;a href="https://msou.co/bq1"&gt;Build&lt;/a&gt;, &lt;a href="https://docs.microsoft.com/en-us/appcenter/test-cloud?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Test&lt;/a&gt;, &lt;a href="https://msou.co/bq3"&gt;Deploy&lt;/a&gt;, &lt;a href="https://docs.microsoft.com/en-us/appcenter/diagnostics?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Crash&lt;/a&gt;-a-&lt;a href="https://docs.microsoft.com/en-us/appcenter/analytics?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;ltyics&lt;/a&gt;, and &lt;a href="https://docs.microsoft.com/en-us/appcenter/push?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;Push&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Rather, I'm going to talk about the future of App Center. And this is a future that's going to make a lot of Xamarin developers very, very happy!&lt;/p&gt;

&lt;p&gt;You see, the App Center team has released a &lt;a href="https://msou.co/bq7"&gt;roadmap for the first 6 months&lt;/a&gt; of their 2019 development.&lt;/p&gt;

&lt;p&gt;And one of the items on that roadmap is: creating next generation Azure mobile services.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;App Center is going to create the next generation of Azure mobile services!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And here's the best thing - they're going to do all of their planning and design in the open! You can follow along &lt;a href="https://msou.co/bq8"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;More to the point, start leaving your comments so you can influence the design on upcoming changes to &lt;a href="https://msou.co/bq9"&gt;Identity&lt;/a&gt;, a &lt;a href="https://msou.co/bra"&gt;Cosmos DB storage backend&lt;/a&gt;, and more!&lt;/p&gt;

&lt;p&gt;This is being designed in the open and the team is 100% open to community collaboration. Please, let them know what you think!&lt;/p&gt;

&lt;h2&gt;
  
  
  Summing It Up!
&lt;/h2&gt;

&lt;p&gt;There you have it - five great Azure services that I ❤️ and make life easier for Xamarin developers.&lt;/p&gt;

&lt;p&gt;Azure AD B2C for all of your user's account needs. Azure Functions for a full on backend without you having to do all the work. Azure Key Vault - keep those secrets safe! Azure Custom Vision API - detect highly specific vision models. &lt;/p&gt;

&lt;p&gt;And of course - the all new App Center - go ahead and help determine the future of mobile development in Azure!&lt;/p&gt;

&lt;p&gt;So give these services a whirl with that &lt;a href="https://azure.microsoft.com/en-us/free/?WT.mc_id=fiveazureforxamarin-devto-masoucou"&gt;free Azure account&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>tips</category>
      <category>xamarin</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Using Azure Key Vault with Your Mobile App the Right Way</title>
      <dc:creator>Matthew Soucoup</dc:creator>
      <pubDate>Mon, 18 Mar 2019 17:32:45 +0000</pubDate>
      <link>https://dev.to/azure/using-azure-key-vault-with-your-app-the-right-way-4b67</link>
      <guid>https://dev.to/azure/using-azure-key-vault-with-your-app-the-right-way-4b67</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552587811%2FPNG_image-EA4DAD32F0FB-1_cjnje3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552587811%2FPNG_image-EA4DAD32F0FB-1_cjnje3.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hey! Follow along with all the action here! First, if you don't have an Azure subscription, &lt;a href="https://azure.microsoft.com/free?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;get a free one here&lt;/a&gt;! And then next, you can deploy all the resources I'm going to talk about as easy as clicking on the button below button.&lt;br&gt;&lt;br&gt;
&lt;a href="https://codemilltech.com/mobile-apps-azure-keyvault-dont-do-it/repository=https://github.com/codemillmatt/mobile-keyvault/blob/master/README.md#/form/setup" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fazuredeploy.net%2Fdeploybutton.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't hardcode connection strings - or any secrets - in your apps! And for all that's holy - encrypt those secrets!&lt;/p&gt;

&lt;p&gt;Like most other advice that I get (floss... exercise... shower more than once per week...) that seemingly easy to follow best practice of security guidance doesn't get followed very often.&lt;/p&gt;

&lt;p&gt;Why? Because it's an extra step in the development cycle. Why go through the hassle of encrypting, storing, having to come up with a means to distribute my app's secrets to other devs on my team... when I could just have them sitting around somewhere in plain text? What are the odds that somebody will decompile my app to get at them anyway?&lt;/p&gt;

&lt;p&gt;Just like why would I exercise when I could sit around, eat Pringles, and watch re-runs of SpongeBob SquarePants? What are the odds that I'm going to die of a heart attack today?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_500%2Fv1552429919%2FPNG_image-EF444747D594-1_si76os.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_500%2Fv1552429919%2FPNG_image-EF444747D594-1_si76os.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well ... eventually luck runs out. Someday, something bad will happen to my app's secrets even if the app doesn't get cracked (like I commit the secrets file to GitHub). Just like someday I'll regret skipping all of those workouts to watch marathons of the Golden Girls. (Lol ... like that would ever be a regret.)&lt;/p&gt;

&lt;p&gt;But there has to be a way ... there has to be a way to keep the app's secrets safe, all the while following best practices, &lt;em&gt;and&lt;/em&gt; not making our lives too difficult ... right? Right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter Azure Key Vault
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/azure/key-vault/key-vault-overview?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Azure Key Vault&lt;/a&gt; provides a centralized place to store not only your application's secrets, but also can be used for key and &lt;a href="https://docs.microsoft.com/azure/key-vault/certificate-scenarios?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;certificate management&lt;/a&gt; too.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Key Vault puts all secrets in one spot ... almost as good as a plain text file, but with encryption, authorization, and lots of other perks. 😉&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Key Vault secrets are essentially a key/value store - but with lots of polish on top of them. At a minimum, you create a secret within Key Vault, give it a name and then place the (secret) value in it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/key-vault/key-vault-overview?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;As the documentation states&lt;/a&gt;, the data/secret is encrypted both at rest and in transmission and Microsoft never sees the data contained within. You can monitor the access &amp;amp; use of each secret. And access to secrets is controlled by Active Directory.&lt;/p&gt;

&lt;p&gt;You can version secrets - so if the connection string changes you can set the existing value as old and create a new value, with the connection string, all within the same key.&lt;/p&gt;

&lt;p&gt;You also can disable keys, set activation and deactivation dates.&lt;/p&gt;

&lt;p&gt;And each secret in Key Vault gets its own URI which it can be referenced by.&lt;/p&gt;

&lt;p&gt;So it's cool, right? Application secrets in a single spot, encryption by default, and there are even &lt;a href="https://docs.microsoft.com/dotnet/api/overview/azure/key-vault?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Microsoft provided SDKs&lt;/a&gt; to get at them.&lt;/p&gt;

&lt;h2&gt;
  
  
  So Here's What We're Going To Do In This Article...
&lt;/h2&gt;

&lt;p&gt;We’re going to start out with a Xamarin mobile app. That app is going to access Azure Table storage. The API Key to get at Table storage will be hardcoded into the app.&lt;/p&gt;

&lt;p&gt;We want to move the API key into Key Vault. But we don’t want to have any credentials or secrets at all in the mobile app.&lt;/p&gt;

&lt;p&gt;So instead we’re going to create a Functions app to use Key Vault. (And you’ll see how we get around the credentials problem below.)&lt;/p&gt;

&lt;p&gt;The mobile app will then invoke the Function to get the data.&lt;/p&gt;

&lt;p&gt;In fact, anybody will be able to issue a GET request against the Function and receive back the contents of the table.&lt;/p&gt;

&lt;p&gt;The API key to Azure Storage is protected within Key Vault and only accessible from the Azure Function. And since the Function only returns data, we’re not concerned with people inserting data into the Table.&lt;/p&gt;

&lt;p&gt;If you wanted to lock down the Function so only certain people can access it or limit the data the Function returns based on who’s logged in. Check out my &lt;a href="https://codemilltech.com/tag/azure-ad-b2c/" rel="noopener noreferrer"&gt;series of articles&lt;/a&gt; on authentication and authorization with Azure AD B2C.&lt;/p&gt;

&lt;p&gt;Away we go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Use Key Vault!
&lt;/h2&gt;

&lt;p&gt;So I have an app that pulls some data from &lt;a href="https://docs.microsoft.com/azure/cosmos-db/table-storage-overview?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Azure Table storage&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's a Xamarin.Forms app and it displays the data it finds in the Table in a &lt;code&gt;ListView&lt;/code&gt; - it looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_700%2Fv1552347777%2FSimulator_Screen_Shot_-_iPhone_XS_-_2019-03-11_at_16.39.25_okxs0b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_700%2Fv1552347777%2FSimulator_Screen_Shot_-_iPhone_XS_-_2019-03-11_at_16.39.25_okxs0b.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code which grabs the data from Table storage looks like this:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;There's a couple things wrong here (or as I like to say, it's demo code!) - but the big one, and the one that we're going to fix, is that the Azure Storage account's API key is hardcoded.&lt;/p&gt;

&lt;p&gt;The fix should be fairly easy ... add the API key for Azure Storage to Key Vault, use the .NET Key Vault SDK to grab it, then continue on with the code - pretty much as is.&lt;/p&gt;

&lt;h3&gt;
  
  
  So Let's Add The Secret!
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/azure/key-vault/quick-create-portal?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Adding the secret in Key Vault&lt;/a&gt; is easy, easy, easy! (As an aside, don't you hate when people say something is easy? Everything's easy when you already know how to do it. So let's try it again....)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/azure/key-vault/quick-create-portal?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Adding the secret in Key Vault&lt;/a&gt; isn't too bad!&lt;/p&gt;

&lt;p&gt;Open up your Key Vault in the portal, go to the &lt;code&gt;Secrets&lt;/code&gt; option then the &lt;code&gt;Generate/Import&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552408635%2FScreen_Shot_2019-03-12_at_9.35.53_AM_mwzemo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552408635%2FScreen_Shot_2019-03-12_at_9.35.53_AM_mwzemo.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you'll see this page - on there give the secret a name - and pop in the value. In this case it'll be the storage connection key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fv1552408804%2FScreen_Shot_2019-03-12_at_9.39.23_AM_dvvtdr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fv1552408804%2FScreen_Shot_2019-03-12_at_9.39.23_AM_dvvtdr.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now on to using Key Vault's .NET SDK to access it from our mobile app and we'll be done!&lt;/p&gt;

&lt;h3&gt;
  
  
  But... Don't Use Key Vault - In a Mobile App
&lt;/h3&gt;

&lt;p&gt;Ugh... but I have some bad news ... don't use Azure Key Vault when you're building a mobile app.&lt;/p&gt;

&lt;p&gt;At least not directly.&lt;/p&gt;

&lt;p&gt;You see, we want to keep all app secrets off the device if possible. Even if they're never being stored and will only be in memory transiently.&lt;/p&gt;

&lt;p&gt;To solve this particular conumdrum... we're still going to take advantage of Key Vault and all it has to offer and put the Azure Storage API key in there.&lt;/p&gt;

&lt;p&gt;But instead of having the mobile app directly access the Table storage, we're going to have an &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-overview?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Azure Function&lt;/a&gt; do that.&lt;/p&gt;

&lt;p&gt;This then gives us several benefits.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We get to use Key Vault! 🎉&lt;/li&gt;
&lt;li&gt;Key Vault is accessed completely over the Azure backbone - no public internet - and same for Azure storage. &lt;em&gt;Fast!&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;We'll end up with an API that can be used in more places than the mobile app.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OK good ... we're going to use &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-bindings-storage-table?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Function-Table storage bindings&lt;/a&gt; to get at the data. And the mobile app will call that Function.&lt;/p&gt;

&lt;p&gt;But how does the Function access Key Vault to retrieve the Azure Storage connection string?&lt;/p&gt;

&lt;p&gt;Hardcoding Key Vault's credentials into the Function's app settings would kind of defeat the purpose of &lt;em&gt;not&lt;/em&gt; having the Storage's connection string in the app settings.&lt;/p&gt;

&lt;p&gt;So how does Azure Functions communicate to Azure Key Vault ... without the hardcoded credentials?&lt;/p&gt;

&lt;p&gt;Through the wonders of the &lt;a href="https://docs.microsoft.com/azure/app-service/overview-managed-identity?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Managed Identity&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managed Identity
&lt;/h2&gt;

&lt;p&gt;So remember when I said that access to the Key Vault is controlled through &lt;a href="https://docs.microsoft.com/azure/key-vault/key-vault-secure-your-key-vault?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Active Directory&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;It turns out that it's pretty straightforward to make your Function App a member of the Active Directory. And once it's Active Directory-izied you can grant the Function App access to Key Vault as easily as you can grant access to a person that's in Active Directory.&lt;/p&gt;

&lt;p&gt;And this is what's known as Managed Identity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active Directory-izing Your Function App
&lt;/h3&gt;

&lt;p&gt;This &lt;a href="https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;same process&lt;/a&gt; goes for any App service.&lt;/p&gt;

&lt;p&gt;It's really kinda anti-climatic.&lt;/p&gt;

&lt;p&gt;Pop over to the Azure portal for your Function. Select the &lt;code&gt;Platform Features&lt;/code&gt; tab, then the &lt;code&gt;Identity&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_600%2Fv1552407050%2FScreen_Shot_2019-03-12_at_9.09.20_AM_k3bszq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_600%2Fv1552407050%2FScreen_Shot_2019-03-12_at_9.09.20_AM_k3bszq.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have Active Directory-izied your Functions app.&lt;/p&gt;

&lt;p&gt;Now the Functions App (which is really an App Service) will now appear in the Active Directory that your Azure subscription is a part of.&lt;/p&gt;

&lt;p&gt;Done (with this part).&lt;/p&gt;

&lt;h3&gt;
  
  
  Granting the Key Vault Permissions
&lt;/h3&gt;

&lt;p&gt;The next step is to grant the new Active Directory (AD) principal - aka your Function App permission to the secrets contained within Key Vault.&lt;/p&gt;

&lt;p&gt;Back over to Key Vault in the Azure portal we go!&lt;/p&gt;

&lt;p&gt;You grant new permissions to AD principals through the &lt;code&gt;Access policies&lt;/code&gt; option and the &lt;code&gt;Add new&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_900%2Fv1552409555%2FScreen_Shot_2019-03-12_at_9.47.45_AM_qjsqsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_900%2Fv1552409555%2FScreen_Shot_2019-03-12_at_9.47.45_AM_qjsqsk.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next page then take a bit of explanation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_900%2Fv1552410147%2FScreen_Shot_2019-03-12_at_9.55.31_AM_vl22mw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fc_scale%2Ch_900%2Fv1552410147%2FScreen_Shot_2019-03-12_at_9.55.31_AM_vl22mw.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first thing you can do is &lt;code&gt;Configure from template&lt;/code&gt;. This is a shortcut to select various permissions for you. Which can be seen in the various permissions dropdowns.&lt;/p&gt;

&lt;p&gt;I picked &lt;code&gt;Secret Management&lt;/code&gt; which selected all the secret functions for me.&lt;/p&gt;

&lt;p&gt;The next thing that needs to be done is select the principal to apply these roles to.&lt;/p&gt;

&lt;p&gt;And to select your function app - search for its name. Eventually AD will find it. Select the name and hit &lt;code&gt;Select&lt;/code&gt; and &lt;code&gt;OK&lt;/code&gt; a bunch of times.&lt;/p&gt;

&lt;p&gt;And then you're set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting the Function to Talk to Key Vault
&lt;/h2&gt;

&lt;p&gt;Now to get the &lt;a href="https://docs.microsoft.com/azure/app-service/app-service-key-vault-references?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Function to use Key Vault&lt;/a&gt;. The code looks like this:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;If you've ever created a Function that accessed Azure Table storage before, you're probably thinking to yourself ... "the Function's code when accessing Key Vault is exactly the same as when it doesn't!"&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Function's code when accessing Key Vault is exactly the same as when it doesn't!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But how does the Function use Key Vault? The magic is in the App Settings. In particular the &lt;code&gt;KeyvaultedStorageConnection&lt;/code&gt; string.&lt;/p&gt;

&lt;p&gt;To make that particular value access Key Vault - you use this syntax:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;So it goes into the Function's app settings. It's the value portion of the &lt;code&gt;KeyvaultedStorageConnection&lt;/code&gt; key.&lt;/p&gt;

&lt;p&gt;And as you can tell, it uses the syntax: &lt;code&gt;@Microsoft.Keyvault(SecretUri=&amp;lt;A SECRET URI&amp;gt;)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Where does that &lt;code&gt;&amp;lt;A SECRET URI&amp;gt;&lt;/code&gt; come from?&lt;/p&gt;

&lt;p&gt;From the secret's panel in Key Vault, of course! Back into Key Vault into the portal you go!&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;Secrets&lt;/code&gt; on the left-hand navigation. Then click on the secret you just created. Then by clicking on the &lt;code&gt;current version&lt;/code&gt; in the resulting window, you'll see the property's of the secret.&lt;/p&gt;

&lt;p&gt;In that window - there's a &lt;code&gt;Secret Identifier&lt;/code&gt; box. That's the URI which you'll use for the &lt;code&gt;&amp;lt;A SECRET URI&amp;gt;&lt;/code&gt; above.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fv1552411279%2FScreen_Shot_2019-03-12_at_10.19.31_AM_ohmrdw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Fv1552411279%2FScreen_Shot_2019-03-12_at_10.19.31_AM_ohmrdw.png" alt="Mobile Apps + Azure Key Vault ... Don't Do It!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The App's Code
&lt;/h2&gt;

&lt;p&gt;At this point you're done. Well, except for getting the mobile app to call the Function of course.&lt;/p&gt;

&lt;p&gt;The Function in this case is HTTP triggered. So it's a web call from our Xamarin app - looks like this:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  That's All Folks
&lt;/h2&gt;

&lt;p&gt;And finally, we've reached the end of our journey!&lt;/p&gt;

&lt;p&gt;The mobile app no longer has secrets hardcoded in it, but yet it's not using Key Vault either! Because we don't want any secrets to land on that mobile app if we can at all avoid it.&lt;/p&gt;

&lt;p&gt;We're still using Key Vault though, and all of the goodness it provides, and created a Function to access it - through Managed Identity. This way the Function doesn't have to have any secrets stored in it either!&lt;/p&gt;

&lt;p&gt;Cool, cool, cool! Not too much extra work - and a ton of extra security!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552587811%2FPNG_image-EA4DAD32F0FB-1_cjnje3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fcode-mill-technologies-inc%2Fimage%2Fupload%2Fbo_1px_solid_rgb%3A000000%2Cc_scale%2Ch_600%2Fv1552587811%2FPNG_image-EA4DAD32F0FB-1_cjnje3.png" alt="keyvault for the win"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if you'll excuse me - I think there's another rerun of SpongeBob about to air.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Quick Postscript - Or Using a SAS On Device
&lt;/h3&gt;

&lt;p&gt;Why not use a &lt;a href="https://docs.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1?WT.mc_id=keyvaultmobiledont-devto-masoucou" rel="noopener noreferrer"&gt;Storage Access Signature (SAS)&lt;/a&gt; to access the Azure Storage Account? Well, from the mobile device that could totally have been done. And with that I could have still used the .NET Storage SDK.&lt;/p&gt;

&lt;p&gt;However, to generate that SAS, I would still have needed to get direct access to the Storage account through the full connection string somehow. And that would be done in the same manner as above. Except instead of returning data, the Function would have returned an SAS token.&lt;/p&gt;

</description>
      <category>xamarin</category>
      <category>azurefunctions</category>
      <category>azuretablestorage</category>
      <category>azurekeyvault</category>
    </item>
  </channel>
</rss>
