![]() |
|
#1
|
|||
|
|||
Scalability in Java and C++Hi. I'm new here. I'm [a noob,] doing my best to get a good degree. I love programming. I'm not geeky enough though. I actually WANT to be the geek that gets As and that people hate on.
I've been looking for a suitable forum to post this question on. Right, without turning this into another C++ v Java debate (lol, I almost databate), I would like to know the SCALABILITY of these two. Not the same old "portability, gc" stuff. I have some concrete areas of concern. I may create a database for a relative (as well as other projects) and want to know the following:
Thanks! |
|
#2
|
||||||||
|
||||||||
Re: Scalability in Java and C++Hi agx,
Welcome to the GID Forums. Hmm. Yet another Java vs C++ debate???? Anyway, i like java kinda person, and I'll try to tell you the truth. Now, to your questions: Quote:
Quote:
Quote:
Java has excellent Exception handling mechanism, which you'll never ever see in C++. For example, consider the NullPointerException! What a nice way to inform!!! Quote:
Most of the computers will HAVE java because it is widely popular. In the case of C++, you need to link some static libraries, so you must redistribute it. But remember! Java is platform independent. Quote:
Because you can port your java class to any platform, and it will look the same way as you saw in others. Thats why Java GUI is very nice. But Java uses its own Window drawing functions. So the GUI may be a little slower than C++ created ones. Infact, Java draws lines to create buttons and other things. Quote:
But C++ is certainly secure if you can write a code without any security bugs. I think both C++ and java can interact with many API's (and also with each other. see Common Language Runtime)but I think C++ wins over java in this case. Huge powerful programs are always written in C++. Java is used of course, to create powerful projects, but it is used mainly for the web. Remember? Why java was created? Quote:
But Everything in java can be done using C++ too! But wrt. the execution speed, I find C++ is better than Java. Quote:
Your class written in any platform can run in other platforms. But Java performs various run time checks for the operating system, and other things, so that it takes more time to load. C++ -> Evergreen. But only standard code is platform independent.I If you want to have your C++ code as platform independent, you need to perform various checks at the start by yourself. AFAIK, the biggest Java open source project has been the ECLIPSE project.(Who would like a $40 Million project go for free?) So, what am i trying to say until now? Java was made for the Internet. Java is platform independent. Java is slightly slower. Above all, Java is easier!!!! BTW, Did i answered your scalability question? Well. I tried to tell you the truth, my friend. Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#3
|
||||
|
||||
Re: Scalability in Java and C++Quote:
You turncoat! How could you?!?!? __________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#4
|
|||
|
|||
Re: Scalability in Java and C++Quote:
Hi Paramesh, Thanks for your answers. I am know at least leaning toward Java for BIG projects. I wasn't clear on a few things: I asked why the Java uptake is so slow. You responded with: "because it is platform independent". That is not answer to the question. I don't think you understood what I meant - by "uptake" I mean: the trend toward using it, it's rise in popularity, etc. So the question was: "Why aren't as many people using Java as C++?" Could the only reason be to do with its slow speed (bytecode, gc...)? Another question: I hear a lot about Java's portability, but how do you install a Java app and run it as an .exe? How can you always be sure that a computer will have enough harddisk space to download the JVM? |
|
#5
|
||||
|
||||
Re: Scalability in Java and C++Oops! Sorry for my english.
Quote:
Maybe true! But people feel comfortable with C/C++ because it is mature, it came before java, and it has proved its success. Who knows? May be Java can change this thing all round! In Internet application development, Java has more significance, because it is what Java's main Job. JavaScripts! Really changed the way internet looks like, isnt it? Quote:
Ha ha... Nowadays, the hard disk space is about 100 GB normally, and even it people use 4 GB, it doesnt matter. Web Browsers support java. So, people Should install java because it is used universally! Ok. lets go to the point: Converting java application into an exe file: Yes! you can do it. But using third party applications. Sun does not support that. Here is an excellent debate about that, and also a solution for your questions: Java 2 EXE Regards, Paramesh. PS: If you have Visual Studio, just take a look at the .NET framework. Its CLR (Common Language Runtime) Enables the use of different languages in a single project.! But they are not platform independent! __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
|
#6
|
||||
|
||||
Re: Scalability in Java and C++Gotta jump in here for a sanity check.
C++ is portable in the EXE form on any machine that runs the appropriate system. It obviously is not cross-system portable but the source should compile on any system with a C++ compiler (as long as you wrote standard C++) C++ is fast because it runs in native machine code. C++ is designed to be a general solution tool for general computing projects. Java is portable only if you have the Java machine/interpreter/whatever-today's-buzzword-is installed on the machine in question. Java is slower because it is interpreted, not compiled. Java is designed primarily for web-based applications, but can handle general solutions. So are major similarities -- and differences. Just adding a couple cents to the pot... __________________
Cow: You're a lawyer too? Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase! |
|
#7
|
||||
|
||||
Re: Scalability in Java and C++Figured I'll throw some kindling on the fire.
As Walt said, Java is interpreted vs. compiled like C/C++. For a good example, try using OpenOffice1.4 (v2.0 is supposed to be faster). The original OOo program relied extensively on Java due to it's x-platform nature. Opening the app, saving files, making graphs, etc. are all unreasonably slow compared to other, native office suites. But one version runs on all OSes that have a Java runtime installed, so theoritically it's easier to program. On the enterprise, Java is hugely popular. This mostly means that Java is used more for in-house apps of companies rather than stuff you and I would see. There are some "big" Java apps available "off-the-shelf" like Eclipse, OOo, et al. but mostly us little people use it in web apps for things like news tickers. However, O'Reilly is reporting that Ruby on Rails and Python (via TurboGears) are starting to encroach on Java's territory because they are just as powerful, easier to use, and work great for rapid-application development (plus they're open-sourced unlike Java). As Paramesh noted, Java has a built-in GUI builder but it has to draw everything itself. This was done to guarantee x-platform compatiblity; the programmer wouldn't have to worry if a certain widget is available on all systems. However, there is now a glut of x-platform GUI's available for C/C++ such as qt, gtk, FLTK, wxWindows, etc., not to mention the built-in tools of Visual Studio. All it really means is that when you use C/C++, you have an extra step of drawing the GUI you want and linking the code to it. Java apps don't have to be installed on a system, unlike C/C++. Since they run under a browser (normally), they will live in RAM until you close out the app. Programs like OOo and Eclipse are stand-alone Java programs but you don't have to make that style if you don't want to; the "default" is for a web app. Security-wise, Java is technically better since it runs in a "sandbox" which limits the amount of damage a malicious program can do to your computer. Of course, nothing is 100% safe. Hope this gives you some additional insight. __________________
Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#8
|
|||
|
|||
Re: Scalability in Java and C++Thanks for all this info guys.
I think for now I will use Java until I feel able to move onto C++. The site that outlines how to convert java files into .jar doesn't make clear what is written in the command line and what is in a file. I assume all the code is run in the command line. They couldn't have named it better: .jar. The process looks jarring alright. |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My first Java Program (Desperate for Help) | Skyer | Java Forum | 9 | 14-Nov-2006 15:00 |
| [Java] Eclipse.org's Java IDE | JdS | Java Forum | 5 | 04-Dec-2005 09:41 |
| Can I use VS.NET to develop java applications? | aliok.tr | Java Forum | 4 | 07-Nov-2005 17:58 |
| view PDF files using java | bryan523 | Java Forum | 4 | 25-Oct-2005 03:54 |
| game development with java | Ninian | Java Forum | 1 | 13-Oct-2005 03:53 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The