Jump to content

PHP with Java | C/C++ | Python


aHMAD_SQaLli

Recommended Posts

Hello

I heard that some websites use Java or C++ or Python with PHP in the same time, if some know how it's done please answer these 3 questions:

1. How can we run PHP and Java or C++ or Python in the same time.

2. How the variables are passed between them.

3. Wich one is better, Java or C++ or Python .

 

Thanks all.

Link to comment
Share on other sites

I'm not going to go into the "which is best" question.  The answer always depends on a lot of variables that are typically unique to the circumstance.  Obviously c++ is often used for compiled software, and java is often used due to it's availability on a platform (Android for example) or in the enterprise where one or more application servers are desired.  

 

In my experience, for server side web development, Python, Ruby, PHP, Java and Node.js are all popular choices that typically come down to the preference of the Lead developer.

 

In terms of intermixing languages, specifically with PHP one popular way to do that is to use Gearman.  For example, I worked on a project where there was a computation engine written in Java.  The website MVC and additional computation and presentation code was created in PHP using a popular PHP framework.  PHP utilized gearman to send data to the Java computation processes as needed (this had to do with crunching large amounts of historical stock price information) and received the results back for presentation within the PHP framework.  

 

You can also build your own queueing sub/pub applications using many different technologies, and achieve similar separation of work.  This type of architecture is frequently used where scalability is a significant concern.  An example might be a system like Youtube, where the video encoding or post processing is going to be separated from the front end, and clustered. The clustering and DevOps scaling will be separated from the web application code, and since processing of that type is cpu and IO intensive, you won't have that code running on the same server(s) where the PHP code resides.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

3.

Hie,according to me I suggest you for “Python”:

  • Among all, it’s best for “Automation”.

  • Python Web Frameworks like Django allow really Rapid Application Development.

  • Unless, you are aiming for something as low as an Operating System Kernel, or as complex as a thorough Banking Software and UI, Python will serve your purpose.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.