Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Software (http://archives2.twoplustwo.com/forumdisplay.php?f=43)
-   -   Swing GUI calling C++... Is this efficient? (http://archives2.twoplustwo.com/showthread.php?t=355379)

10-11-2005 02:52 PM

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

fish43 10-11-2005 03:13 PM

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.

beatua 10-11-2005 04:15 PM

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

the_joker 10-11-2005 05:40 PM

Re: Swing GUI calling C++... Is this efficient?
 
Yes, build it all in Java. Java is not slow. Good luck!

10-11-2005 08:08 PM

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!

slavic 10-12-2005 12:10 AM

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.}

10-12-2005 11:19 AM

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.

lordfoo 10-13-2005 12:16 AM

Re: Swing GUI calling C++... Is this efficient?
 
Yes, Swing will be fine. I just finished the first version of a replayer, and I wrote it all in Java, with Swing for the GUI. If you'd like to check it out, look here

Prod1gy 10-13-2005 09:34 AM

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.


All times are GMT -4. The time now is 03:37 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.