PDX Tech Talks Monthly #5 - PADNUG

It seems like most tech meet-up enthusiasts have a favorite group. It’s the one you go to most often. The one where they talk about the tools and techniques you use every day to get your job done. It’s your go-to group, your community. For the last several years, my go-to group has been PADNUG, the Portland Area .NET User Group.

Microsoft’s .NET programming framework is used quite a bit locally, especially in enterprise software companies. Many of those companies are on the west side of Portland’s tech scene (i.e. Beaverton & Hillsboro), so PADNUG is conveniently hosted at Intel’s Hawthorne Farms campus, mere blocks from my work. Intel kindly lends us one of their huge auditoriums, and it’s an awesome facility for speakers and large audiences. I usually attend a few times a year when I see a particularly intriguing topic. Last week I was in luck. Xamarin was in town.

PADNUG crowd at Intel's Hawethorn Farm auditorium

The Event - PADNUG (Portland Area .NET User Group)

Last week’s PADNUG topic was Xamarin, a company that helps .NET developers deploy their apps on all sorts of devices. Microsoft certainly makes it easy to write C# code in Visual Studio (the Cadillac of IDE’s) and deploy to a Windows PC or Windows Server, but what if you want to build an iPhone or Android app? Not to worry, Xamarin offers some cools tools that allow you to compile C# code so it runs on your phone as if it was written in the "indigenous language" (Objective-C for iPhones, Java for Android).

Bryan Costanich talking about code reuse

The speaker was Bryan Costanich, Xamarin’s Director of Education. Dude is also listed in IMDB and just kick-started a movie called Slumptown. He’s a great presenter who also happened to be on the Windows team back in the day, although he now slangs code on a MacBook. Bryan started off strong by demoing an app he wrote for his watch. His Agent Watch, built by the makers of Netduino, runs the .NET Micro Framework. He also wrote an Android app for his phone that communicates with his watch over Bluetooth, sending it notifications (e.g. "Destroy Mr. Bond!"). Both apps were written in C# using Xamarin’s tools. It was an intriguing proof-of-concept. See his full write-up about it here.

Hold up though, why is it cool to write in one language and deploy to a bunch of different devices? Does that just mean you’re too lazy to learn the tech stack native to each platform? Bryan did a good job of describing the benefits of code reuse, but warned against the desire to "write once, run anywhere". He mentioned that popular tools were built with that goal in mind (PhoneGap was mentioned), but it turned out users didn't always want the exact same app on every device. The major phone platforms (iPhone, Android, Windows Phone) each have their own unique design languages, user experience metaphors, and capabilities. For example Android has a native back-button that apps can use, but iPhones don’t. Xamarin's solution is to offer a custom C# library for each device that leverages that device’s unique assets and capabilities.

Here’s Xamarin's suggested architecture for using their tools to build apps:

 Xamarin's recommended architecture

Xamarin's recommended architecture

Common libraries are shared (e.g. a SQLite adapter), and then you write a custom UI for each device. It was a well-articulated vision. I think folks were interested because they are being asked to port their company’s app to all the cool new phones and tablets, and Xamarin definitely offers one solution for that challenge.

Who I Met

PADNUG is well attended by local .NET recruiters. If you need help growing your team, or if you’re a .NET dev between gigs, PADNUG is great place to network. I met Scott Patton, an energetic new recruiter at TEKSystems. I also met Ken Westin, a car enthusiast who has driven a Corvette with an experimental heads-up display (surprisingly useful at high speeds!). After the event I spent a long time chatting with Santos Cash about Internet of Things trends. Santos feels like Android is going to be a very important IoT platform, and is interested in helpful things we can do with all the personal data our devices collect.

What I Learned

Should we be trying to write all of our apps with one set of tools, in one language? Should I find a similar toolkit that allows me to write all my apps in C++? JavaScript? Well, I think there’s definitely a case to be made that folks become very proficient with one particular language and framework, and it’s understandable if they want to leverage those skills on lots of devices. Xamarin allows C# experts to write iPhone apps without having to learn Xcode and Objective-C, and it’s nice to have that option available. I've heard of architectures where separate native apps are built for the main platforms, but all use a common web service to fetch data. Xamarin offers a slightly different approach that allows code sharing at a deeper level: the apps’ native business logic.

Wrap Up

It’s good to have a go-to tech meet-up full of folks who build great software with the same language as you. It helps you to discover options and best practices for your preferred platform. Portland also has meet-ups for Java, JavaScript, Objective-C, Python, Ruby, and Node.js (am I missing any?) that I hope to visit in the next year.

Next Month

Wow, next month seems a long ways away. Why wait? It looks like the pdxdevops folks are planning to meet next Monday at Cloudability to talk about Ansible and other IT orchestration tools. Sounds interesting!