Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Universal Windows Platform the replacement of WinRT of Windows 8 and Windows Phone apps?

Is Universal Windows Platform the replacement of WinRT of Windows 8 and Windows Phone apps? I mean, there was a WinRT platform to develop metro apps exclusively for Windows 8. Now, that is replaced by UWP, isn't it?

like image 254
HappyFace Avatar asked Aug 13 '15 06:08

HappyFace


People also ask

What is universal Windows platform used for?

Universal Windows Platform (UWP) is a computing platform created by Microsoft and first introduced in Windows 10. The purpose of this platform is to help develop universal apps that run on Windows 10, Windows 10 Mobile, Windows 11, Xbox One, Xbox Series X/S and HoloLens without the need to be rewritten for each.

Which of the following is an example of a universal Windows platform app?

UWP apps in Windows 10 can open in multiple windows. Microsoft Edge, Calculator, and Photos are examples of apps that allow this. Windows 10 v1803 (released in May 2018) added true multi-instancing capabilities, so that multiple independent copies of a UWP app can run.

What replaces UWP?

As you already know, WinUI is Microsoft's follow-up to UWP. As the successor to the UWP platform, Microsoft has invested heavily in the WinUI platform.

Why are Windows Mobile app known as Universal app?

Universal apps are so called because they run on more than one kind of Windows device, including phones, tablets, desktop PCs, Xbox One console and even embedded devices, such as Raspberry Pi 2. A unified Windows Store means that developers can sell an app once, with users able to install it on phones, tablets and PCs.


2 Answers

That is correct, UWP is the new platform for ALL Windows devices going forward (Win 10+). However WinRT is not replaced by UWP but is instead an extension on top of it, making UWP a much broader set of APIs that can be used across even more devices. As Microsoft themselves state:

With this evolution, apps that target the UWP can call not only the WinRT APIs that are common to all devices, but also APIs (including Win32 and .NET APIs) that are specific to the device family the app is running on.

The UWP platform supports the "Universal Device Family" class of APIs which is then supported on ALL windows platforms (Xbox, Phone, Desktop etc). There are some extension families that you can use that will limit the apps reach, such as a "Mobile Device Family".

These specific device family APIs can however be checked for and used at runtime gracefully. For example you could show your own position using GPS on a phone, but not enable that functionality on a Xbox.

I hope this answer helps you, if you have any more questions about this I recommend reading this article about the UWP platform:

Source: https://msdn.microsoft.com/library/windows/apps/dn894631.aspx

Have a wonderful day!

like image 139
ILOABN Avatar answered Oct 04 '22 23:10

ILOABN


This is a bit confusing because in Windows 8.x, "Windows Runtime" was actually used to refer to a few different things:

  1. A new pattern (and supporting code/OS components) for defining and consuming Windows APIs, meant to largely supersede "Win32" (i.e., flat C-style) and classic COM for new APIs in most scenarios. This was/is really about language interop: allowing the Windows team (and potentially others) to create components in C++ that expose APIs that don't depend on GC or a runtime like the CLR, but still feel relatively natural to use from C# or JavaScript without needing manually written wrappers.

  2. The set of Windows APIs that follow the above pattern.

  3. A new platform/environment for building and running a new type of Windows app, which are meant to have some of the characteristics of mobile and web apps in terms of causing fewer potential problems with system security, reliability, performance, battery life, etc. This is what evolved into UWP with Windows 10.

In the Windows 8 days, these apps were called "Metro style apps" during most of 8.0's public preview period, and officially dubbed "Windows Store apps" just before RTM. The platform/environment for these apps ... officially didn't really have a name (other than "platform for Metro style apps"). Unofficially, people (including at Microsoft) sometimes referred to it as "Metro" (a whole can of worms in itself) or ... "WinRT".

So what's the relationship between WinRT "proper" (definitions 1 and 2), and unofficial WinRT definition (3) aka UWP aka the formerly-nameless "platform for Metro style apps"? Well, since WinRT and the new app platform were both introduced in Windows 8, most of the WinRT APIs at that time were specific to the new platform. The app platform (and Store policy) at the time was also much more restrictive about which legacy Win32 APIs were allowed for use in apps - for the most part this was less about any technical limitation and more about the team hoping to use the new apps as an excuse to clean up the bloated Win32 API surface. But technically, WinRT is meant to be the common pattern for new Windows APIs in general, whether used in UWAs or not, and "UWA vs. classic app" and "WinRT vs. Win32" are mostly independent; over time, they've gradually enabled more WinRT APIs for use outside UWAs and also relaxed their policies on using a lot of legacy Win32 APIs in apps (and also continued to introduce new flat C-style APIs for certain use cases).

So to summarize, it's not technically accurate to say that "UWP replaced WinRT", though understandable since this stuff is pretty confusing. UWP replaced the nameless app platform (3); essentially it's just an updated version that's been ported to other device types and integrated with the classic desktop UI. WinRT, in its proper definition (1), continues to be the basis for new Windows APIs for use in UWAs and even outside them.

like image 10
Max Strini Avatar answered Oct 04 '22 21:10

Max Strini