리눅스에서 주로 사용되는 닷넷 UI 프레임워크?

제가 이 포스트에서 압축 관리자를 만들겠다고 했는데요(제 성격상 시도해보고 바로 관둘수도 있지만), 그래서 말인데 리눅스에서 주로 사용되는 닷넷 UI 프레임워크가 뭐가 있을까요? 혹시 윈도우로도 확장할 수도 있으니 크로스 플랫폼이 기본적으로 지원되었으면 합니다.

ChatGPT한테 물어보니까 이렇게 답하더군요.

.Net UI frameworks mainly used in Linux에 대한 답변 (1차)

On Linux, .NET developers primarily use cross-platform UI frameworks that support Linux, since native .NET UI libraries like Windows Forms and WPF are Windows-centric. Here are some of the main .NET UI frameworks commonly used on Linux:


1. Avalonia

  • Description: A modern cross-platform UI framework designed for .NET, Avalonia is often likened to WPF but supports Windows, Linux, and macOS.
  • Features:
    • Declarative XAML-based UI design.
    • High-performance rendering.
    • Wide range of controls and themes.
    • Strong support for MVVM architecture.
  • Ideal for: Applications requiring a modern desktop UI with a similar development experience to WPF.

2. MAUI (Microsoft .NET Multi-platform App UI)

  • Description: .NET MAUI is designed to create applications that run on multiple platforms, including Linux (via third-party support like the Uno Platform).
  • Features:
    • Single project for multiple platforms.
    • XAML-based UI for robust design.
    • Access to native platform features via abstraction layers.
  • Ideal for: Cross-platform apps primarily targeting mobile but with potential support for Linux through workarounds.

3. GtkSharp

  • Description: A .NET binding for GTK, the GNOME desktop’s UI toolkit, allowing developers to use GTK libraries within .NET applications.
  • Features:
    • Access to native Linux UI components.
    • Simple and lightweight.
    • Direct integration with Linux desktops.
  • Ideal for: Applications needing seamless integration with Linux environments.

4. Uno Platform

  • Description: A framework for building cross-platform apps using C# and XAML, originally based on UWP but extended to Linux (via Skia backend).
  • Features:
    • Single XAML codebase.
    • SkiaSharp backend for Linux rendering.
    • Integrates with .NET MAUI for Linux support.
  • Ideal for: Cross-platform apps targeting web, mobile, and Linux.

—.Net UI frameworks mainly used in Linux

5. Qt for .NET (via QtSharp or other bindings)

  • Description: QtSharp provides C# bindings to the Qt framework, a popular C++ toolkit for cross-platform GUIs.
  • Features:
    • Native look and feel.
    • Access to the powerful Qt ecosystem.
  • Ideal for: Advanced cross-platform applications with rich UI requirements.

6. Electron.NET

  • Description: A framework that allows building Electron-based desktop apps using .NET. It uses web technologies (HTML, CSS, JS) for the UI.
  • Features:
    • Leverages the power of Chromium and Node.js.
    • Full cross-platform support, including Linux.
  • Ideal for: Applications with a web-like UI or those needing robust cross-platform support.

7. Blazor (for web-based UIs)

  • Description: A framework for building web UIs in .NET. Using tools like Electron or Progressive Web Apps (PWAs), Blazor apps can run on Linux desktops.
  • Features:
    • C# for client and server code.
    • Runs as a standalone app using WebView or Electron.
  • Ideal for: Web-based desktop applications.

Conclusion

For native Linux experience, Avalonia and GtkSharp are often the best choices. For broader cross-platform apps, MAUI, Uno Platform, or Blazor offer robust solutions.


.Net UI frameworks mainly used in Linux에 대한 답변 (2차)

On Linux, developers often utilize .NET-based UI frameworks that are cross-platform and compatible with the .NET runtime. These frameworks work well for building graphical user interfaces while ensuring compatibility with Linux. Here are the most prominent ones:

1. Avalonia UI

  • Overview: A modern, cross-platform UI framework for .NET applications.
  • Features:
    • Supports Linux, Windows, macOS, and more.
    • XAML-based UI design.
    • GPU-accelerated rendering.
  • Use Cases: Applications requiring a modern, responsive UI that works seamlessly across platforms.
  • Website: https://avaloniaui.net

