views:

750

answers:

4

Hello,

I'm looking for an editor that can read and write remote PHP files via sFTP. I'm talking about not having a local copy of my PHP files.

But here is the tricky part : I'd like that editor to be aware of all the files in my projet, and provide me with intellisense-like auto-completion, classes structures, etc...Just like Eclipse PDT, Aptana and NetBeans do, but with the "remote project storage and awareness" feature.

Do you know about any editor with these features ?

Thanks !

Edit : I'm absolutely not working on my production server, but on a development server. It's mostly because I need to works under windows on my desktop PC and don't want host my projects locally for various compatibility and tools availability reasons, and use linux as a server OS.

A: 

I don't think this is something that actually exists. Mainly because intellisense and class structures rely on being able to parse your complete project. Doing this over FTP would take way to long to actually be of any practical use.

You might be able to find an editor that will automatically upload any change you make locally though.

Aeolun
The projects I'm talking about are 2-3M tops in size, so it shouldn't be an issue to download the whole thing every morning when I launch my editor...Network speed is really not a problem here.
Nicolas
+6  A: 

May not be a good idea:

Warnings:

1) Disconnect: What if you are coding and your connection gets lost, you may get a corrupted file or loose some work. Disconnects occur much more often that power loss in your home/office, and you can safeguard by using a small UPC - that will give a minute to save your work.

2) SCM: Use git, mercurial, svn or what have you, to speed up deployment. Increases ability to share code, backup and roll backs.

3) Auto completion will not work very well over network connection, because ( at least in NetBeans) it scans your project to figure out what you want to auto-complete. It takes a few seconds even on a local machine.

Solution: If after all of the above you still want to do it, you can trick your editor by mounting remote storage as a local drive. You didn't specify your OS but on Mac and Linux - you can easily do it - take a look at Fuse. http://fuse.sourceforge.net/

Khmm apperatnly there was an attempt to port Fuse to Windows: http://fuse4win.4host.ru/

Hope that helps

Update

There are also a few commercial products - one was recommended by macworld I think ( they are both for Mac and Windows)

http://en.wikipedia.org/wiki/WebDrive

http://en.wikipedia.org/wiki/ExpanDrive

Nick Gorbikoff
A: 

I'd second the comments about not working directly on your live environment.

As you've mentioned Eclipse / Aptana - perhaps consider using something like Git or SVN, with a post-commit hook to immediately publish to your live environment each time you commit. That way you reduce the risk by being able to easily roll back any changes that break your live server.

You can use Eclipse (with suitable git/svn plugin) to check out your entire site direct from the repository, and have all the code completion goodness you need. "Saving" is then just a case of committing your changes back to the repository, which would automatically update your server thanks to the post-commit hook.

It's still not ideal, and very risky to develop on a live server, but if you really have no preview environment, then this is perhaps slightly safer than simply working directly through ftp.

I'm curious why you'd need to not keep a local copy - yet you've said the project seems quite small - perhaps taking another approach to the problem would be safer?

Hippyjim
I'm absolutely not working on my production server, but on a development server. It's mostly because I *need* to works under windows on my desktop PC and don't want host my projects locally for various compatibility and tools availability reasons, and use linux as a server OS.
Nicolas
Ok, in which case, I'd suggest looking at taking a local copy of the files, and using Eclipse/Aptana's sync feature. you can set up an ftp sync (look for the Sync manager view in the Window menu), so you can make your edit locally, save, and hit the "up" arrow to upload. It's one more step than saving directly to ftp..but once it's set up it's pretty painless - that's a method I use for one particular project I have - windows locally, ftp to a Linux development box, so perhaps it'll work for you. You could also look at the "mount an ftp site as a drive" method mentioned by Nick above.
Hippyjim
A: 

On Windows the Zeus editor can do seamless ftp/sftp editing.

These remote ftp files can also be defined to belong to a project/workspace.

But the Zeus PHP intellisensing will only work for local files.

jussij