Working locally

18 Jun 2013

One thing ShiftEdit has lacked is real access to your local machine and network files. File operations are conducted via a proxy on our servers. This requires that both you and your server are net accessible.
 
We support HTML5's local filesystem which is sufficient for client-side programming e.g. HTML and JavaScript. It's not much use if you're writing a server-side language like PHP or Ruby however.
 
So how can you work on said server side code in your local dev environment? Up until now you could use Dropbox, Google Drive, or set up a net accessible (S)FTP. With all of these there is a delay when interacting with files as your computer connects to the proxy which in turn connects back to your computer.
 
To resolve this I've added a new server type called AJAX. For this to work you upload a PHP script to your server and use the script's web address as your host. ShiftEdit will then perform file ops directly via this script without any proxy in-between.
This means you will be able to connect to your local machine or network without noticeable lag.
 
You could also use this approach as an alternative to FTP or SFTP. The main limitations being that it currently doesn't support file revisions - which are saved on the ShiftEdit server or zip extracting.
 
 
The pros and cods are listed below:
 
Pros
Near-zero lag when interacting with local files.
Can connect to servers on local network.
Easy to revoke access - just delete the file!
 
Cons
Server requires PHP.
Doesn't support extracting zips (FIXED).
Doesn't support file revisions (FIXED).
 
The PHP server script is available on GitHub: