aHMAD_SQaLli Posted November 11, 2015 Share Posted November 11, 2015 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. Quote Link to comment https://forums.phpfreaks.com/topic/299438-php-with-java-cc-python/ Share on other sites More sharing options...
benanamen Posted November 11, 2015 Share Posted November 11, 2015 3. A lot of it is simply using the right tool for the job which means understanding the strengths and weaknesses of each language. You can pound nails with screw driver but a hammer is the best tool for the job. Quote Link to comment https://forums.phpfreaks.com/topic/299438-php-with-java-cc-python/#findComment-1526200 Share on other sites More sharing options...
gizmola Posted November 11, 2015 Share Posted November 11, 2015 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. 1 Quote Link to comment https://forums.phpfreaks.com/topic/299438-php-with-java-cc-python/#findComment-1526211 Share on other sites More sharing options...
Ani123 Posted January 1, 2016 Share Posted January 1, 2016 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. Quote Link to comment https://forums.phpfreaks.com/topic/299438-php-with-java-cc-python/#findComment-1528922 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.