views:

151

answers:

5

I have wonder that many big applications (e.g. social websites such as facebook) are build with many languages into its platform.

They usually start with AJAX browser support, then scale down to PHP scripting, then move towards a powrful OOP technologie such as Java or .NET, and finally a primitive language to increase performance in crucial operations such as C.

My question is how should I determinate the edge of the layers between languages. When PHP, when Java, when C and so on. And the other question is if should those languages integrate in a vertcal fashion for simplicity and maintanance, or could it be cases when you decide to program on module of your app in Java and the other in native C.

What are the context variables that push me to move to a better performance language? (e.g. concurrency issues due increase of users)

Don't tell me that PHP overlaps .NET and Java Technologies. In a starter point it does, but when the network is overload you start seeing the diferences. I mean how can I achieve Multithreading in PHP as in Java with the same performance. The thing it's hard to answer my wuestion is becasue there is not so much reading about this. You maybe find some good books covering PHP, but few telling how when and why integrate different languages.

Each language was created for different purposes, Python is strong with string operations, Perl very powerful in batch scripting, PHP a very reliable application web server, C the mother of most popular languages.

Best, Demian.

+1  A: 

I believe most teams simply use what they are best familiar with.

There are also questions of licensing that can influence the decision.

That is, if you're talking about technologies that compare to each other and solve the problem on the same level (for example ASP.NET/JSF/JSP/PHP...). But you can't compare .NET with C++ for example, they are meant to solve different problems on different abstraction levels.

Developer Art
I guess the question can be rephrased as: at what point does a problem domain change enough that you have to change your level of abstraction. Yes, the question is comparing .NET with C++. My answer would be the same as Mick: the moment the language feels like it's in my way then I'm probably working at the wrong abstraction level.
slebetman
A: 

On one end of the scale, you move to a higher performance language whenever your profiling and measurements tell you that you have a bottleneck that can't be fixed with better algorithms, data structures, or other optimisation.

At the other end, you move to a higher level language (ie. more abstraction, better libraries) whenever your management allow you to do so. ;)

Kylotan
I thought using a "faster" language would be optimisation too.
BeowulfOF
A: 

My criterion for any programming language is "does it help me to get the job done or does it just get in the way?" If the latter, then it's time to move on.

Mick Sharpe
A: 

From an economical point of view the answer is easy: on a regular basis just look what will be cheaper. Either continue with the current technology and maybe stretch the envelope a bit more. Or switch to something new. When you compare the two alternatives the cost of the investment already done is not important anymore since you've already spent that money/effort. You only have to look ahead: cost of licenses, education, etc.

Of course this is easier said then done, but just sitting down with a few people, thinking about it, and maybe try to come up with some numbers already helps a lot. I have seen too many projects that continued with technology that really wasn't suited for the job anymore.

Also hard numbers don't tell the whole story. There will be resistance because of unfamiliar technology, experts who are losing their status, etc.

Maurits Rijk
+1  A: 
  1. Identify the bottleneck
  2. Solve bottleneck
  3. Go to 1

I'm sure you can imagine that step 2 is the one where decisions like "What programming language do we use" and "where do we put the coffee machine" come into play. That's the basic rule.

Trevoke