Nebraska.Code() Conference 2016

Our Co-Founders are headed to Nebraska.Code() conference next week and will be presenting 4 sessions on Friday, May 20th. It’s a great opportunity for our team to share our experiences and give back to the community through speaking and we are pleased to have been selected to speak at Nebraska.Code() again this year.

Humanitarian Toolbox

In addition to speaking, Nebraska.Code() gives us a chance to contribute our skills to help others. The conference will be hosting the Humanitarian Toolbox project with a code-a-thon that will allow attendees to work on developing software tools to help with disaster relief around the globe. We are pleased to be able to contribute our time and skills to this great cause and hope to see many of our fellow speakers and attendees at the Code-A-Thon.

Speaking (Friday, May 20th)

Brent Stewart (@BrentEStewart)

Getting to Market Faster with VSTS

11:45 AM (Breakout B1)

Visual Studio Team Services is Microsoft’s next evolution of Visual Studio Online. Come see what is new and learn how VSTS can make your life better. We will examine the different modules available and look at a sample workflow taking us from project creation through deployment. Along the way we will look at how we can use VSTS to setup our source control, continuous integration, automated testing, continuous deployment and more. VSTS is a powerful tool, come see if it is a good fit for you and your team.

Practical Patterns for the Progressing Programmer

2:15 PM (Breakout A1)

Understanding software design patterns is critical for every developer who strives to be top-tier. Come join us as we explore some of the most common design patterns and discuss how you can leverage them to make your life easier. We will look at some real world code examples and learn to recognize common problems and how to use different design patterns to create elegant solutions. Learn to spot common anti-patterns and the pitfalls they bring. Join us and take the next step in your career.

Duane Newman (@DuaneNewman)

Xamarin Forms: Writing one app to rule all your platforms

9:45 AM (Breakout B1)

Are you seeking the Holy Grail of Write Once Run Anywhere app development? Then Xamarin Forms might be what you are looking for. This session will give you the information you need to understand Xamarin Forms and how it can be used to lower the friction of cross platform mobile development. You will see how easy it is to simultaneously create your app for iOS, Android, and Windows Phone using this Open Source toolset.

Branded for Success

1:00 PM (Breakout D)

Everyone has a personal brand! The question is are you in control of yours, or letting others define it for you? What does your brand say about you? Are you a Coca-Cola, Pepsi or RC Cola? Brand isn't just a logo and website, it's your first impression on potential employers, clients, and even your co-workers. Let's take a look at the relevance of a personal brand in today's developer market and what you can do to take control of yours.

Great News for Mobile Developers from Build 2016

Miguel de Icaza's breakout session at Build

In case you haven’t been following the news around Microsoft’s purchase of Xamarin here is some exciting news. When this merger was first announced we were excited to see Microsoft commit to the Xamarin toolset as well as being hopeful that the business editions would become part of the MSDN collection of software (and thus save us about $2,000 per developer). What we weren’t expecting was for Microsoft to make Xamarin a standard part of Visual Studio, available to all Visual Studio developers. Not just MSDN or retail licensed developers, but all developers, including Visual Studio Community Edition.

Miguel de Icaza presenting at the Build Day 2 KeynoteThis is a big deal for us and other companies wanting to do cross-platform mobile development with C# and .NET. Not only have our expenses been drastically reduced to continue to use the toolsets we love, but now the conversation about working with internal resources at a client to maintain, augment, or otherwise work with this product just got a lot easier. We no longer need to sell them on buying on of their developers a $2000/yr subscription to be able to work with the source we deliver them.

Hopefully this will entice other developers to take their apps to .NET and hopefully that will get their apps on Windows Phone and give it some traction in the market.

In addition to all this already great news, they have also announced that the Xamarin codebase will be open sourced and made available through GitHub. I think we can expect some great community driven improvements coming to Xamarin.Forms as those of us who have been working with it get our hands on the source.

This is a great time to be a .NET developer, and an even better time to be a .NET cross-platform mobile developer.

You can read more details about the announcements on Xamarin’s blog.

Co-Founders Speaking at KCDC 2015

I hope you are as excited about the 2015 Kansas City Developers Conference as we are. This year both Brent and Duane will be presenting breakout sessions. Additionally they will be presenting a brand new workshop on Xamarin.Forms development. It’s going to be a lot of fun and we hope to see you there.

Cross-Platform Mobile with C# & Xamarin

