View Full Version : Which One?
evildrummer
01-25-2007, 12:54 PM
I'm getting slightly bored of web-development and so want to take up a new language, but there are some things that I want and I dont know which language would be right for me, can someone suggest?
The things I would like are:
support for Linux, Windows and if possible Mac
can still access web for data or other stuff like checking updates (HTTP)
Good documentation
thanks in advance!
senocular
01-25-2007, 01:24 PM
I say go for Java. Easy to learn, easy to make windowed apps, and cross-platform.
evildrummer
01-25-2007, 03:20 PM
Any other options before I start Java, I always used to not like Java apps, not sure, I though about either Python, Ruby and C/C++, I also want it to be pretty easy to make GUI's
Templarian
01-25-2007, 04:28 PM
Learn Java it sounds prefect for you and its syntax is easy to learn. Plus its easy and fast to find tutorials online.
evildrummer
01-25-2007, 04:57 PM
Java it is then, now I'll try and find the right tools for linux
MTsoul
01-25-2007, 05:36 PM
Java is the way to go if you don't want to worry about the details of each operating system or extreme efficiency/customizability/special OS features. I've never liked Java either. I hate how Azureus and Limewire take like 2 minutes just to load.
But if you fancy drag & drop GUI's and want to use C/C++/C#, check out Microsoft's Visual Studio. They've got a pretty nice environment for native GUI on Windows.
If you want to use Java on Windows, Mac, or Linux, use Eclipse, which is made with Java itself so it's cross platform.
evildrummer
01-26-2007, 07:33 AM
Thats one thing that I htought about the speed, anyone have any thoughts about any others: Ruby, Python C?
senocular
01-26-2007, 08:44 AM
There are downsides to any choice. With Java, gratification is quicker and easier. Plus, once you get that down, the transition to C will be a little easier should you decide to go that route.
Jeff Wheeler
01-26-2007, 09:29 AM
Java GUIs are non-native. Ugh, I hate 'em (and, in general, don't like much of Java).
Ruby and Python are considerably slower, but GUI development is easy, if not easier, and can be done for Linux and Windows (uh, not sure if they have a GTK toolkit for Mac; probably do). It's interpreted, so of course it runs on all three.
There's great documentation for both, and they're both really easy to learn. Plus, they're just more fun to write. :P
senocular
01-26-2007, 11:19 AM
Java GUI's aren't that bad :P
evildrummer
01-26-2007, 12:12 PM
What use does Python and Ruby have on servers as I have both on mine (because of rails and Django)
evildrummer
01-26-2007, 01:45 PM
well I've done a little research on python and I think i am going to learn it, (haven't really looked at ruby or C much though).
it has all the features I wanted:
Runs on most OS's
good web access
and from what I have seen good documentation,
and seeming as its already installed in linux I might aswell.
Al6200
01-26-2007, 03:20 PM
Have you tried C#, it runs on CLR virtual machine, so I'd pick it over Java any day. But CLR will only run on Linux with Wine (to my knowledge).
evildrummer
01-26-2007, 03:35 PM
Thats the problem as my main machine is a linux, but oh well, Python is nice, form what I know it can be used for servers and desktops and so far I have already created a guessing game (non-GUI)
senocular
01-26-2007, 03:47 PM
Blender uses Python... and SE|PY was developed with it... so it can't be all that bad ;) (I've only done minimal work with it, but I prefer the C language style)
evildrummer
01-26-2007, 03:57 PM
well so far I am starting to see the similarities and differences between it and C (I lied I had done some C before) and I like it, also the live interpreter is useful
Al6200
01-26-2007, 04:44 PM
Are you looking for a scripting language or a programming language. Scripting languages will give you the best cross-platform compatibility.
evildrummer
01-26-2007, 04:51 PM
Dont worry im on python now
kirupa
01-26-2007, 06:03 PM
To correct an earlier misconception, Java GUIs are native as long as you use SWT (or AWT), and creating a GUI in Java is pretty easy once you get the basics down.
:smirk:
evildrummer
01-26-2007, 06:14 PM
Thanks for the correction kMan, so far I like python and in just about 3 hours I have managed to make a few small apps with GUI's, I made a calculator with some stats functions aswell.
Jeff Wheeler
01-26-2007, 07:03 PM
To correct an earlier misconception, Java GUIs are native as long as you use SWT (or AWT), and creating a GUI in Java is pretty easy once you get the basics down.
:smirk:
Swing specifically is non-native.
Most components (JComponent and its subclasses) are emulated in pure-Java code. This means that Swing is naturally portable across all hosts. Thus, Swing does not typically look like a native application. In fact, it has multiple looks, some that can emulate -- although often not exactly -- different hosts and some that provide unique looks.
AWT is so in the same way, as Swing is built upon it. And, AWT doesn't implement most widgets anyways:
Only GUI components defined for all Java host environments would be used. As a result -- and unfortunately -- some commonly used components, such as Tables, Trees, Progress Bars, and others, are not supported. For applications that need more component types, you need to create them from scratch. This is a big burden.
I do really enjoy SWT, however. It is usually native, and can silently create emulated widgets if they're not supported on the host:
SWT is a lot like AWT in that it is based on a peer implementation. It overcomes the LCD problem faced by AWT by defining a set of controls adequate to make most office applications or developer tools and then, on a host-by-host basis, creating emulated (like Swing) controls for any not supplied by the particular host. For most modern hosts, nearly all the controls are based on native peers. This means that an SWT-based GUI has a host look and feel, and host performance. This avoids the most widely held complaints with AWT and Swing. Certain hosts have low-function controls, so SWT supplies extended, often emulated, versions (often with "C" as the first letter in their names) to allow the more generally expected behavior.
So, SWT widgets are mostly native, but saying that Java GUIs are native based on this isn't really true; SWT isn't even bundled in with Java.
evildrummer
01-26-2007, 07:09 PM
just so I dont have to make a new thread, does anyone know how to check if entered data is an integer in python?
Jeff Wheeler
01-26-2007, 07:19 PM
I'm sure there's a better way to do this, but I can't think of one atm...
def method(var):
try:
print int(var)
except ValueError:
print 'NaN'
My Python is a bit rusty.
nobody
01-26-2007, 07:48 PM
if var is type(int):
blah
I think that's how I've done it.
Jeff Wheeler
01-26-2007, 07:57 PM
Nope, because the type will be a string whenever he takes it from raw_input.
kirupa
01-26-2007, 08:38 PM
So, SWT widgets are mostly native, but saying that Java GUIs are native based on this isn't really true; SWT isn't even bundled in with Java.
Unless you use some bizarre control that only one OS supports, for most applications you won't notice the difference. SWT attempts to emulate the native style even when it is creating its own version of a control for a particular platform(ie: the TreeControl in X).
Java is simply a framework. It relies on APIs to provide additional functionality, so it doesn't matter if SWT is not provided with the core Java download or not. Applications are coded to run on the Java platform. It just so happens that the language targeting the Java platform is called Java also :nerd:
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.