开发者

Tell a web programmer how to write a very very simple GUI program [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 3 years ago.

Improve this question

I am a web developer and server systems engineer.

But now my brother asked me if I could provide a little program for a very trivial demand.

Its just a form where the user can rate for factors on a scale from 1 to 7.

Based on these 4 values a final value from 1-10 is calculated. And this is done very easily with simple formulas like:

if(a>5 || b>3) { final = 4; }
else if ...

(just some basic formulas that can be expressed using logical operators and comparisions)

I told him he could just do this in excel or google docs, or a simple .html file with embedded javascript in it.

But this is a research project with a pharma company behind, and they may be willing to pay a few bucks for a little program.

There should be the option to later extend it with a 2nd survey where the result of the 1st is taken into account as a factor.

This is a very trivial program and the logic is safe and sound, but I have never done any gui programming.

I have done a lot in java, but only command line stuff, and php.

It should run easily on every system.

So I thought about using PHP-GTK, where it looks like you can compile binary executables that need no external interpreter.

But Java should also be fine.

Any recommendation开发者_StackOverflow社区s?

I am also willing to look into other languages, it shouldn't be too hard.

So

  • What language/environment is the easiest way to do very, very simple Gui programs that run on every system?


For me, hands down the easiest is tcl/tk. It takes one line of code to create a label widget, another line of code for an entry widget. One line of code for a button. A few lines of code to do a calculation, and a few lines of code to lay the widgets out on the screen. If you want to get fancy, a few lines of code to guarantee the user only inputs digits and not some other characters.

Many people might vote this answer down because they hate tcl/tk. Don't let that sway you from at least considering it. It's a lot more mature than most people realize. And while the syntax of Tcl isn't everyone's cup of tea, it's trivially easy to learn.

For more information on tk, and to see the variety of languages you can use it on, see http://www.tkdocs.com


I would recommend using Adobe AIR (http://www.adobe.com/products/air/) and It is fairly straightforward to develop (since you know Java) and will have all the nice stuff you are looking for. :)


Java can do desktop - use Swing. NetBeans is supposed to have a pretty good GUI drag & drop capability, but I haven't used it myself. (I don't do desktop, either.)


For windows you can consider C#, The visual studio express editions are fee. All you need are a couple of text boxes and buttons etc. And if you know java, doing a bit of Dot Netting should be very trivial. I am also a java guy and i do a bit of c# for personal utils etc because they are so similar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