Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-platform programming 2

Status
Not open for further replies.

adrianjohnson

Programmer
May 16, 2002
145
GB
I was just wondering if anyone had any experience with any cross-platform (Windows/Linux/Mac/mobile) programming tools and can recommend one.

I could use Java, but systems tend to be sluggish, and with C++ - is it easy to port from one platform to another?

Also, anyone got any experience with REALBasic, or Codewarriors stuff? Any recommendations?

Adrian Johnson
Assystance - i.t. solutions
 
I would recommend Java anyway. You are correct that the need for it to run in a VM causes inherent overhead that would not be present in a C app, but I think there is more of a market for Java now than C. Especially at the enterprise app level. To a certain degree it depends on what you want to develop as well. If you are talking about Enterprise level distributed apps, then Java. If you want to develop a first person shooter, then C.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Sorry for being thick (!), but what do you mean by Enterprise Level apps? The apps I'll be doing will business-oriented - network stuff, media stuff, database stuff etc.

Thanks for the quick reply!

Adrian Johnson
Assystance - i.t. solutions
 
By Enterprise level apps, I mean large distributed applications that are used by many users across an entire enterprise or company. For the apps that you describe, I would lean toward Java.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I would look around. There are many free tools. Some good ones are:

For Java:
Eclipse
JEdit
Net Beans

For C#:
Sharp Edit

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Borland also makes a good C# editor, very similar to Visual Studio. The differeces in the two IDEs are small.
 
Hi,
RealBasic is for the Mac/Win environment. I have a little experience with it. I have enough to know that I do not really like it. It is ok for small stuff but real database stuff is not a strong suite.

Codewarriors is for hh devices. Not familiar with that software development system. If you want to get into hh programming I would seriously consider AppForge. It will allow you to develop for either Pocket PC or Palm.

As far as cross-programming goes. The best route is to take Java or C++. I chose C++ because C++ is not owned by anyone so therefor it is owned by all. You do have to make some assumptions and make sure that you compile to strict ANSI standards but for the most part it is transportable.

Hope this helps,


---------------------------------------
Noble D. Bell
 
Thanks for the replies so far.

I was looking at wxWidgets, as it's a free compiler, but have no idea how to start programming an app with it, then making it cross-platform.

Got any ideas as to good (& cheap) compilers/ides for C++ - remember I want to do Linux/Mac stuff as well, anything that will allow me to create programs for all platforms would be great!

BTW - it needs to be fairly easy to use too - I've already tried one or two bits 'n' prices, but couldn't figure them out!

Thanks.

Adrian Johnson
 
I have not tried to do that yet. But, you will have to have the linux version and the Mac version, if available, to create the windowing. The c++ code, if it is strict ansi, will compile in any environment.


---------------------------------------
Noble D. Bell
 
My understanding is that even if you use C++, you still need to program for a specific OS. I think the only way to program one time and have it run on multiple platforms is to use a language that runs in a VM such as Java. I could be wrong because I've never tried to write C++ code that will run on Linux and Windows, but that was always the way that I understood it.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Your understanding is correct. When programming in C++ you have to program to a certain os, if you want the os specific functionality, ie. Windows, I/O, etc. But, all of the less specific stuff will port without problems, if you use strict ANSI c++ code.

The key to Java's success is the VM or virtual machine. It has been my personal experiences to note that any vm's that I have used tend to run a bit slower. If you can live with that then you should be alright.

Like I mentioned in a earlier post, Java or C++ would be good canidates for x-platform programming.



---------------------------------------
Noble D. Bell
 
Boy, now I'm stuck !

It's currently Java vs. C++, and there are pro's and con's of both. For me the issues are speed of application, learning the language ("did" C++ at uni, though have some experience of Java), ease of using the lanugage, and portability - how much of the code will I need to re-write to use on other platforms.

Ah well, I'm sure I'll have fun!

Thanks for the posts, everyone.

Adrian Johnson
 
If you know some c++ then java will not be that complicated to catch on to. I am fully convinced that C++ will run faster than java. But, on the other hand, you can more than likely port more of the java code across platforms than you can the c++ code.

Please keep me posted. I will be interested in knowing how you come out on this.


---------------------------------------
Noble D. Bell
 
Just to muddy the waters more, if Mono does what is supposedly going to, then it could potentially rival Java for portability. I am personally skeptical, but I have nothing concrete to base my skepticism on.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I've read a bit about Mono, and reckon it's the Open Source community coming up with an alternative to Microsoft's .net. Personally, I don't intend to get involved with it.

Adrian Johnson
Assystance - i.t. solutions
 
adrianjohnson :

I could use Java, but systems tend to be sluggish

Erm... not true. In 1995 before the JIT runtime, then maybe, but this just has not been true since Java 2 (1.2 +).

The apps I'll be doing will business-oriented - network stuff, media stuff, database stuff etc.

All these will perform perfectly well with Java, and I think you'd be pushed to see a real speed difference in runtime against C/C++.

--------------------------------------------------
Free Database Connection Pooling Software
 
I will not argue with you there. But there are a couple of points that I would like to make about c++. Don't get me wrong, I am not a C++ die-hard. I actually program in VB.Net. But, the areas you said that you would not notice much of a speed difference are the exact areas in which c++ is not that strong in the cross-over area. Those areas are platform dependent. There for the VM will have the advantage.

Either Java or C++ would work for cross-platforms but, like in anything, there are pros & cons to each side of the coin.



---------------------------------------
Noble D. Bell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top