This full day 8 hour workshop will be presented on Wednesday by both Duane and Brent. We’ll be helping attendees get up and going writing their first cross-platform app using Xamarin.Forms().

Level Up with PowerShell – Brent Stewart

Thursday 9:00 AM – Room 3501D

Time is a valuable and precious resource, and it seems there are never enough hours in a day. Come learn how PowerShell can empower you to be a more effective developer. We'll look at how PowerShell can be used to help solve common problems and examine what makes it such a rich and powerful tool.

Xamarin Forms: Writing One App to Rule All Your Platforms – Duane Newman

Thursday 10:10 AM – Room 3501B

Are you seeking the Holy Grail of Write Once Run Anywhere app development? Then Xamarin Forms might be what you are looking for. This session will give you the information you need to understand Xamarin Forms and how it can be used to lower the friction of cross platform mobile development. You will see how easy it is to simultaneously create your app for iOS, Android, and Windows Phone.

STL Tech Talk Interviews Co-Founder Duane Newman at St Louis Days of .NET 2014

Co-Founder Duane Newman had the honor to visit with STL Tech Talk’s JJ Hammond while at the 2014 St. Louis Days of .NET conference. Duane was speaking at the conference about getting started with Xamarin.Forms. The interview focused on how Xamarin is helping C# developers be productive in mobile development and the improvements that Xamarin.Forms offers.

Recorded on November 14, 2014, it was just recently rediscovered and posted for viewing.

Duane Newman - St. Louis Days of .NET 2014

Xamarin Forms and the Active Directory Authentication Library (ADAL)

We just finished working on a proof of concept for a project that needed to do Active Directory authentication, primarily using Azure AD. We wanted to do this in Xamarin Forms as the app falls into the realm of a typical line of business UI app and will have a pretty straightforward design.

We started off with some great sample code from the ADAL project team. They have a beta release that supports traditional Xamarin projects (native UI) for Android and iOS as well as Windows Phone. It looked really simple and had great conveniences like async/await support. We thought it would be a walk in the park, not so.

It turns out that the beta version with Xamarin support does not support targeting Silverlight based Windows Phone assemblies. This is important, because Xamarin Forms support for Windows Phone uses the Silverlight implementations. This precluded us from including the authentication login inside the common PCL project. After a little digging it turns out that the ADAL just recently (Jan 15) released a new stable version that introduced support for Silverlight based Windows Phone apps. This was exciting, but there was no complete sample solution and the blog post announcing was missing a couple helpful nuggets of information in the code snippets.

We ended up getting it working, but not as elegantly as we had hoped. By the time I was done I understood a bit more why the original library didn’t handle Silverlight projects, it is a bit more bulky to work with for this situation.

This code is part of a client’s project so there is no sample available right now, we’ll work on getting a stripped down set of code for reference, until then here are some notes on the relevant code changes we made.

Changes for the Windows Phone Project

interface IWebAuthenticationContinuable
{
    /// <summary>
    /// This method is invoked when the web authentication broker returns
    /// with the authentication result
    /// </summary>
    /// <param name="args">Activated event args object that contains returned authentication token</param>
    void ContinueWebAuthentication(WebAuthenticationBrokerContinuationEventArgs args);
}
//Changes to make to your Windows Phone App (not Xamarin Forms App)
public partial class App : Application
{
    public App()
    {        
        PhoneApplicationService.Current.ContractActivated += Application_ContractActivated;
    }
    
    private void Application_ContractActivated(object sender, Windows.ApplicationModel.Activation.IActivatedEventArgs e)
    {
        var webAuthenticationBrokerContinuationEventArgs = e as WebAuthenticationBrokerContinuationEventArgs;
        if (webAuthenticationBrokerContinuationEventArgs != null)
        {
            var wabPage = RootFrame.Content as IWebAuthenticationContinuable;
            if (wabPage != null)
            {
                wabPage.ContinueWebAuthentication(webAuthenticationBrokerContinuationEventArgs);
            }
        }
    }
}
//The Root Page of your WP Project
public partial class MainPage : FormsApplicationPage, IWebAuthenticationContinuable
{
    public static AuthenticationContext AuthContext { get; private set; }
    public static Action<string> TheCallback { get; set; }

    public static async void CreateAuthContext(string authUrl)
    {
        AuthContext = await AuthenticationContext.CreateAsync(authUrl, true, new TokenCache());
    }
    
