Sign in to follow this  
subnet_rx

Suggest a language...

Recommended Posts

I'm going to be involved in creating a rather large program with a lot of user interaction through dialogs and a lot of dependence on database information. We're trying to figure out what would be the best language for the job. A port to Linux may also be in the future since this application will have a server side component.

Share this post


Link to post
Share on other sites
Java, probably.
It has the cross-platform VM and windowing libs.

Same reason for C#, but C# is newer and less completly supported.

Or you could write rockin' C++ code and modularize the OS-specific code out.

*shrug*

I'd say Java, honestly.

Share this post


Link to post
Share on other sites
I'd probably lean towards Java as well, solely because of the lacking Windows.Forms support of Mono (don't know about dotGNU though). If you don't mind using a different windowing system (such as GTK#, it's cross-platform) then I'd say C#.

Share this post


Link to post
Share on other sites
Well, I'm already fairly familiar with wxWindows, it works a lot like the Win32 API's, but can run on a variety of platforms and has wrappers for C++ and Python.

I've also worked with Java/Swing in the past (around 1.3 beta).

C#, I've been told, is really easy to work with, but it might work against me to distribute something that has to be on Windows. I thought I had also read that Mono could be shut down at anytime by MS, since they own the language.

Two questions though:

1. Will Java be fast enough for quick user interaction?


2. Why is Python so good? I've been hearing a lot about it.

Share this post


Link to post
Share on other sites
I'd suggest using Python. As someone else mentioned, you can use wxPython for GUI and the python db api for database access. accessing a mysql db in python is extremely simple:

import MySQLdb as db
con = db.connect(host='myhost', user='me', passwd='mypasswd', db='mydbase')
cur = con.cursor()
cur.execute('select * from users where clue > 0')
results = cur.fetchall()

Quite recently a friend of mine was trying to write a database program in C++. I told him 'Learn Python, I learned it in 2 days and it's excellent'. He learned python and then thanked me for how easily he had accomplished his task with it :)

eof

Share this post


Link to post
Share on other sites
Quote:
Original post by subnet_rx
I thought I had also read that Mono could be shut down at anytime by MS, since they own the language.


They don't own the language: it is standardised. I'm sure they're very happy with Mono as it proves how open and nice they are.

I'm not a fan of Microsoft but don’t believe half of what you see and none of what you hear.

Share this post


Link to post
Share on other sites
from my experience with java and databases, which is only bout a year,

it is quite easy. I haven't used c# with databases before, but I'd think c# wouldnt be a good idea, as it is easier to cross platform if you stay well away from .net, even tho .net is made for cross platforming, i havent really seen it widely distributed

Share this post


Link to post
Share on other sites
Quote:
Original post by subnet_rx1. Will Java be fast enough for quick user interaction?
Java isn't slow. On a P200, Python is fast enough for quick user interaction, and Java is at least ten times faster.

Quote:
2. Why is Python so good? I've been hearing a lot about it.
It sounds superficial, but I think it's the syntax. It's almost ridiculously bare, which drastically reduces the number of possible errors. Code almost always does exactly what it looks like it does. (the fact that a programmer can learn enough Python to write useful programs within two hours doesn't hurt)

Python would be a great choice for this sort of application. SQLObject is neat.

Share this post


Link to post
Share on other sites
Well, all the languages have a good case. Let me see if I've got this straight.

C# has a good development environment, is fast, but may or may not have portability issues in the future.

Java is moderately fast, I have never worked with a solid GUI IDE (although NetBeans looks promising), is very verbose, statically typed language, and cross-platform compatible.

Python is slow compared to the others, no GUI IDE, but is a dynamically-typed, user-friendly language.

[Edited by - subnet_rx on September 21, 2004 1:01:03 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by BTierens
I would suggest Delphi/Pascal. There is a free and cross-platform (Windows,Linux,others) compiler called FreePascal. The compiler is verry up to date. I'm using this compiler for an OpenGL game.

Seconded. Delphi is frequently used to work with databases, and it's also good for UIs (have good visual editor).

Except that for C++ you get more optimization (intel compiler).

BTW, i tested, java is slow with more-or-less science-related code. Last time i checked, when i want array of 3D vectors in Java i have to use array of _references_ to vectors... and it definitely don't make things work faster, and i don't see how it can be optimized out. (probably it doesn't matter for your application - it's just why java is slow for what i'm usually coding)

As about JVM..i readed much about JVM when i wanted to compile into it...Accordinly to this, in JVM you can work only with top of stack, and have special magic for local variables and parameters... i think it's not good, at all.(it's not good for optimization done by compiler). (that's just my humble opinion about Java performance)

Share this post


Link to post
Share on other sites
Java's reputation for slowness in GUI comes from Swing, which is written in Java. Use AWT, which uses native toolkits, instead and Java will be plenty fast.

Most GUI Python apps are written using wxPython, which uses wxWindows, which uses native toolkits.

Typically, when you write a Python application, you code a fully Python version first, profile it, and then recode the slow parts in C/C++ until the program is sufficiently fast.

Quote:
Python is slow compared to the others, no GUI IDE, but is a dynamically-typed, user-friendly language.
That's basically correct. For various reasons, the no GUI IDE part isn't nearly as important for Python as for other languages, so most Pythonistas don't use one. here is a list and review of various Python IDE's.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this