#1
|
|||
|
|||
Swing GUI calling C++... Is this efficient?
Im building a Swing GUI that will parse multi table tournament summaries, have a hand replayer, and also pokerstove-esque EV calculations via hand ranges. I know basic-intermediate C++ and Im completely new to Java. On advice from my cousin, a senior programmer, and all around nerdy badass, Im attacking this from a "Swing GUI that will call on C++ for calculations" angle.
However, in trying to learn Swing, Im finding out Im going to have to become at least as good at Java as I am at C++. So, Im wondering if I couldnt build it all in Java, as a more efficient method. Thanks for the input... and as for the cryptic title, I only wanted people to look at it who would understand my question. haha |
#2
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
Is there a reason why you think C++ would be significantly more efficient than Java at the calculations you are planning? If not, do it all in Java. It'll be a good learning exercise.
|
#3
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
I agree.. i cannot see a significant improvement in using jni to call a c++ backend (if any). The old Java-is-too-slow-for-anything argument doesn't hold up anymore.
Just my 2c. [img]/images/graemlins/smile.gif[/img] Good luck! runstop |
#4
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
Yes, build it all in Java. Java is not slow. Good luck!
|
#5
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
actually I just did it at the suggestion of my cousin, who I found out is just used to doing it that way. well Im committing to Java, and I've been using an online tutorial, I guess thats the best way to start?
thanks for the help... this language is sooooo less...... cryptic! |
#6
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
[ QUOTE ]
actually I just did it at the suggestion of my cousin, who I found out is just used to doing it that way. well Im committing to Java, and I've been using an online tutorial, I guess thats the best way to start? thanks for the help... this language is sooooo less...... cryptic! [/ QUOTE ] Haha, yes it can be less cryptic but it also has many traps for c and C++ programs. Oh well. I only use calls to outside functions when I absolutly have to (suprisingly more often than you would think). Java has really picked up in speed, my one complaint is still that there is not a great visual development environment, but then again I can't take VB to a linux box can I? {Yes I know there are attempts at making a vb like language for linux, please I'm just trying to make a point in my simple minded little way.} |
#7
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
dont be talkin mess about my beautiful beautiful swing!!
eclipse is just about the coolest editor ever.... so leet. |
#9
|
|||
|
|||
Re: Swing GUI calling C++... Is this efficient?
PartyMine is implemented in this exact same way. I have a Java Swing client and use JNI to talk to a core DLL that does the low level Win32 calls that Java cannot do.
If you don't need to do very windows specific stuff I would not use C++ at all. JNI can get slow if you are moving large pieces of data between the two. |
|
|