views:

81

answers:

3

What are good ways of dealing with the issues surrounding plugin code that interacts with outside system?

To give a concrete and representative example, suppose I would like to use Subversion and Eclipse to develop plugins for WordPress. The main code body of WordPress is installed on the webserver, and the plugin code needs to be available in a subdirectory of that server.

I could see how you could simply checkout a copy of your code directly under the web directory on a development machine, but how would you also then integrate this with the IDE?

I am making the assumption here that all the code for the plugin is located under a single directory.

Do most people just add the plugin as a project in an IDE and then place the working folder for the project wherever the 'main' software system wants it to be? Or do people use some kind of symlinks to their home directory?

+1  A: 

To me, adding a symlink pointing to your development folder seems like a tidy solution to the problem.

If the main project is on a different machine/webserver, you could use something like sshfs to mount your development directory into the right place on the webserver.

Nick
+1  A: 

Short answer - I do have my development and production servers check out the appropriate directories directly from SVN.

For your example:

Develop on the IDE as you would normally, then, when you're ready to test, check in to your local repository. Your development webserver can then have that directory checked out and you can easily test.

Once you're ready for production, merge the change into the production branch, and do an svn update on the production webserver.

zigdon
+1  A: 

Where I work some folks like to use the FileSync Plugin for Eclipse for this purpose, though I have seen some oddities with that plugin where files in the target directory occasionally go missing. The whole structure is:

  • Ant task to create target directory at desired location (via copy commands, mostly)
  • FileSync Plugin configured to keep files in sync between development location and target location as you code (sync the Eclipse output folder to a location in the Web server's classpath, etc.)

Of course, symlinks may work better on systems that have good support for symlinks :-)

David Citron
FileSync is an interesting idea, I have started to play with it and it might do the job I'm looking for.
kaybenleroll