views:

533

answers:

14

I'm a php developer and I want to broaden my knowledge base by learning a higher language (java, c#, c++). My specialty is in building web applications (ria etc). I'm trying to think of the appropriate path to take (hedging my bets so to speak) in terms of which language I should be focusing on. I love open source technology but at the same time C# seems to be getting a lot of notoriety. Despite the newer technologies available there still remains c++ which is the staple for many popular vendors including google and facebook (hip hop) in building scalable and robust cross platform apps.

Can anyone offer suggestions as to how I should be looking at this. Should I go Java, C# or C++). They all take time to master and I just want to choose a specialty.

Thanks

+2  A: 

For back-end development, I'd go with Java. It will give you the most options in terms of platforms. C# is a nice language, but still essentially limits you to Windows (Don't know much about the Mono port, maybe someone else can elaborate).

C++ is rearely used for web application development.

Jen
My impression of Mono is that while it's programmed using the same language (C#), the libraries are totally different and so non-trivial apps cannot be ported between it and .NET without a lot of work producing your own interop libraries. In other words, forget it.
Donal Fellows
@Donal Fellows, Mono strives to be fully compatible, but the api is constantly playing catch up, if you limit your self to a common subset you can switch between the two. Mono does includes many additional API's (mostly for desktop applications) that are not part of Microsoft's .NET, but you don't have to use them.
mikerobi
@mikerobi: I looked into it a few years back (for server applications) and there was a sufficiently wide gap that we judged it easier to learn how to deploy Windows-based servers than to figure out how to make Mono host the applications. Then that project ended and we breathed a sigh of relief as we went back to using Java, which is more portable *in practice*.
Donal Fellows
A: 

I would suggest Java there are some great APIs for web applications out there.

I have used Google Web Toolkit (GWT) in the past and found it a powerful API for web apps

Sleepy Rhino
+7  A: 

I find that I do less stuff in C++ than I used to. It has its place, but that place is growing smaller. If you want to make a connection with web development, c++ probably isn't what you want. I'd agree with other posters. Java might be a good choice.

For my web-related projects, I've had a lot of fun with python and Django. I'm guessing Ruby on Rails would also be a possible thing to look at.

Since you mention scalable and robust... a lot of the big scalable and robust sites started out with other technologies and only switched when the massive traffic actually required it. Getting things finished is often better than making something scalable that never is finished.

Mattias Nilsson
and many big scalable sites *still* use these other technologies. Facebook still runs PHP, of all things (yes, I know they've done a lot of work to optimize it, but still. It's not C++). Web apps are generally pretty easy to scale out, just by throwing more hardware at it. And in many cases, additional hardware turns out to be a much cheaper solution than the additional developer time it'd take to rewrite your application in another language.
jalf
Not true (the Facebook bit). Check out http://developers.facebook.com/blog/post/358
dare2be
@dare2be: Like @jalf said, it's still PHP. :)
musicfreak
@musicfreak Yup, but what I wanted to point out is that if you ask about importance of knowing c++ in web development, one excellent example is that project. Someone had to actually WRITE IT. That person had to know both PHP and c++ (quite well, in fact). Anyways, it's a great project ;)
dare2be
@dare2be: Ah, good point. On the other hand, though, I wouldn't consider the programmer a web developer as much as a compiler developer. Not that it really matters, because you're right. :)
musicfreak
+2  A: 

C++ only comes in play when you work on large applications where you need low-level language features to write back end with performance in mind.

Java and C# are meant to boost your productivity. First of all, by taking care of memory management and offering a very functional class library.

Java seems to be a less actively developed language, due to the vendor position. It has however the largest ecosystem in terms of various libraries and third party products. Also cross-platform. Java jobs are plenty, but tend to pay less.

C# language is being quite actively developed, to the point that sometimes annoys developers (who say they don't manage to keep up). Through this however you get a modern and powerful language including huge .NET class library, which makes developers very productive and on average very happy. It is however not cross-platform (except for Mono experiment) and at some point of your growth you may have to pay for licenses (Visual Studio IDE above Express edition and SQL Server (if you use it and if you exceed 4 GB database limit)). Jobs are usually fewer but pay more.

Developer Art
"Pay for licenses"? Which licenses are you referring to? .NET has always been free, and comes pre-installed on Windows.
John Saunders
@John Saunders, serious .NET development requires Visual Studio, and for many users the free edition is not adequate.
mikerobi
@John Saunders: I mostly mean SQL Server. It's quite easy to get past 4 GB Express database limit.
Developer Art
@mikerobi: the reason I asked "Developer Art" and not you was that _he_ knew he meant "SQL Server" and _you_ did not.
John Saunders
@Developer: SQL Server is not a prerequisite for .NET Development. Use MySQL if you like.
John Saunders
+1  A: 

