How to make a GUI in Julia?

2019-03-09 17:03发布

I'm new at programming in Julia and I need to create a GUI. I've been looking for information and I can't find anything useful. I tried to search information in the Julia official web page, but it seems to be down. I wonder if any of you guys knows where I can find information about it.

2条回答
欢心
2楼-- · 2019-03-09 17:21

There is a new package called Genie. It is a web framework comparable with Django in python. You can create web ui using Genie. Until now (Aug. 2017), the package is functional with some nice demos, the documentation is not quite complete though.

查看更多
虎瘦雄心在
3楼-- · 2019-03-09 17:31

This is quite a generic question, but I'll try and lay out the environment so that you can make an informed decision based on your needs.

  • If you are developing you code within an [Jupyter/IJulia] notebook, and need very simple interaction, such as slider to change some input values, the Interact package is the easiest thing to get started with.
  • To develop full fledged web UIs, take a look at Escher. Inspired by the Elm, it provides a functional library of UI components. Interactive web UIs are created in 100% Julia. There is no differentiation in code between the client and server sides. The framework handles all of that.
  • Another web framework worth looking at is Genie, which based on the traditional MVC design pattern. It also includes an ORM. An example of an application written in Genie is this listing of Julia packages: http://genieframework.com/packages
  • If you want to create cross platform desktop apps, but want to work with web technologies (i.e. HTML/CSS/Javascript), use Blink. This is a Julia wrapper around the Electron. You could potentially write an Escher application, and wrap in in Blink.jl to create a desktop app.
  • To create desktop UI applications using the Gtk library, use the Gtk.jl package in Julia. If you are familiar with the Gtk API, it is easy to get started. Note that sometimes it can get complicated to install all the Cairo related dependencies, so be prepared to troubleshoot this.
  • And last, but not the least, the venerable Tk framework has a wrapper in Julia. The UI's created using TK are sometimes considered ugly compared with modern aesthetics, but sometimes this is the quickest way to get a window up.
查看更多
登录 后发表回答