    public async void ContinueWebAuthentication(WebAuthenticationBrokerContinuationEventArgs args)
    {
        await AuthContext.ContinueAcquireTokenAsync(args);
    }
}
//Service defined and called from ViewModel, passes in the method to callback.
public class WindowsPhoneAuthorizationService : IAuthorizationService
{
    public void GetAuthorizationToken(string oAuthUrl, string site, Action<string> callbackAction)
    {
        string clientId = "YOUR CLIENT ID"; 
        Uri returnUri = new Uri("YOUR RETURN URI"); 

        MainPage.TheCallback = callbackAction;
        try
        {
            MainPage.CreateAuthContext(oAuthUrl);

            var authContext = MainPage.AuthContext; 
            if (authContext.TokenCache.ReadItems().Count() > 0)
                authContext = AuthenticationContext.CreateAsync(authContext.TokenCache.ReadItems().First().Authority).GetResults();

            authContext.AcquireTokenAndContinue(site, clientId, returnUri, MainPage.callback);
        }
        catch (Exception ee)
        {
            callbackAction(string.Empty);
        }
    }
}

Usage from the ViewModel

//Ueed in my ConnectCommand
private async void ConnectExecute(object param)
{

    var authService = DependencyService.Get<IAuthorizationService>();

    authService.GetAuthorizationToken(oAuthUrl, SiteUrl, setToken); 

}

//callback from authentication
private void setToken(string token)
{
    if (!string.IsNullOrWhiteSpace(token))
    {
        Device.BeginInvokeOnMainThread(() =>
        {
            //Do something with the token.
        });
    }
}

Maybe Xamarin will make some changes that allows them to target Windows Runtime based projects in the future and this will all be irrelevant, but until then hopefully this bit of code helps you make some progress doing Active Directory Authentication in your Xamarin Forms projects.

Update: It looks like last week there was a refresh to the ADAL v3 Preview, but as stated “This refresh does not work with Xamarin.Forms. We are looking into it – and if you have feedback please send it our way! – but we didn’t do work in this refresh to that end.” Good news that they are investigating integrating support. Until then Xamarin Forms and ADAL will continue to be bleeding edge.

Nebraska Code Conference 2015

We are excited to have the opportunity for both Brent and Duane to present sessions at Nebraska.Code() in just a couple weeks. If you are in the NE/KS area and are looking for a great conference to learn about new tech, network, and see some presentations from sought after speakers (like Mads Kristensen, Richard Campbell, Carl Franklin, and Pete Brown) you should consider attending NCC March 19th-21st in Lincoln, NE.

If you will be attending NCC we hope we get to see you in our sessions. We are both presenting on Friday (3/20) afternoon with Brent speaking at 3:30 and Duane at 4:45.

Brent will be presenting Level Up with PowerShell at 3:30pm

Time is a valuable and precious resource, and it seems there are never enough hours in a day. Come learn how PowerShell can empower you to be a more effective developer. We'll look at how PowerShell can be used to help solve common problems and examine what makes it such a rich and powerful tool.

Duane will be presenting: Xamarin Forms: Writing one app to rule all your platforms at 4:45

Are you seeking the Holy Grail of Write Once Run Anywhere app development? Then Xamarin Forms might be what you are looking for. This session will give you the information you need to understand Xamarin Forms and how it can be used to lower the friction of cross platform mobile development. You will see how easy it is to simultaneously create your app for iOS, Android, and Windows Phone.

St Louis Days of Dot Net 2014

Last week we attended the St Louis Days of Dot Net conference in the greater St. Louis, MO area. It was a great opportunity to network with other developers in the area and promote Alien Arc. They put on a great conference and we had a good time at the attendee parties/mixers.

OS7A6328But we were not just there as attendees this year. Co-Founder Duane Newman presented a talk on doing Cross-Platform Mobile Development using Xamarin Forms. Since this is a new topic he was asked to present it twice. He outlined the mobile market and the importance of distributing to all three major platforms to maximize your target audience and increase your potential ROI. He followed this up with an explanation of the Xamarin tools and how Xamarin Forms can be used to enable quick entry into the market with a cross platform solution with very high code and UI sharing between the 3 platforms.

The talk was a good experience for Duane and we received good feedback from the audience and had questions after both sessions. It was great to be able to share things we’ve learned with the community and hope to do it again soon.