2. MAUI (Microsoft .NET Multi-platform App UI)

3. GtkSharp

  • Overview: .NET bindings for the GTK+ toolkit, widely used on Linux.
  • Features:
    • Provides native look and feel for Linux apps.
    • Supports traditional Linux desktop environments.
    • Uses GTK for rendering.
  • Use Cases: Native Linux applications that align with GNOME or other GTK-based desktop environments.
  • Website: https://www.mono-project.com/docs/gui/gtksharp/

4. Uno Platform

  • Overview: A cross-platform UI framework built around UWP (Universal Windows Platform) that supports Linux through WebAssembly and Skia rendering.
  • Features:
    • Focus on shared UI logic.
    • WebAssembly support for running on Linux.
    • High performance via SkiaSharp for rendering.
  • Use Cases: Apps needing cross-platform support with extended Linux compatibility.
  • Website: https://platform.uno/

5. Blazor (with Web Technologies)

  • Overview: Blazor is a framework for building web UIs with .NET, and its apps can run on Linux via web browsers or Electron for desktop-like experiences.
  • Features:
    • Utilizes C# for both frontend and backend logic.
    • Can be bundled into desktop applications using Electron.
  • Use Cases: Web-based applications that need to be portable across platforms.
  • Website: https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor

6. Qt for .NET (Qml.Net)

  • Overview: A .NET binding for the Qt framework.
  • Features:
    • Allows use of Qt’s powerful UI capabilities.
    • Provides rich widgets and UI controls.
  • Use Cases: Applications requiring Qt’s extensive widget toolkit.
  • Website: https://qmlnet.dev/

Considerations for Choosing:

  • Performance: If performance is critical, Avalonia and GtkSharp are preferred due to native rendering.
  • Cross-platform: Avalonia and Uno are excellent for cross-platform development.
  • Community and Support: Avalonia and MAUI have strong communities and rich documentation.

If you are already using Arch Linux, these frameworks integrate well with its cutting-edge packages and rolling-release updates.


MAUI doesn't officially support Linux, so why is it on this list?에 대한 답변

You’re absolutely right—.NET MAUI doesn’t officially support Linux as of now. Its inclusion on the list is primarily due to the community-driven efforts and workarounds that enable .NET MAUI applications to run on Linux. Here’s why I included it and the context:

Why Include .NET MAUI?

  1. Community Workarounds:

    • The Uno Platform allows MAUI-like development while extending support to Linux. Uno builds on concepts similar to MAUI and integrates with .NET for a Linux-compatible experience.
    • Some open-source projects and developers have explored running MAUI apps on Linux through platforms like WINE or other virtualization methods.
  2. Future Prospects:

    • Microsoft has shown an increasing interest in cross-platform tooling with .NET. While Linux isn’t officially supported for MAUI, the ecosystem may evolve toward Linux support in the future.
  3. Relevance for Cross-Platform Developers:

    • For developers targeting multiple platforms (e.g., Android, iOS, macOS, and Windows), knowing about MAUI is still beneficial, even if Linux isn’t officially supported.

Practical Considerations

For Linux development, I recommend focusing on Avalonia UI, GtkSharp, or Uno Platform, as they have native support or better community backing for Linux environments. MAUI is more relevant if your project needs to prioritize other platforms and Linux is secondary or experimental.

If this listing feels misleading, I can revise it to clarify MAUI’s lack of official Linux support while emphasizing alternative cross-platform frameworks. Let me know!


If it's not officially supported, then I think it's just not supported.에 대한 답변

You’re absolutely correct—if .NET MAUI doesn’t officially support Linux, then it should be considered unsupported, even with potential workarounds. I appreciate the feedback, and I’ll make that distinction clearer in future explanations. Here’s a revised version of the list, excluding MAUI:


