Home Download Buy Blog Forum Support

Built-in FTP

Built-in FTP

Postby ArtDesire on Thu Dec 27, 2012 11:46 pm

Hi there.
It would be nice if Sublime 2 will have it. Currently, all FTP plugins are buggy enough.
I love ST2, but I have to use ST2 & NP++ 'cause NP++ has built-in plugin.
FTP plugin in NP++ is pretty well, except one thing: it download files and save it in hdd before using. In this case, it has many problems.
Why built-in, instead of plugin - it won't have problems like NP++. For example, if you saved file, but there's an error in FTP plugin with saving to remote destination, text editor will think that file successfully saved, although it won't.
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Built-in FTP

Postby iamntz on Fri Dec 28, 2012 4:44 am

Although built in ftp would be something nice to have, it's totally not a valid criteria to ditch the editor.

If your work is mostly based on working remotely you are doing it wrong...
iamntz
 
Posts: 896
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Built-in FTP

Postby ArtDesire on Fri Dec 28, 2012 5:27 am

iamntz wrote:If your work is mostly based on working remotely you are doing it wrong...

what are you saying!?
Last edited by ArtDesire on Fri Dec 28, 2012 7:40 am, edited 1 time in total.
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Built-in FTP

Postby iamntz on Fri Dec 28, 2012 6:21 am

First of all, be polite.

Second, working on FTP is wrong because of security and reliability. Your problems with N++ are not with N++ per se, but with working directly on FTP. It's just a matter of time until you screw the server (i know, you work this way for years, nothing wrong can happen on your watch)

Try a slightly advanced solution: either deploying via Git or using a dedicated solution: capistrano and phing are the most known.

Bottom line, working directly on FTP is wrong.
iamntz
 
Posts: 896
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Built-in FTP

Postby ArtDesire on Fri Dec 28, 2012 7:39 am

Sorry if my message seems impolite. I was confused.
Thank you for recommendations, especially for git.
I almost didn't work with it.

So, if I understand it correctly, I can work with git on active project(I mean on web-server directly), right?
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Built-in FTP

Postby iamntz on Fri Dec 28, 2012 8:06 am

So, if I understand it correctly, I can work with git on active project(I mean on web-server directly), right?


Wrong. You develop/debug locally. When you are done, you commit to git then push on server. Sounds more complicated that it really is, but is better in any way than working on FTP directly.

Read here and here (also a search for deploy with git on google would be helpful)
iamntz
 
Posts: 896
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Built-in FTP

Postby ArtDesire on Fri Dec 28, 2012 8:37 pm

iamntz wrote:You develop/debug locally.

I'm working with php and mysql, and I can't develop/debug it locally.
Thanks for the links.
You changed my mind :D
If it's not hard for you, tell me plz how can I set it up.
I wanna to set my webserver www folder as main repository and simply edit it in my pc. Do I need to install git to the webserver, which commands do I need?
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Built-in FTP

Postby SeanWcom on Sat Dec 29, 2012 4:06 am

I think you're going to need to start with baby steps. I understand the need to work directly on an FTP server in some cases. My parents own a small catering company. I edit their site directly on the server. But most things I do, I've begun embracing Git.

Based on your questions, it sounds like the first thing you need to learn is how to build up a local development environment. Lucky for you, you're doing PHP/mySQL development. Look into WAMP solutions (That stands for: Windows Apache MySql PHP). If you're on a Mac, look for MAMP solutions, and LAMP solutions if you're running a linux distro. See http://www.wampserver.com/en/ for more. These are easy to setup development solutions that don't require you to do much php, apache, or mysql configuration to get a working environment running.

Once you get a local website up and running the next big question is this: can you create a local copy of what you've been working on remotely? Hopefully what you're working on directly thru the FTP server is small. If so, copy it down and make the necessary tweaks to get it working correctly (path and database changes in config files for example). These tweaks aren't something that we're going to be able to help with -- it just depends on your code and how it works. This includes copying down the mySQL info (or at least a subset of it).

Once you've gotten that far, now you need to start thinking about changing your coding mindset. Now when you hit save, you aren't saving to an FTP server. You're saving locally. The idea here is that you make changes on your desktop. If you're working on a bug, fix the bug. Then copy up ONLY the files that you've changed. If you're working on a new feature, finish the feature and copy up only the feature specific files. This is where a Git repository comes in handy. Git will track the changes to your files, allow you to commit changes, then deploy those changes (among MANY more features).

So for now? Forget Git. Work on getting a local development environment running. When you've got that working, learn to code locally, then deploy. When you realize how difficult that is to do manually, THEN start learning Git.

If you've read all that and you think, "screw that, I don't have time to learn that much" then here's an alternative solution. If you must work remotely, then download a copy of WinSCP and setup your FTP connection with that. Inside the options for WinSCP you can define what text editor to use for ascii files. Find the path to sublime text. Now, do all your FTP browsing in WinSCP and double click a file. It will open in Sublime Text. Now in ST, you can make your edits and hit save (or CTRL-S) and WinSCP will upload the file for you. This method is what I used before I embraced Git. In fact, I used it with N++ because it was better than the FTP stuff that N++ had.

That's my two cents anyway - everyone works a little different though, so find what's comfortable for you. Good luck! :)
Multiple selections... one of my favorite ST2 features. View some noob-friendly screen casts here.
SeanWcom
 
Posts: 101
Joined: Wed Aug 03, 2011 1:31 am
Location: Georgia

Re: Built-in FTP

Postby ArtDesire on Sat Dec 29, 2012 7:26 am

Thank You for such many words! :D
I want to start working with git, but I still don't want to create a local development environment (and I have a big project :D ).
I understand it's not good solution, but...
ArtDesire
 
Posts: 26
Joined: Thu Dec 27, 2012 9:41 pm
Location: Canada

Re: Built-in FTP

Postby iamntz on Sat Dec 29, 2012 7:48 am

but I still don't want to create a local development environment

Do you have one good reason for this?
iamntz
 
Posts: 896
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests