Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XAML vs WPF vs Store App vs Phone App vs UWA

Tags:

I know that XAML is used for designing UI in combination with Blend. I am confused with so many terms, like, how XAML comes into play for WPF, Store App, Phone App or UWA. Morever, what is the difference between WPF, Store App, Phone App and UWA. Does all that means that old Desktop Project will no longer be used and replace by either WPF or Store App or UWA?

like image 428
Yeasin Abedin Avatar asked Feb 25 '16 19:02

Yeasin Abedin


People also ask

What is the difference between WPF and XAML?

In 2006, WPF was released which is an alternative to WinForms. WPF uses XAML, which is a language based on XML, to declare the user interface elements. In a simple WPF app, the . xaml file describes the GUI and the code-behind file describes the logic.

Is XAML still supported?

XAML is dead. No wait - Long live XAML. XAML (Extensible Application Markup Language) started life as a simple thin UI markup layer, but has had a surprisingly eventful history. Developers on Microsoft's technology stack have been witnesses to XAML's phenomenal rise as well as its teetering on the edge of life support.

What's the difference between writing a UWP app and writing a WPF app?

WPF is another UI framework, and UWP uses many concepts that you find in WPF, like XAML, data binding, styles etc. That means that a WPF developer gets up to speed with UWP quite fast, and vice versa. But WPF is not a UI framework that C++ developers can use, for WPF you have to develop with .

What is XAML similar to?

Similar to ASP.NET, XAML provides user interfaces and C# (or VB.NET) is used as code-behind language.


2 Answers

When .NET was released in ~2000, you could use WinForms to make desktop applications for Windows. It provides access to 'native' controls (i.e. A Button made in WinForms actually is a Windows Button control from user32.dll) by wrapping the Windows API in managed code. These can run in any version of Windows which has the appropriate .NET framework version installed, including upto Windows 10.

In 2006, WPF was released which is an alternative to WinForms. WPF uses XAML, which is a language based on XML, to declare the user interface elements. In a simple WPF app, the .xaml file describes the GUI and the code-behind file describes the logic. DirectX is used to draw whatever is described in the .xaml into the window.

Like Winforms, programs made using WPF can run in any version of Windows which has the appropriate .NET framework version installed, including upto Windows 10. Note that using XAML is completely optional. Whatever user interface elements you describe using XAML can also be made using your .NET language C# or VisualBasic.NET. But using XAML is usually simpler. See To XAML or not to XAML (MSDN Blogs).

From XAML (Wikipedia) :

As XAML is simply based on XML, developers and designers are able to share and edit content freely amongst themselves without requiring compilation.

From ~2012 along with Windows 8, a new kind of app called metro/modern/windows-8/windows-store-apps can be made. These apps are similar to WPF in that they use XAML for describing the GUI. These apps can run only in Windows 8, 8.1 and Windows 10. Windows 8.1 added some improvements and features but remained mostly the same. The same technology was used to make apps for Windows Phone.

With the release of Windows 10, Microsoft made UWP (Universal Windows Platform) through which you can use the same code base to target differnt kinds of devices (desktop/mobile/xbox/IoT/holographic). These apps made for the UWP are similar to the earlier Windows 8/8.1 apps. Like before, XAML is used to describe the GUI.

Only for the Windows Store apps, there is no backward compatibility. The timeline goes Windows 8 -> Windows 8.1 -> Windows 10/UWP. An app made in UWP can only run in Windows 10 and an app made in Windows 8.1 can not run in Windows 8.

like image 142
Aniruddha Varma Avatar answered Oct 05 '22 18:10

Aniruddha Varma


I would highly recommend referring to this discussion thread in stopbyte, it has far more details and explanation of the concepts behind WPF, UWP And WinRT.

As for WinForms, from my experience it's history now. Have been almost replaced by WPF (though it still has mainstream support as mention by @Jazimov). I'v noticed that Microsoft has stopped improving Windows Forms and probably has stopped maintaining it as well.

like image 30
Yassine Yousfi Avatar answered Oct 05 '22 18:10

Yassine Yousfi