I'm trying out PHPStorm by Jetbrains at the moment, which I think is an awesome IDE.
The only complain I have is that Im always in fear that I will overwrite changes other people made.
I'm currently working on a project without Git, just pure FTP. If I start PHPstorm, the first thing I have to do is synchronize my local files manually using the "Compare with local version..." dialog, which takes a lot of time at bigger projects.
Is it possible that PhpStorm behaves like Eclipse Remote Explorer?
It would be awesome if PhpStorm would check the file I just opened for a newer version on my default remote and replaces it automatically.
In the Tools > Deployment > Options dialog, you will see the following option:
Changing these options will allow you to customize how your uploads are pushed and when you're warned about overwriting changes
Related
I have the project in the remote server and i have only ssh access. How i can work with this project? I am looking for information for either PhpStorm or NetBeans.
You have several options, depending on your system.
You can rsync or scp up your files when you want to publish.
You can use version control (cvs, svn, git, mercurial, ...) and via ssh perform an "update" when you wish your code to go live.
You can set up a sshfs filesystem locally.
I don't know about NetBeans, but PhpStorm has a feature that allows uploading files as soon as they change to a server (via FTP or SSH).
I don't have a lot of experience with this feature but it does seem to work well. PhpStorm can also be configured to deploy changes that occurred outside (it seems to do so as soon as it regains focus). It also seems to properly delete files that have been deleted from the project, so it's a real sync, not just "upload".
See how to configure it under "To have PhpStorm upload changed files automatically" here: http://www.jetbrains.com/phpstorm/webhelp/uploading-and-downloading-files.html
Alright so I currently develop on a remote server and use putty for an SSH connection to deal with SVN. I develop with Eclipse PDT only due to the fact that it has the remote system explorer, so I don't have to actually have the files on my local machine to edit them, which is great.
Netbeans is my IDE of choice, and I've been googling for a while trying to figure out how I can possibly make this work with a netbeans project. I can't seem to find any plugins/any statement discussing the possibility of a future plugin/implementation to incorporate this.
Has anyone successfully accomplished this? Are there perhaps any standalone clients I can use to achieve this?
Thanks guys.
you don't need plugins with Netbeans for Svn (Git requires a plugin), you just have to click on "Team" -> "Subversion" on the Menu bar on top.
In "Window" -> "Services" you can browse some stuff like databases or team server too.
There is always the option to set up netbeans to browse a remote folder via ftp ( http://blogs.oracle.com/netbeansphp/entry/ftp_support_added )
You could also use sshfs to create a local mount of the remote folders/files.
I do agree that you should probably be using svn/git/whatever to develop locally and then push to the live site when ready instead.
Note: Netbeans does svn/cvs built in, but git requires the third party nbgit plugin which is still in it's infancy.
I noticed a strange sync problem. I have my project setup as a remote project and everything works fine. I have it set to upload on save. However, if someone on my server is working on a file and saves it. I don't see this change in netbeans and I end up opening a older version of the file and overwriting my colleague's changes when I press save.
Is there a way to have netbeans check the remote server for the latest file before saving?
thanks
No, NetBeans can not check the remote file automatically. It's just not set up to do that. Even if it were, you would still run into problems where you would clobber your colleague's changes, or he would clobber yours.
What you have is a basic version control problem, which is best solved by implementing one of the several version control systems out there (e.g., CVS, Subversion, Git, Mercurial, etc.) and then "building" your website out to the server from version control. Short of that, an imperfect solution would be to partition the files such that you are forbidden to edit files assigned to your colleague, and vice-versa.
NetBeans can download the file for you, but only when you tell it to by right-clicking on the file and choosing the Download command. This downloads the file whether it has been updated by someone else or not.
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.
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
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.
You can use NetBeans for this, you will have your project saved locally but you can set to upload the file anytime when you save that file. Right click on your project, Properties, Run Configuration, Run As: Remote website. Click on Remote Connection: ... Manage and add your FTP account. Don't forget to set Upload files: to On Save. I have had no problem with this configuration and I am working for one year with NetBeans.
For quick editing I am using PSPad.
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.
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?
I currently use Notepad++ for most of my development. I have been checking out other, more full-featured options and would like to switch (I'm in particular a fan of Aptana so far) but there is one thing about Notepad++ that I really like and I haven't been able to get so far.
My current workflow is something like this: Workflow (I tried to embed this image and it showed up in previews but not in the post, sorry)
Workflow http://evanalyze.com/images/workflow.jpg
The process is this:
Download file from web server
Make edits in NP++
Save (this automatically saves a local copy in my default directory, which is also the folder I have setup using Subversion with Tourtise SVN)
When I want to commit a change to SVN, go through the local folder that has an up to date copy
What I can't figure out how to do with Aptana is automatically store a local copy of a file I download from my server, edit and save back to the server. Is there some way to do this? If so, that would solve my problem immediately.
Other options would be a suggestion for a better way to manage the relationship between my server, my editor and my SVN repository. I know Aptana can access my SVN repository too. Is there an easy way to commit changes from within Aptana when I want to (which means I could take Tourtise out of the equation I guess)?
Any suggestions appreciated. Thanks.
I think you're doing things a bit strange.
You already have all your information in an SVN repository, so why not take advantage of that?
You keep a working copy on your computer for development and testing. Save and commit your changes to SVN. On your server, do an SVN export (or checkout, with appropriate server rules to block web access to the .svn folders), and you're sweet!
---------------------- ------------ ---------------
| Local Working Copy | <---> | SVN Repo | <---> | Live server |
---------------------- ------------ ---------------
This means you never have to worry about FTP, or have to figure out which files have been changed locally and hence need to be updated.
Not too sure but I found PhpEd better than Zend for this kind of stuff - especially easy save to FTP.
If you want free general purpose IDE (which supports many languages,as well as Php) - then you should give a try to PsPad www.pspad.com. It can handle ftp very well
If you going to do alot of Php programming - then you have several dedicated (but not free) Php IDEs. PhpEd, PhpEdit, Php Designer, WeBuilder - each one of them have their pros and cons , all of them support ftp .
Eclipse has a plugin called RSE allow you to work on remote sources thru ssh,ftp etc.
You can use PDT but I guess it may work on Aptana as well.
I'm using the Zend Studio For Eclipse which has both SVN and RSE built in.
I'm guessing it's the same in PDT (after installing the RSE plugin), you can either work directly in the RSE perspective or add a remove folder to your project (you can do this only after adding connections in the RSE)
BTW, I found the following link that can give you some more options for remote machine:
http://wiki.eclipse.org/index.php/TM_and_RSE_FAQ#Working_with_TM_.2F_RSE_as_a_User
I currently have Eclipse installed with the Aptana plug-in so I have access to all of the cool features of Aptana.
You can either install Subclipse or Subversive for Eclipse which would effectively take care of needing TortoiseSVN. See: http://subclipse.tigris.org/install.html
Additionally, you can choose between installing and configuring PDT for Eclipse or using the Aptana PHP plugin (I've used both and I don't find that I necessarily prefer one over the other).
Lastly, both Aptana and Eclipse provide ftp and sftp support:
http://www.aptana.com/plugins
http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-cid-857.html
I found Beyond Compare of Scooter Software to be a great tool for such needs.
Beyond Compare is a very valuable file and directory differ and merger for Windows and Linux which also is able to have one of the directories as ftp-link.
Beyond Compare even has a special plugin for source control systems, which unfortunately does not interact with the server, but is able to understand conflicts, for example.