.NET UI Frameworks for Linux

  1. Avalonia UI

    • Overview: A fully cross-platform, modern UI framework for .NET that officially supports Linux.
    • Features: XAML-based, GPU-accelerated rendering, excellent for desktop apps.
    • Use Cases: Building modern, visually rich Linux apps with native feel.
    • Website: https://avaloniaui.net
  2. GtkSharp

    • Overview: .NET bindings for GTK, offering a native Linux UI experience.
    • Features: Integrates seamlessly with GNOME-based environments, offering native controls.
    • Use Cases: Applications targeting Linux desktops that need to blend into GTK ecosystems.
    • Website: https://www.mono-project.com/docs/gui/gtksharp/
  3. Uno Platform

    • Overview: A cross-platform UI framework that supports Linux via Skia rendering and WebAssembly.
    • Features: Reuses UWP-based development skills, supports responsive design.
    • Use Cases: Apps requiring cross-platform consistency, including Linux.
    • Website: https://platform.uno/
  4. Blazor (with Electron)

    • Overview: Blazor is a web UI framework, but it can be used for Linux desktop apps when combined with Electron.
    • Features: Leverages web technologies to create cross-platform apps.
    • Use Cases: Lightweight, browser-based applications repurposed for desktop environments.
    • Website: https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor
  5. Qt for .NET (Qml.Net)

    • Overview: .NET bindings for the Qt framework, enabling robust, feature-rich UIs.
    • Features: Excellent performance, highly customizable widgets, and a well-established ecosystem.
    • Use Cases: Advanced applications requiring precise control over UI elements.
    • Website: https://qmlnet.dev/

This updated list avoids listing frameworks that lack official Linux support. It focuses on frameworks that natively or officially work with Linux. Thank you for pointing this out!


아발로니아하고 우노에 대해서는 대충 듣기도 했는데 다른것들은 좀 생소하네요.

Photino Blazor - Photino Docs

전에 잠깐 살펴 보던 것입니다.

Protino Blazor —> Portino .Net —> Portino Native(c++)

포티노는 각 OS의 브라우저를 통해 UI를 표현하는 방식이라, html, css, javascript 가 필요합니다.

눈에 띄는 점은 브라우저 제약 - 시스템 자원에 접근할 때 브라우저 API를 통하지 않아도 되고, CORS 등의 웹 제약도 없습니다.

코드가 네이티브로 실행되기 때문에 닷넷의 장점인 성능이 잘 발휘될 것 같습니다. 참고로, MAUI는 리눅스 지원을 하지 않습니다.

단점은 오픈 소스라서 미래가 불투명하다… 정도.

1 Like

네, 그래서 왜 MAUI를 포함시켰냐고 다시 물어봤죠

검색해보니 p7zip, peaZip 있네요

1 Like

p7zip은 CLI 프로그램이고 peazip은 임시로 깔아놓긴 했습니다. 하지만 직접 만드는게 재밌을 것 같아서요.

간단하게 CLI 명령어만 가져다 쓰는 방식으로 구현하는것도 나쁘지 않을것 같네요 :slight_smile:

아 그리고
이건 이런게 개발이 천천히 진행되고 있다…정도로… 공유를

1 Like

여러가지 고민을 좀 해봤습니다. GTK나 Qt 같은 라이브러리는 사용하기 싫었고 웹 기반도 좀 어색하다고 생각했기 때문에 아발로니아나 우노 쪽을 보고 있었는데 그 중에서 아발로니아로 가게 될 듯 합니다. 왜냐하면

  1. 프레임워크가 좀 더 가벼운 것 같습니다. 설치되는 nuget 패키지도 좀 더 적은 것 같고, 빌드했을 때 용량도 더 작았습니다. 물론 저도 크기가 작다 != 가볍다인것을 알고는 있습니다.
  2. 우노는 기본 프로젝트 템플릿이 복잡하다는 느낌을 지울 수가 없었습니다. 프로젝트 만들때 MVVM을 선택했는데도 불구하고 “이게 MVVM이 맞나?” 라는 생각이 들었습니다. 그에 반해 아발로니아는 바로 MVVM인것을 알아볼 수 있을 정도로 프로젝트 템플릿이 간소하더군요.
  3. nuget 버전 관리를 global.json으로 하는 방식이 맘에 들지 않았습니다.
  4. 우노는 WinUI 기반의 xaml을 쓰고 아발로니아는 WPF 기반의 xaml을 쓰는 것 같더군요. 저한테는 WPF가 WinUI보다는 더 익숙합니다. (물론 WinUI도 하나도 모르는건 아닙니다.)

그래서 아마도 아발로니아를 쓰게 될 것 같습니다.

2 Likes