如何在ubuntu中创建桌面应用程序。
问题描述:
在Windows中我们可以在WPF中创建桌面应用程序但在ubuntu中如何创建桌面应用程序。
或者我们可以在ubuntu中设置wpf文件吗?
提前致谢!
快乐编码!
In windows we can create desktop application in WPF but in ubuntu how to create desktop application.
Or can we setup file of wpf in ubuntu ?
Thanks in advance!
Happy coding!
答
您可以使用 Mono 在C#中开发可在UBUNTU上运行的桌面应用程序
You can use Mono to develop in C# the desktop applications which can run on UBUNTU
Quote:
在Windows中我们可以在WPF中创建桌面应用程序
In windows we can create desktop application in WPF
实际上我们有几个选项,在Windows上。
如果你想开发一个ubuntu GUI
应用程序有 Mono
,你知道(看看这个C#on ubuntu 12.04 [ ^ ] Stack Ove rflow
问题)。
Actually we have several options, on Windows.
If you want to develop a ubuntu GUI
application there is the Mono
, you know (have a look at this "C# on ubuntu 12.04"[^] Stack Overflow
question).
虽然上面说的Carlo足以让C#开发人员在Ubuntu(或任何平台上)移植他们的应用程序,因为Mono是跨平台),但我不打算支持这种编程Ubuntu应用程序的方法。
通过安装 Ubuntu SDK [ ^ 。 SDK包含您需要的所有内容:
1.全功能IDE。
- Qt创建者用于IDE目的,带有文本 - 编辑,设计模式编辑和源代码控制功能。
2.调试器用于调试目的。
3.编译器,用于C和C ++语言。
4.使用QML进行UI编辑。 Qt程序的标记语言。
5.基于JavaScript的客户端脚本。
- 允许您使用vanilla JavaScript的知识发送数据的异步请求,填充数据和执行其他任务。
这是我建议创建Ubuntu桌面应用程序的建议。这不需要花费太多时间,因为我安装SDK只需要20分钟,开始创建应用程序只花了一个小时。 QML是一种非常简单的语言。
比较WPF和Ubuntu桌面应用程序将是这样的:
1.在WPF UI中开发使用XAML,在Ubuntu中它是QML。两者都是标记语言。您可以绑定数据,触发函数等。
2. WPF中的后端使用C#进行处理,其中Ubuntu应用程序后端使用C ++(或C)处理;从而为您提供额外的性能因素。
3.两种情况下均提供设计模式。您可以在设计编辑器中设计UI; Visual Studio可能有更多功能,但是它是Ubuntu。
4.两种情况都提供了一步编译。 WPF中的 F5 ,Ubuntu中的 CTRL + R 。
5.两个版本的源代码控制,WPF的TFS和Uzantu中的Bazaar和其他基于Git的服务。
长话短说,我不建议将Mono用于Ubuntu。始终考虑使用C ++和Ubuntu SDK。它们应该在那里使用,你可以在一两个星期内轻松地完成工作。 :-)
我也很快会在Ubuntu SDK中为Ubuntu应用程序开发写一篇文章,我希望这个答案足以满足你的需求,如果没有的话。 ..等待大枪!
Although what Carlo has said above is enough for a C# developer to port their applications in Ubuntu (or any platform since Mono is cross-platform), but I am not going to support that method of programming a Ubuntu application.
Ubuntu applications can be developed right in Ubuntu machines, like Windows, by installing Ubuntu SDK[^]. The SDK holds everything that you need:
1. A full featured IDE.
- Qt creator is provided for IDE purpose, with text-editing, design-mode editing and source control features.
2. Debugger for debugging purposes.
3. Compilers, for C and C++ languages.
4. UI editing using QML. A markup language for Qt programs.
5. JavaScript based client-scripting.
- Allows you to send async requests for data, populate data and perform other tasks all with your knowledge of vanilla JavaScript.
This is my recommendation for creating a Ubuntu desktop application. It doesn't take much time, for me installing the SDK took only 20 minutes and to get started creating an app took just an hour. QML is a very easy language.
Comparing WPF and Ubuntu Desktop Apps would be like this:
1. In WPF UI is developed using XAML, in Ubuntu it is QML. Both are markup languages. You can bind data, trigger functions etc.
2. Back-end in WPF is handled using C#, where as in Ubuntu apps back-end is handled using C++ (or C); thus giving you additional performance factor.
3. Design mode provided in both cases. You can design your UI in design editor; Visual Studio may have more features, but c'mon it is Ubuntu.
4. One-step compilation provided in both cases. F5 for WPF, CTRL + R in Ubuntu.
5. Source control on both versions, TFS for WPF and Bazaar and other Git based services in Ubuntu.
Long story short, I won't recommend using Mono for Ubuntu. Always consider using C++ and Ubuntu SDK. They are meant to be used there, you will get yourself working very easily in a matter of week or two. :-)
I am also going to write an article for Ubuntu app development in Ubuntu SDK soon, I hope this answer suffice your needs, if it doesn't... Wait for the big gun!