Windows 上的 Perl GUI 编程 [英] Perl GUI programming on Windows

查看:65
本文介绍了Windows 上的 Perl GUI 编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找用于在 Windows 上进行 Perl GUI 编程的工具,用于教育/内部开发,主要与科学相关.

I'm looking for tools for Perl GUI programming on Windows for educational/in-house development, mostly science related.

我的第一选择是 PerlQt.我的一个朋友正在使用 Qt 和 C++ 进行开发,所以我希望能从他那里得到一些帮助.此外,Qt 有一个 GUI 创建者,Linux 与 Perl 有很好的集成.不幸的是,我未能使其在 Windows 上运行.我搜索了其他选项,但搜索后仍然不清楚.这是我到目前为止所得到的.

My first choice was PerlQt. A friend of mine was developing with Qt and C++ so I expected getting some help from him. Also Qt has a GUI creator and Linux has nice integration with Perl. Unfortunately, I failed to make it work on Windows. I searched for other options and am still not clear after search. This is what I've got so far.

  • Perl/Tk:广泛的用户群,良好的文档,相对较低的学习曲线.不过老样子又可能不活跃.但有些文章说它现在重新启动并具有原生外观.
  • wxPerl:原生外观.但学习曲线陡峭.并非所有 wx 库都移植到 Perl.有人喜欢,有人讨厌.
  • Win32:GUI:原生外观,可以使用所有 Windows API.需要强制安装,因为其中一项测试失败.仍然有效,但不确定是否正确安装.
  • XUL::GUI:使用 FireFox 引擎,CSS 类型.

我可以设法安装它们并成功显示Hello, world".然而,我无法决定去哪一个,而且网上的信息有时看起来相互矛盾.

I could managed to install them and succeeded to show "Hello, world". Yet, I can't decide which one to go and the online information sometimes looks contradict each other.

您是否会在人工效率(易于阅读和编写代码)、计算效率和 GUI 构建器的可用性方面比较这些工具?

Would you compare the tools in terms of human efficiency (easy to read and write codes), computational efficiency and the availability of GUI builder?

推荐答案

对于真正的跨平台 GUI 编程,我建议 PrimaTk.两者都看起来不错,但它们有效.

For real cross platform GUI programming I would suggest Prima or Tk. Neither look great, but they work.

不过,我认为现在使用 Web 前端可能比使用真正的 GUI 更好(嘿嘿);这很容易使用网络框架.我会建议 Mojolicious 尽管其他人确实喜欢 舞者.我推荐 Mojo 而不是 Dancer 的主要原因是 Mojo 在一个小包中提供了许多功能.话又说回来,这也是其他人会推荐Dancer的原因,所以这是一个折腾.

Still, I think you might be better served (hehe) by using a web front-end than a true GUI these days; this is easy using a web-framework. I would suggest Mojolicious though other people do like Dancer. My primary reason for suggesting Mojo over Dancer is that Mojo comes with lots of functionality in one tiny package. Then again, this is the reason that others would recommend Dancer, so that's a toss.

最后一个考虑是 Mojo 带有开箱即用的 WebSockets.这让您的 web 应用程序更容易感觉更像是一个真正的应用程序,与服务器对话并在不重新加载的情况下获得响应.

A final consideration is that Mojo comes with WebSockets out of the box. This makes it rather easy for your webapp to feel more like a true application, talking back to the server and getting responses without reloading.

我现在有一个用 Perl/Mojo 后端和 Web 前端编写的桌面应用程序的好例子:Azawawi 的 法拉比.它是一个文本编辑器,面向编写 Perl.它的 GUI 是浏览器,使其成为一个简单的跨平台编辑器.我推荐它作为类似任务的起点.

I now have a good example of a desktop application written with a Perl/Mojo backend and a web-frontent: Azawawi's Farabi. It is a text-editor, geared towards writing Perl. It's GUI is the browser, making it a simple cross-platform editor. I recommend it as a starting point for similar tasks.

这篇关于Windows 上的 Perl GUI 编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