What is the best server-side programming language out there? By best I mean the most options and convenient to use.
Printable View
What is the best server-side programming language out there? By best I mean the most options and convenient to use.
Depends what your aiming to create.
ASM for speed.
Depends on what you're going to do. Don't expect to get good answers though. There's not a best language, and people prefer one to another.
Don't go for ASM. C/C++ is a lot easier and the effiency is about the same as ASM in most cases. ASM takes a lot more time to code in.
The standard answers you will recieve is:
PHP for web-based applications.
C++ for everything.
C# by rabid fans.
Java for many things.
I would go for Java. It's a nice, powerful and easy to learn language. After you've learned it learning other similar languages like C++ will be easier.
And in case you didn't read properly, THERE IS NO BEST LANGUAGE. C++ is what you can make most with (I don't count ASM), but it's not the easiest and quickest to make something in.
I too would recommend Java. An experienced Java programmer can do server programs with ease, it has LOTS of support for networking, and networking many things together, and the power of applets is also a big plus.
Most people just assume C++ is this amazing programming language, but in reality there are only a handful of people on this entire forum that can probably program in it efficiently and safely, and in the case of server applications thread-safe as well.
Assembler is machine code. You don't even want to try to program with it. That's counterproductive. If you really need assembler, write most of it in C++ and __asm what you need in assembler.
Anyways, I recommend Java to you for server-sided fun.
I support java to the fullest. C++ is a powerful, language, yes, but java is far more versatile. Java is runnable on nearly every machine in the world, boasts a broad array of networking ans IO features, has applet functionality(which are platform independant). Java's sloagan is "compile once, run everywhere," and it's true. I develop between a server 2003, xp pro, and ubuntu OSs and have never had any conflictions. It also has SQL support built in, and has the use of packaging, which allows you to compile your own libraries and use them just like the naitive libraries.
I would suggest Java and/or C#, as they are easy languages and they are both basically the same snytax
Once you leave java, C# will be easy to understand. Or once you learn C#, java will be easy to understand. But don't take it from me, because java is the only application language i feel comfortable with
lol !
It's doesn't depend of the language but on the programmer
By the way C# iocp > java iocp
C# is the best :)
Because he is HabboTard. Don't you see his avatar? :thumbup1:
Java is no good for server. How many servers you know guys who are ran by Java language?
"Java is high performance. By high performance we mean adequate. By adequate we mean slow."
Anybody that has ever used a non-trivial Java program or has programmed in Java knows that Java is slower than native programs written in C++. This is a fact of life, something that we accept when we use Java.
However, many folks would like to convince us that this is just a temporary condition. Java is not slow by design, they say. Instead, it is slow because today's JIT implementations are relatively young and don't do all the optimizations they could.
This is incorrect. No matter how good the JITs get, Java will always be slower than C++.
The Idea
People who claim that Java can be as fast as C++ or even faster often base their opinion on the idea that more disciplined languages give the compiler more room for optimization. So, unless you are going to hand-optimize the whole program, the compiler will do a better job overall.
This is true. Fortran still kicks C++'s ass in numeric computing because it is more disciplined. With no fear of pointer aliasing the compiler can optimize better. The only way that C++ can rival the speed of Fortran is with a cleverly designed active library like Blitz++.
However, in order to achieve overall results like that, the language must be designed to give the compiler room for optimization. Unfortunately, Java was not designed that way. So no matter how smart the compilers get, Java will never approach the speed of C++.
The Benchmarks
Perversely, the only area in which Java can be as fast as C++ is a typical benchmark. If you need to calculate Nth Fibonacci number or run Linpack, there is no reason why Java cannot be as fast as C++. As long as all the computation stays in one class and uses only primitive data types like int and double, the Java compiler is on equal footing with the C++ compiler.
The Real World
The moment you start using objects in your program, Java looses the potential for optimization.
That is incorrect Intelext. One of the things I went through in my studies is the comparison between C++ and Java.
Java is NOT slow. That is exactly what someone who is uneducated about Java would say.
The truth is, all languages have their shining star. Java's JITs are getting increasingly quicker. I love how you compared Fortan and C++, as Java and C++ have likewise comparisons.
Java's strong point is the compile once run anywhere philosophy, whereas C++ has been around and optimized for x86 for almost 3 decades, and Java has been around for a little over a decade. Java is not a bad language for running server software AT ALL.
Java can allow you to program servlets within hours, whereas a likewise program in C++ would take a nice week to work out. And the speed comparison in that department is Java is actually slightly in the lead, simply because all the overhead required for C++ to do the same thing, compared to Java's VM having a quick built in optimization for that purpose.
C++'s number crunching is faster.
C++ GUI vs Java's Swing is about the same.
Networking: About the same. Except C++ can't do applets and servlets.
File I/O: Java's getting closer with each revision, but C++ is faster.
The point is: Java achieves virtually the same speed on every machine clock cycle wise, whereas different compilers of C++ have different benchmarks.
I recommended Java instead of C++, because C++ might be faster, but Java is more versatile, as
A) You don't need to optimize your code to run on 3 different OS's
B) You don't have to waste a year figuring out how to handle memory
C) Thread-safe operations are as simple as synchronized(variable) {}
I understand fully the benefits of both languages, but I believe that for someone just asking plainly "Good language for server applications" with no specifications, that Java will be the easiest to implement, with the ability to support 1500+ users, without much of a problem at all.
Also, Java calling between multiple classes is only slow the FIRST time, after that its optimized and it runs stack-based just like C++, so your attack on Java not being good as soon as you go multi-class is slightly invalid.
Not to sound stupid. But can you name some examples? Personally I NEVER encountered ANY server-side software based on Java. Game servers, SQL servers, WEB servers, etc...
Name some, please. And not some "Cool Web Server" but actual large stuff.
As it goes for Team Lion. We are not talking about the guy who wants to create server anymore. He will probably not make anything. I just want the truth. I don't say that Java suck in any way. But I really think that it's slow from my own personal experience with some of the software built in Java. Like Vuze (BT Client) for example. Why is that?
a big percentage of servers all over the world uses "Sun Technologies", which is based on Java.
Yea, it's so big.
Actually I was not trying to offend you or any other person here. I just never heard of any server using Java. I knew that many educational/medicine software is using it. But not so much servers. And even if I'm wrong, I'm totally fine with it. I just like to know things for sure. :thumbup:
I'm just saying you should be open for other languages too, since C++ isn't the only server-side language out there.