Wrapping Up Software Architect 2015

October 27, 2015

no comments

I travel to a lot of conferences, but among the ones I like the most are Software Architect and DevWeek. I’m writing this post on the flight back home from Software Architect, where I had the pleasure of delivering a workshop and three talks. If you attended the conference, thanks a lot for coming and I hope you find the materials useful; if you haven’t been to the conference, I expect to see you next year!

Haskell [slides, demos]

My first talk was an introduction to Haskell for developers with no prior experience in functional programming. For me personally, Haskell is not a mainstream programming language–unfortunately, no project I’ve been involved with would consider such a radical switch. Nonetheless, I’ve been using Haskell for a while as a scripting language–instead of the more traditional choices of Python or PERL. One of Haskell’s strengths is that it doesn’t compromise–the language was designed in academia and embodies some of the best ideas of functional design. Functions are pure by default and can’t introduce side-effects inadvertently, there are no loops or switch statements–which encourages recursion and pattern matching, and the type system is extremely strong but at the same time flexible.

quicksort :: Ord a => [a] -> [a]
quicksort [] = []
quicksort (x:xs) = (quicksort left) ++ [x] ++ (quicksort right)
                   where left = filter (<x) xs
                         right = filter (>=x) xs

I’ve introduced Haskell through a series of examples and short exercises, covering the type system, currying, functions, pattern matching, list operations, I/O, and algebraic data types. I didn’t have time to cover monads, which I think is a good thing–a 90-minute talk full to the brim with syntax isn’t the best format to discuss monads anyway. But I’m definitely considering a future talk where I’ll have the opportunity to explain monads in my own way. (In the meantime, I strongly recommend a recent talk from LeetSpeak: Dr. Frankenfunctor and the Monadster.)

Universal Windows Platform [slides]

My second talk was a bit more abstract, and covered the upcoming Universal Windows Platform (UWP). It embodies a lot of new concepts for Windows developers, starting from a unified set of APIs that work across a variety of device families: the Windows desktop, Windows 10 Mobile, Xbox One, Holo Lens, Surface Hub, IoT devices, and more. In addition to a shared core set of APIs (over 85% of the API surface), individual device families may provide additional features. Visual Studio and the platform itself also help build apps that can actually run across a variety of different form factors, and adapt to the fact that some APIs are only present on some device families.

Visual Studio 2015 editing Objective-C files in a project that compiles down to a Universal Windows App

In the second part of the talk, I discussed some of the ways to bring “outsider” apps to the Windows Store: Project Centennial, which promises to wrap traditional Win32 desktop apps in a modern UWA shell; Project Astoria, which promises a runtime subsystem for running Android apps unchanged on UWP; and Project Islandwood, which, through recompilation, promises to bring Objective-C iOS apps to the Windows platform. Only Project Islandwood is currently in public preview (open-source on GitHub!), and I was able to demonstrate a couple of simple iOS apps running (from the same codebase) on both iOS and Windows. It was pretty incredible showing people that Visual Studio can now compile Objective-C apps! (I have to admit spending a lot of time, including the night before the talk, trying to get Islandwood to work on some of the demos; it’s very far from being production-ready at this point.)

Cross-Platform C++ Apps [slides]

My third talk was probably the one that took the most effort to build; it covered building cross-platform mobile apps using C++ in Visual Studio 2015. On the mobile app development spectrum, building a cross-platform web app is probably easiest, but you often have to compromise on performance, library ecosystem, native API access, debugging and profiling tools, and a bunch of additional concerns. C++, on the other hand, is supported on all mobile development platforms–Objective-C code can call directly into C++, Java has JNI, and Windows Phone apps can use C++/CX. By introducing a shared C++ core, you can build cross-platform mobile apps with only a small portion of platform-specific UI code. And if you go the OpenGL ES route (which games often do), you don’t even need that platform-specific UI code.

In the talk I demonstrated Visual C++ 2015’s support for Android and iOS projects. Essentially, there’s a set of new project types: iOS packaging project, Android application project, Android dynamic library, iOS static library, and so on. By using these project types you can build Android apps with or without C++ code in Visual Studio, and compile iOS apps using Visual Studio and an additional Node.js-based build agent (vcremote, which you install with npm) running on your Mac.

Cross-platform application spectrum from hosted web apps to an app for each platform, with Xamarin or a shared C++ core as the best middle ground

You can follow some of my shorter musings on Twitter — @goldshtn. I also link to all my blog posts and reply to comments there.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*