Redian新闻
>
请问一下,用什么语言/库/脚本作GUI比较方便?
avatar
请问一下,用什么语言/库/脚本作GUI比较方便?# Programming - 葵花宝典
b*r
1
现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
在有什么比较流行的Linux, Windows下都可以用的GUI lib?
以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
Tcl/Tk。不知道大家有什么建议?
谢谢。
avatar
R*r
2
how about Java

【在 b**********r 的大作中提到】
: 现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
: 希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
: 在有什么比较流行的Linux, Windows下都可以用的GUI lib?
: 以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
: Tcl/Tk。不知道大家有什么建议?
: 谢谢。

avatar
c*t
3
Here is an approach:
1. write computational stuff using C/C++/Fortran.
2. write GUI using Java as front end. If you use CookSwing (shameless
ad for my own free software :), or SwiXML, you can save even more
work by doing GUI layout in XML.
3. C++ and Java can communicate with each other with simple protocols like
#> change_max_iteration 500
#> dump_iteration_result
#< current_iteration 5
#< data_dump begin
...
#< data_dump end
#< err

【在 b**********r 的大作中提到】
: 现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
: 希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
: 在有什么比较流行的Linux, Windows下都可以用的GUI lib?
: 以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
: Tcl/Tk。不知道大家有什么建议?
: 谢谢。

avatar
b*r
4
多谢多谢。说得很详细。谢谢。

【在 c*****t 的大作中提到】
: Here is an approach:
: 1. write computational stuff using C/C++/Fortran.
: 2. write GUI using Java as front end. If you use CookSwing (shameless
: ad for my own free software :), or SwiXML, you can save even more
: work by doing GUI layout in XML.
: 3. C++ and Java can communicate with each other with simple protocols like
: #> change_max_iteration 500
: #> dump_iteration_result
: #< current_iteration 5
: #< data_dump begin

avatar
R*r
5
dude, you make it too complicated, he's probably having a desktop
application, and a simple JNI interface will be more than enough.

【在 c*****t 的大作中提到】
: Here is an approach:
: 1. write computational stuff using C/C++/Fortran.
: 2. write GUI using Java as front end. If you use CookSwing (shameless
: ad for my own free software :), or SwiXML, you can save even more
: work by doing GUI layout in XML.
: 3. C++ and Java can communicate with each other with simple protocols like
: #> change_max_iteration 500
: #> dump_iteration_result
: #< current_iteration 5
: #< data_dump begin

avatar
o*v
6
from a XML->GUI is exactly what i'm looking for.
my idea was, with a tool like this,
we can further define variable/dependency and
create a common frame work for all linux/unix daemon configuration.
in other words, most of /etc/* can be rewritten into formatted XML
file and provide a GUI for sys aadmin

【在 c*****t 的大作中提到】
: Here is an approach:
: 1. write computational stuff using C/C++/Fortran.
: 2. write GUI using Java as front end. If you use CookSwing (shameless
: ad for my own free software :), or SwiXML, you can save even more
: work by doing GUI layout in XML.
: 3. C++ and Java can communicate with each other with simple protocols like
: #> change_max_iteration 500
: #> dump_iteration_result
: #< current_iteration 5
: #< data_dump begin

avatar
c*t
7
The reason to use executables:
1. Different execution context. So if the executable has bugs, the Java GUI
is immune to that.
2. Communication is Java independent. People who prefer running command
line can do so.
3. GUI can be implemented independent of the executable (particularly when
communication is not involved). In fact, my supervisor sometimes ask me
to write GUI stuff first, and he just use my GUI to test his executable.

【在 R*******r 的大作中提到】
: dude, you make it too complicated, he's probably having a desktop
: application, and a simple JNI interface will be more than enough.

avatar
R*r
8
You are using a C/S structure to separate UI and business code.
With a simple JNI interface, you can get the data and display in
java too, only much faster and reliable.
I don't see why java code will be affected if the business code goes
wrong.

【在 c*****t 的大作中提到】
: The reason to use executables:
: 1. Different execution context. So if the executable has bugs, the Java GUI
: is immune to that.
: 2. Communication is Java independent. People who prefer running command
: line can do so.
: 3. GUI can be implemented independent of the executable (particularly when
: communication is not involved). In fact, my supervisor sometimes ask me
: to write GUI stuff first, and he just use my GUI to test his executable.

avatar
c*g
9
c++,那就fltk吧

【在 b**********r 的大作中提到】
: 现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
: 希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
: 在有什么比较流行的Linux, Windows下都可以用的GUI lib?
: 以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
: Tcl/Tk。不知道大家有什么建议?
: 谢谢。

avatar
c*t
10
JNI uses the same memory space as JVM, so a memory related problem can
cause JVM to crash.

【在 R*******r 的大作中提到】
: You are using a C/S structure to separate UI and business code.
: With a simple JNI interface, you can get the data and display in
: java too, only much faster and reliable.
: I don't see why java code will be affected if the business code goes
: wrong.

avatar
R*r
11
I believe the data for display will take very little space
and it's unlikely JVM will have a memory problem and crash
due to frequent update of that.
And if it dies, it dies, wouldn't your clean separate java client
die too if the data from backend server is dirty?

【在 c*****t 的大作中提到】
: JNI uses the same memory space as JVM, so a memory related problem can
: cause JVM to crash.

avatar
c*t
12
1. Scientific computing people usually do computations in large amount
of data, so most information, like data and configuration has to be
passed along as files anyways.
2. It is simpler for them to code. We have people who has a working
command line programs in C, C++, Fortran or even Java. Sometimes,
some other people request a GUI front end to an existing tool. They
just need to tell me how to run the program and give configurations
they need. They need to do zero modifi

【在 R*******r 的大作中提到】
: I believe the data for display will take very little space
: and it's unlikely JVM will have a memory problem and crash
: due to frequent update of that.
: And if it dies, it dies, wouldn't your clean separate java client
: die too if the data from backend server is dirty?

avatar
h*n
13
Your own fre software....
You mean.....?

【在 c*****t 的大作中提到】
: Here is an approach:
: 1. write computational stuff using C/C++/Fortran.
: 2. write GUI using Java as front end. If you use CookSwing (shameless
: ad for my own free software :), or SwiXML, you can save even more
: work by doing GUI layout in XML.
: 3. C++ and Java can communicate with each other with simple protocols like
: #> change_max_iteration 500
: #> dump_iteration_result
: #< current_iteration 5
: #< data_dump begin

avatar
r*q
14
只是Linux+Windows的话当然是kylix了。
只不过要用PASCAL...

【在 b**********r 的大作中提到】
: 现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
: 希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
: 在有什么比较流行的Linux, Windows下都可以用的GUI lib?
: 以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
: Tcl/Tk。不知道大家有什么建议?
: 谢谢。

avatar
v*d
15
tcl/tk

【在 b**********r 的大作中提到】
: 现在有一些工程计算软件,基本上都是用c++写的。现在要做个用户界面(GUI),
: 希望能够很方便的用在Linux和Windows下。不知道用什么东东写GUI比较好?现
: 在有什么比较流行的Linux, Windows下都可以用的GUI lib?
: 以前我学过一点OpenGL/Glut,感觉用这个做GUI还是挺麻烦的。有朋友推荐用
: Tcl/Tk。不知道大家有什么建议?
: 谢谢。

avatar
v*d
16
craps like JNI should by all means be avoided, hoho

【在 R*******r 的大作中提到】
: You are using a C/S structure to separate UI and business code.
: With a simple JNI interface, you can get the data and display in
: java too, only much faster and reliable.
: I don't see why java code will be affected if the business code goes
: wrong.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。