Universal Windows Platform (UWP) is an evolution of the Windows Runtime model that grew out of Universal Windows 8 apps into a broader multi-device strategy for Windows 10. However, for many developers, the specifics remain unclear. In today's Slack chat, members of Progress's Developer Relations team and special guest, Carey Payette, of Falafel Software discuss what UWP is, what it means to developers today and where it is likely heading in the near future.
TJ VanToll: As an employee of a company with a strong history in the Microsoft world, I’m ashamed of how naive I am about common Windows technologies and terms.
One of those technologies is UWP, or Universal Windows Platform, which I personally know very little about. To fix that we’ve invited in a few of our experts in the space to help explain the basics. Can we start with having someone give us a super simple definition of what UWP is?
Sam Basu: We can talk about UWP .. but I can set some quick context as to how we got here. 2 min history lesson here kids.
TJ VanToll: 🍿
Kids: But Mr. Basu, history is boring
Sam Basu: So, before smartphones were a thing ..
Carey Payette: And dinosaurs roamed the earth
Sam Basu: Between 1996-2008, MSFT had a thing called Windows Mobile.
It was aimed at enterprise users and ran Windows CE (Embedded).
TJ VanToll: Wait, 1996?
Sam Basu: Yep
Ed Charbeneau: 1996 B.I. (Before Internet)
Carey Payette: Pretty sure I was writing CGI scripts prior to '96 😉
TJ VanToll: I was making Geocities sites 🙂
Carey Payette: Midi background music, and a scrolling marquee required… don't forget
Sam Basu: Then, a lanky man showed off a new device in 2007 and things went south quickly. For Windows Mobile that is. The last version was WM 6.5 – the geeks still loved it.
Ed Charbeneau: I've tried to black out those days 🙂
Sam Basu: Full file system access + stylus etc.
Jen Looper: a stylus!? no!
TJ VanToll: thought this was 2 minutes, Sam. 😛
Sam Basu: So MSFT had to reboot…hang on, getting to good parts
Sam Basu: In 2010, they launched Windows Phone 7. Same Windows CE OS, but with Metro design language UX. They stumbled for a year or so. Then came Windows Phone 8.
Jen Looper: I kind of liked Metro
Sam Basu: This was breaking – with a new Windows NT kernel OS.
Sam Basu: Yeah, many like Metro – nothing wrong in the design paradigm. So folks couldn’t upgrade from WP 7/7.5 to WP 8.
Ed Charbeneau: Windows Phone is still my favorite OS. Too bad there's no apps. But is this what UWP could fix, Sam.
Carey Payette: I still carry my Nokia 1520 … luckily I have no time for apps, so it's all about the experience for me.
Sam Basu: But on the plus side, now WP shared some core OS bits with Windows – and developers could target either. Then came WP 8.1 with Cortana and a bunch of enhancements. And then another reboot – to UWP…and Windows 10.
TJ VanToll: tl;dr Microsoft had some good ideas, but none really caught on.
Carey Payette: Microsoft has been working in a direction to unify the Windows Operating system across multiple device families. Universal Windows Platform (UWP) provides a core API that allows development across them. This means, with one code base, you can target Desktop Computers, Phones, Xbox, HoloLens and IoT devices. Using languages and a declarative UI (XAML) that Windows Developers are already familiar with.
Sam Basu: Yep. WP, Tablets & Desktop now share much of the core.
Ed Charbeneau: HoloLens!
TJ VanToll: So to go back to our timeline when did UWP become a thing?
Sam Basu: 2015
Jen Looper: …and what is it exactly?
TJ VanToll: A strategy, or software?
Sam Basu: A platform of APIs. Instead of individual form factors, now you have device families. One could target the lowest common denominator, in which case your app runs everywhere.
Carey Payette: Yep, I run Windows IoT Core on the Raspberry Pi.
Sam Basu: Or pick a device family with specific APIs. Check this: https://msdn.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide
Carey Payette: To develop for the Pi, you create a UWP project, add the IoT extensions, and you have full GPIO access
TJ VanToll: So paint a picture for me. I want to develop the next great app and I want it to run on all the devices. What’s my first step?
Sam Basu: There are some APIs that all UWP apps can use freely, and some conditional based on device families
TJ VanToll: Visual Studio?
Sam Basu: For now, yes,
Carey Payette: You can even do it free, TJ … Visual Studio Community 🙂
Sam Basu: Pick UWP templates & choose your device family
Jen Looper: Can I use it on my Mac? with VS Code?
Carey Payette: awwwww 😉
Sam Basu: So nope, you can’t build UWP apps on a Mac yet
Sam Basu: Although there were rumors of something being in the works. There are ways to build UWP apps – like through an Electron shell, but it is tricky.
TJ VanToll: So let’s chat about UWP is well suited for.
Ed Charbeneau: What are some killer UWP apps that have been created since its introduction in 2015? It's 2017 now.
Sam Basu: Most Windows Store apps are UWP apps now. And yes, attracting developer mindset has been a challenge – chicken vs egg problem. UWP shines in a few places – like ink apps and apps for Hololens.
Jen Looper: what is an ink app? Ah https://www.microsoft.com/en-us/store/collections/WindowsInkCollection/pc
Carey Payette: Skype is pretty popular 😉
TJ VanToll: Oh Skype is UWP?
Carey Payette: Yes
TJ VanToll: Nice!
Sam Basu: On Windows platforms
Jen Looper: THAT EXPLAINS IT! sry
Sam Basu: Lol
TJ VanToll: So on a related note, whenever I see UWP marketing it’s always along the lines of running your app in Windows and like an Xbox. It sounds cool, but does anyone actually do that?
Sam Basu: Hard sell – hardcore Windows devs bought it
Carey Payette: I run skype on my xbox too 😉
TJ VanToll: Ah true, I didn’t even think about that.
Ed Charbeneau: and on HoloLens https://developer.microsoft.com/en-us/windows/holographic/updating_your_existing_universal_app_for_hololens
Jen Looper: So what does UWP bring to the developer that wasn’t available prior? An ecosystem?
Sam Basu: A consistent API layer for all of Windows ecosystem
Ed Charbeneau: That consistency will really come in to focus when UWP is added to the .NET Standard ecosystem
Carey Payette: I think anything that can be beneficial as a Kiosk would be a good use case. For "desk" workers, you can run it on your Windows OS. For field users, you an run it on a small device. The same app can be built to target both. You can also build UI's that are adaptive, so you can share that layer as well.
Sam Basu: Yeah, to Carey's point, the UI layer is smart – same controls are responsive across various screens
Jen Looper: And what language do you use to build them?
Sam Basu: C# & .NET You cannot use straight up JS – WinJS is no longer a thing, afaik.
Ed Charbeneau: and Visual Studio
Carey Payette: (Don't forget VB.Net, and C++ as languages)
TJ VanToll: So I’m a company looking to build an app. Can we list a few criteria that would make UWP a good/bad fit? Like, good—you’re a Windows shop.
Carey Payette: Distribution/connectivity requirements
TJ VanToll: Bad—you love Macs 🙂
Sam Basu: Good – you have .NET devs. You have users using various Windows devices. UWP is good in the Windows ecosystem for those specialized apps – like Surface Hub, Hololens, IoT & XBox – lot of code sharing
TJ VanToll: Is UWP beneficial at all if you’re targeting a single platform? Like if I’m just building a desktop Windows 10 app for instance.
Sam Basu: Yeah, that’s hard though – I'm sticking to my utopia of Write once & suck, err, run everywhere. For just a desktop app, you could go with WPF. But, in future, if you want to code share & run your apps elsewhere, then pick UWP.
Carey Payette: WPF is great, and the XAML chops can be used in UWP
Sam Basu: Yeah, the nice thing about UWP is bringing over your C#/XAML chops as is
Jen Looper: So I’m sort of convinced. But for full disclosure…what is the downside of using UWP?
Sam Basu: The downside is, Universal in UWP isn’t quite universal yet, if you cannot target iOS/Android
Carey Payette: One downside is that I would say that not every feature of "regular" .NET is available in UWP.
TJ VanToll: What sort of features?
Sam Basu: Uh oh – Carey just opened a can of worms.
Carey Payette: I know when developing on the PI, I tried to get things like memory usage directly from UWP and it wasn't possible…
Sam Basu: The runtime is WinRT and powered by .NET Core – with a few bits borrowed from the full .NET. But if you’re a pro .NET guy, you may miss features.
Jen Looper: Carey, what are you building on that Pi, anyway!?
Carey Payette: I'm always messing around on the Pi…I created a fun hotwheels track for the kids using UWP. 😉 All of these projects I used UWP -> https://www.hackster.io/careypayette/projects
TJ VanToll: Carey, woah! 😮 I think you just sold me on UWP 🙂
Carey Payette: 😊 I love it!
TJ VanToll: So where is UWP going? What can we expect in the next year or so?
Sam Basu: I think the big thing could be integration of Xamarin tooling into the UWP fold – make it truly Universal.
TJ VanToll: Are there actual plans to make that happen, or is it still theoretical at this point?
Sam Basu: Rumors. The dev experience on UWP is pretty nice already, but edge cases like IoT/Hololens could get better chops. And I am on a Mac entirely – so would love UWP dev from a Mac. Anyone looking to start, should look here: https://developer.microsoft.com/en-us/windows
Oh and one more thing – traditional Windows desktop software now have a place in the Windows Store – easy to upconvert them to UWP apps.
TJ VanToll: Well thanks everyone. I understand UWP at least 50% better now 😛 Anything else you want to mention before we wrap up?
Jen Looper: Same, I have more clarity
Sam Basu: Keep in mind, as much as you hipsters love your fruit devices, Windows has a "yuge" consumer base. UWP lets developers target all those devices from a single code base.
Carey Payette: I think it's important to note that some skew of Windows OS runs on each device family…so for instance, Windows IoT core on Pi3, Pi2, Minnowboard Max and DragonBoard 410c. Core obviously has a much smaller footprint. That's why UWP has extensions to target other devices, so it's not all inclusive and bloating.
Sam Basu: The last thing I would say is this: If you are doing any greenfield dev on Windows, go UWP. MSFT is clearly headed in that direction.
Jen Looper: App dev, not so much web, right?
Sam Basu: If you want to go truly X-Plat, look into Xamarin or NativeScript. Yup, no web technologies in UWP stack as of now.
TJ VanToll: Alright thanks all! Happy UWP-ing 🙂
Jen Looper: that sounds bad lol
TJ VanToll: Let’s go with Happy Coding instead 😉
Header image courtesy of CollegeDegrees360