It is best for nodeJS and PHP to separate the project from the architecture of the project to find a solution, or to provide source code reference. Thank you.

nodeJS and PHP separate the project from how to solve the problem, or it is best to provide source code reference. Thank you

Feb.28,2021

there is no source code for reference, and I don't know exactly what the scenario is. Only advice.

  1. strict modularization;
  2. after dividing the functional modules, assign the appropriate functions to the appropriate language implementation, and when there is no obvious difference between js and php, consider the rationality of the structure;
  3. after assigning which module to implement in which language, agree on the protocol / API for communication between different modules of js and php. For example, whether to use tcp, or udp, or to save trouble, whether the format of the information transmitted by http; is json, or csv, or some other format, which fields are included in the information, what the field names are, and so on.

the key is to modularize and reduce coupling, so that there is no difference between js and php in a sense.


No code, no scenario, only hard answer.
if there is no legacy code problem, I think it is not necessary to introduce two background languages at the same time, it will only increase the complexity. Generally, you can choose one that you are familiar with or the scene is suitable for.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be954e-31979.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be954e-31979.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?