Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  GUI and language  (Read 2510 times)
0 Members and 1 Guest are viewing this topic.
Offline Gudradain
« Posted 2010-10-25 03:23:07 »

Why are GUI inserted in language? Like Java has his own GUI, C++ has his own GUI and so on. And, everytime you want to do a GUI in another language you have to learn the way it is done. Wouldn't it be possible to have a GUI outside of a language ; like you can create a GUI with tool X (might be a language specific only to do the GUI) and then you can use code logic in Java, C++, C#, Python to complete the application.

Is the question clear?

It may sounds like a stupid question here, but well it's not... Learning how to do GUI is already a big hassle in 1 language, learning it in many just suck and it's always the same thing that you do.
Offline zammbi

JGO Coder


Medals: 4



« Reply #1 - Posted 2010-10-25 03:52:06 »

Couldn't you say that for any X library? My guess its a huge hassle to create anything good and supporting lots of languages.

Closest GUI that supports a lot of stuff that I know, would be http://www.telerik.com/ or http://www.devexpress.com
AJAX, WPF, WinForms, Silverlight, ASPX, VCL. But that's really not much at all....

Current project - Rename and Sort
Offline JL235

JGO Coder


Medals: 10



« Reply #2 - Posted 2010-10-25 04:47:40 »

Swing is Java specific, but lots of GUIs are built in C or C++ and have bindings for most languages. This means they aren't really language specific. For example Qt has bindings for Java, C++, C#, Ruby, Python and lots more. Most of the time writing GUI code is primarily about how you use the library rather then being about what language you are using. For example I recently used Qt and OpenGL in an Erlang project and for this I ported bits of OpenGL and Qt code from various Java and Python examples.

However increasingly many major GUI frameworks are XML driven, such as the awesome WPF (which uses XAML).

Edit: There are also lots of pages on user interface markup languages on Wikipedia, such as here.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2010-10-25 06:38:31 »

Why are GUI inserted in language? Like Java has his own GUI, C++ has his own GUI and so on. And, everytime you want to do a GUI in another language you have to learn the way it is done. Wouldn't it be possible to have a GUI outside of a language ; like you can create a GUI with tool X (might be a language specific only to do the GUI) and then you can use code logic in Java, C++, C#, Python to complete the application.

Is the question clear?

It's called a webserver and a browser.

You immediately see the problem: you get the lowest common denominator and the performance is utter crap.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline Preston

Senior Devvie


Medals: 4



« Reply #4 - Posted 2010-10-25 08:58:37 »

Hi, I understand your question. Unfortunately it's all not very simple.

Quote
Why are GUI inserted in language? Like Java has his own GUI, C++ has his own GUI and so on.
Java as a "system", ie JVMs on many very different platforms, has its own GUI and this is helpful.

However C++ or other languages do not. You have totally different GUIs for C/C++ on Win32, Linux, Unix, etc. and even these platforms have very different GUI systems (Gnome, KDE, Xfce, Qt, etc etc).


If you use Netbeans (or Eclipse?) it's comfortable to design small and midle-sized GUIs with the mouse and some graphically connected event handlers, plus a more code for your application's logic.

Such a GUI'ed application you can use on many different platforms and it will look and feel very similar.

If you focus on Java and take all the "do's and don'ts" into account, you can deliver GUI'ed applications no matter what platform they have to run on. The old Java motto "Write once run everywhere" wasn't working very well in the beginning of Java, but since several years it is.
Everything takes its time.
Offline JL235

JGO Coder


Medals: 10



« Reply #5 - Posted 2010-10-26 09:09:58 »

If you focus on Java and take all the "do's and don'ts" into account, you can deliver GUI'ed applications no matter what platform they have to run on. The old Java motto "Write once run everywhere" wasn't working very well in the beginning of Java, but since several years it is.
Everything takes its time.
This is worthy of being a separate topic in it's own right, but I disagree with your point here. Although I think Java is one of the best examples of cross-platform software I've seen it's still far from perfect, and that's typically found with Swing and Java2D.

Offline Preston

Senior Devvie


Medals: 4



« Reply #6 - Posted 2010-10-26 09:44:03 »

This is worthy of being a separate topic in it's own right, but I disagree with your point here. Although I think Java is one of the best examples of cross-platform software I've seen it's still far from perfect, and that's typically found with Swing and Java2D.
Yes, it would be worth a separate topic.

The "write once run everywhere" paradigm doesn't work perfect, indeed.
On the other side I don't think any human work could be perfect. :-)

I agree that Swing is somewhat difficult to make look the same or say "very similar" on different platforms, mainly because of different fonts I think.

By the way, does anybody know why Java doesn't use the same own vector fonts on any platform but relies on the platform's fonts and just maps "similar" ones to the Java logical ones? This way we've to put own fonts next to our application and load them in the Java program in order to look the same or "very similar"...

A carefully written Java2D application however can look and work in exactly the same way on many different platforms, for example if it's focused on Java2D and doesn't use Swing too extensively.

It all depends on what your application has to do or doesn't need to do...
Offline JL235

JGO Coder


Medals: 10



« Reply #7 - Posted 2010-10-27 18:27:02 »

I agree that Swing is somewhat difficult to make look the same or say "very similar" on different platforms, mainly because of different fonts I think.
Font support and minor differences in rendering wasn't what I had in mind. I've seen plenty of Swing bugs where a user is using a particular Java version with a particular window manager and as a result they get no borders (or something equally bad) on any of their windows.

Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (1278 views)
2018-06-10 19:43:48

EgonOlsen (1147 views)
2018-06-10 19:43:44

EgonOlsen (881 views)
2018-06-10 19:43:20

DesertCoockie (1291 views)
2018-05-13 18:23:11

nelsongames (1106 views)
2018-04-24 18:15:36

nelsongames (1337 views)
2018-04-24 18:14:32

ivj94 (2077 views)
2018-03-24 14:47:39

ivj94 (1230 views)
2018-03-24 14:46:31

ivj94 (2188 views)
2018-03-24 14:43:53

Solater (796 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!