Organization of PHP development in a team (environment, configuration, etc.)

We have been facing this problem for some time and cannot find the ideal solution that would satisfy all the requirements that make life easier for developers.

Now we have the following setting:

  • Linux development server (like everything we produce runs on Linux and it uses some linux-specificix libraries)
  • Windows desktop computers (because the office network is in windows)
  • Each developer has a home folder on the dev server with a virtual host configured to run its code. This folder is shared with Samba.
  • Zend Studio IDE, which is configured to use this location (as a network drive) to work on projects
  • Remote debugging, allowing you to run applications on a dev server and be able to execute code

So, the main problem that we are facing is that everything is slow ...

  • Zend indexes the project slowly, since it has quite a few files (including external ones, such as the full framework) that need to be transferred via SMB.
  • Remote debugging is slow, because Zend must get the file and then send it back to the server to run it (launch "Local, if it is available, otherwise the server", otherwise breakpoints do not work)
  • Tortoise SVN is slow to get the status of the file to commit (the command line fixes the problem, but it is much less user-friendly, especially with more complex things like resolving merge conflicts).

Inclusion in any of the solutions, which will have several server configurations, creates a problem that can damage different configurations, which will lead to an additional level of uncertainty and, possibly, errors in the production process.

Development and debugging under windows is not possible due to linux dependencies in the code (for example, from POSIX functions).

So how do organizations solve these problems? What settings are you using? What problems do you face and how to solve them?

+4
source share
1 answer

One solution that works in some situations is:

  • Enter the code on your local disk, on the physical computer on which the windows are running
    • This code is the one you modify with the IDE
    • So, the IDE works as quickly as possible: there is no SMB access for each file.
  • There is also code on the Linux server
    • So, Apache is fast: the code is present on the server
  • Use some kind of synchronization mechanism to push every modification made in a file on a Windows machine to a Linux server through an SMB share.
    • Using Eclipse, the FileSync plugin handles SMB sharing very well.
    • WinSCP can also be used to synchronize a remote and local folder over an SSH connection.


Benefits:

  • All local operations are fast
  • All server operations are fast.

Disadvantages:

  • You should always use a tool that provides synchronization (for example, with FileSync, everything must be done in Eclipse - and nothing else in the software)
    • Note: for SVN there is no need to use Tortoise: there are plugins that integrate into Eclipse (for example, Subversive).
  • Not sure about debugging
  • Modifications made directly on the Linux machine may not be synchronized (depending on the solution) on the Windows desktop.


However, the best (fastest and most powerful) solution is, as a rule, to use only one computer that will run Linux in your case, and not Windows.

  • Your tools will most likely work under Linux.
  • If necessary, you can install Windows on a virtual machine, for some programs that do not run on Linux
  • This will help everyone in your team get to know Linux better; which is always useful when your production environment is not Windows; -)
+3
source

Source: https://habr.com/ru/post/1343059/


All Articles