Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the Open Source alternatives to WPF/XAML? [closed]

If we've learned anything from HTML/CSS it's that, declarative languages (like XML) do a good job of describing User Interfaces because:

  1. It's easy to build code preprocessors that can template the code effectively.
  2. The code is in a well defined well structured (ideally) format so it's easy to parse.
  3. The technology to effectively parse or crawl an XML based source file already exists.
  4. The UIs scripted code becomes much simpler and easier to understand.
  5. It simple enough that designers are able to design the interface themselves.
  6. Programmers suck at creating UIs so it should be made easy enough for designers.

I recently took a look at the meat of a WPF application (ie. the XAML) and it looks surprisingly familiar to the declarative language style used in HTML.

The current state of desktop UI development is largely fractionalized, otherwise there wouldn't be so much duplicated effort in the domain of graphical user interface design (IE. GTK, XUL, Qt, Winforms, WPF, etc).

There are 45 GUI platforms for Python alone

What are some Open Source GUI's that represent these characteristics:

  • standardized
  • platform independent
  • declarative markup language
  • language agnostic

WPF, or more specifically XAML seems like a pretty likely step in the right direction.

Update:

Thanks a lot for the info, keep it comin'. Here's are the options I've gathered from the comments and answers.

GladeXML

  • Editor: Glade Interface Designer
  • OS Platforms: All
  • GUI Platform: GTK+
  • Languages: C (libglade), C++, C# (Glade#), Python, Ada, Pike, Perl, PHP, Eiffel, Ruby

XRC (XML Resource)

  • Editors: wxGlade, XRCed, wxDesigner, DialogBlocks (non-free)
  • OS Platforms: All
  • GUI Platform: wxWidgets
  • Languages: C++, Python (wxPython), Perl (wxPerl), .NET (wx.NET)

XML based formats that are either not free, not cross-platform, or language specific

XUL

  • Editor: Any basic text editor
  • OS Platforms: Any OS running a browser that supports XUL
  • GUI Platform: Gecko Engine?
  • Languages: C++, Python, Ruby as plugin languages not base languages

Note: I'm not sure if XUL deserves mentioning in this list because it's less of a desktop GUI language and more of a make-webapps-run-on-the-desktop language. Plus, it requires a browser to run. IE, it's 'DHTML for the desktop.'

CookSwing

  • Editor: Eclipse via WindowBuilder, NetBeans 5.0 (non-free) via Swing GUI Builder aka Matisse
  • OS Platforms: All
  • GUI Platform: Java
  • Languages: Java only

XAML (Moonlight)

  • Editor: MonoDevelop
  • OS Platforms: Linux and other Unix/X11 based OSes only
  • GUI Platforms: GTK+
  • Languages: .NET

Note: XAML is not a pure Open Source format because Microsoft controls its terms of use including the right to change the terms at any time. Moonlight can not legally be made to run on Windows or Mac. In addition, the only platform that is exempt from legal action is Novell. See this for a full description of what I mean. XAML is also not an ECMA standard like C#, Managed C++, and the CLR.

Update: The question has been changed from "Is there an Open source alternative to WPF? because the original question was wrong, and it sucked. The direction of this question has changed direction to match up to align with the new input. My apologies to the people who responded before it changed.

like image 857
Evan Plaice Avatar asked Jun 03 '10 01:06

Evan Plaice


People also ask

What is replacing WPF?

Universal Windows Platform. Both Windows Forms and WPF are old, and Microsoft is pointing developers towards its Universal Windows Platform (UWP) instead. UWP is an evolution of the new application platform introduced in Windows 8 in 2012.

Is WPF still relevant 2022?

“WPF would be dead in 2022 because Microsoft doesn't need to be promoting non-mobile and non-cloud technology. But WPF might be alive in that sense if it's the best solution for fulfilling specific customer needs today. Therefore, having a hefty desktop application needs to run on Windows 7 PCs with IE 8.

What replaced XAML?

NET MAUI Alternatives. As Xamarin. Forms morphs into the new .

Can WPF applications be built without XAML?

But WPF without XAML is possible. You don't even need Visual Studio installed for this, just the . NET CLI and the Developer Command Prompt. Drop these two files in a folder and run msbuild and then you can run the file in the Bin directory.


2 Answers

Qt is developing QML, which looks a lot like XAML except in JSON. It's available as a preview built against the current version, and is available in snapshots of the next version.

Here's a little snippet from http://doc.qt.nokia.com/4.7-snapshot/declarative-ui-components-progressbar.html

import Qt 4.7 import "content"  Rectangle {    id: main      width: 600; height: 405     color: "#edecec"      Flickable {        anchors.fill: parent        contentHeight: column.height + 20         Column {            id: column            x: 10; y: 10            spacing: 10             Repeater {                model: 25                 ProgressBar {                  property int r: Math.floor(Math.random() * 5000 + 1000)                  width: main.width - 20                   NumberAnimation on value { duration: r; from: 0; to: 100; loops: Animation.Infinite }                  ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Animation.Infinite }                  ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Animation.Infinite }                }            }        }    } } 
like image 162
Thomas Avatar answered Oct 02 '22 17:10

Thomas


  • The Web is taking most of the steam away from desktop apps as it is.

    I think that the big reason is that everyone's so focused on the web right now. HTML5 is going to be a quantum leap forward in what the web can do. With fast JavaScript interpreters and capable browsers, the need for a desktop programs will begin to wane over time. That's the horse that Google is betting on, and to a much lesser extent, Apple as well.

  • Creating something good would have radically different implementations for each OS, so the base toolkit itself wouldn't be very portable.

    If you think about it, the Web is the only really common substrate we have upon which to develop this sort of infrastructure in a cross-platform manner. WPF is incredibly different from an architectural perspective vs. WinForms/straight WinAPI code. Adapting something like it to each OS would take a great deal of very different plumbing for each OS if you were to have a prayer of making something that performed well. (Not that web apps are very fast, mind you, but they're getting better).

  • Look and feel is always going to be somewhat of an issue.

    Whose look and feel do you use? Do you try to adapt the UI to the OS chrome so it looks "native", or do you do something like Swing did years ago and develop apps that look distinctively different from everything out there? (Ugh, that was a train wreck...) And if you choose to adapt the UI to each OS's look and feel, you may have all sorts of measurement and design issues.

like image 28
Dave Markle Avatar answered Oct 02 '22 15:10

Dave Markle