Choose the language in which you feel more well, it will be one that will bring success.

lsalamon
+4  A: 

C++ is not as popular for web development as PHP, Python, Java or C#. But it still can be successfully be used for web development using frameworks like CppCMS.

So if you generally want to learn more web technologies I would not suggest you using C++, but if you want to learn and explore new technologies it is very important language to learn as it opens very different kind of world.

Artyom
A: 

I would definitely take the Java/J2EE route. It's currently the most popular choice for web applications.

CoolBeans
*Looks at Facebook, PhpBB, InvisionBoard, Drupal, Joomla, and Wordpress and their .php extensions. *Struggles to find Java websites. There are a few Java web servers out there, but it's NOT the most popular choice on the web.
TheLQ
In the internal enterprise world J2EE is still very popular. Most companies I have worked at either used .NET or J2EE. I have seen some small shops using PhP but on large IT shops, J2EE is the way to go for most. Again this is subjective to my experiences, I can't give you facts. :-)
CoolBeans
A: 

My impression (from my limited vantage point) is that C++ is becoming the next COBOL or C. That is, an enormous base of legacy applications but used for new development less and less frequently. If you expect to be writing new code rather than maintaining older code, I'd focus on something else.

mickeyf
+1  A: 

If you are looking to improve your marketability, you definitely need to learn c#. C++ is my favorite language and I use it all the time to write back-end servers; but because it extends development times very few projects require it as a backend to a website. These days if you can code in PHP, C#, and in some cases Java then you have pretty much anything you need for 99% of web application developer jobs.

If you desire to branch into much larger niche markets (like working for Google), then C++ is definitely where you want to go; otherwise you'll be better served with C#.

skymander
+1  A: 

Assuming you want to stay within the web development realm I agree with most on here and would go with Java. After getting comfortable with Java I would start looking into Groovy (and Grails) which is starting to gain a following in larger companies. Also, once you are comfortable the transition into C# isn't bad (that is what I am doing right now and it reminds me of Microsoft's awesome version of Java).

Jacob
+1  A: 

C++ is rarely used in web development, it's mainly on the desktop. And with my experience with C++, that would seem like an exorbitant amount of code just to make simple things appear on screen.

While Java is a decent web language, there is still alot of overhead. Most websites currently use PHP. Its powerful, easy to use, and easy to learn. Their isn't a large development cycle, and no complicated WAR and EAR deployment. And changes appear instantly, not like some Java based web servers who take minutes or hours to update.

If your scared of PHP, don't be! It runs extreamly popular sites like Facebook, and powers popular web programs like PhpBB, InvisionBoard, Drupal, Joomla, and Wordpress. Clearly php is doing something right or it wouldn't be all over the internet.

TheLQ
A: 

If you're just looking to broaden your knowledge, then yes, C++ is a good language to sharpen your teeth on. If you're looking to use it in web development, then no, go with either Java or C# since C++ is rarely used in web development.

5ound
A: 

Do you realize there's no correct answer for this?

Since you seems to be more fond to C++ I would suggest yo go for it.

Personally and subjectively speaking of course, I think Java still would be the best choice.

There not much I can say about Java if you think is not worth it ( or the other way around, there nothing I can say bad about Java if that's what you want to learn next )

So there's no way to have a correct answer for this.

And, we all know the only correct answer is Java ;) </sarcasm>

OscarRyz
A: 

My vote would be for both C++ (in the first place) and Java. And yes, I look at it from the Web Developer perspective. The reason for that being that things recently have been moving slowly but surely towards the cloud computing.

Notice how browsers start supporting websockets. Socket connections will eventually replace AJAX and Comet and will provide for more responsive and more robust web applications. The reason to learn C++ and/or Java is for writing backend scripts that run as daemons and service your web socket connections. Daemons in PHP are possible but not as fast or robust as C++ compiled apps.

At this time I'm a Linux supporter (having had extensive background with Windows servers and .NET) and I have and will continue suggesting clients going with Linux over Windows. You get more reliable user concurrency on Linux over Windows on the same equipment. I feel that the cloud will be split between the two, but employers who are knowledgeable will go with Linux. It's also our job to educate them. This is my reasoning for learning C++ at this time.

I just had to write a daemon for maintaining a 24x7 connection to a text messaging aggregate (users text operators who respond to multiple connections from a web interface), I went with C++. But I also plan to familiarize myself with Java, because of the huge available Java code base out there. It may come in handy.

Raine