The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> A neat way to edit PHP?
Alex McP
post Nov 3 2008, 11:23 PM
Post #1


Novice
**

Group: Members
Posts: 25
Joined: 24-January 08
Member No.: 4,787



Hi there,

So I'm back into editing PHP after a stint away, and I forgot how bad my workflow was. I was to resist setting up PHP on my machine as much as possible.

Is there a way to edit the files on my webhosted site in a "mostly" live fashion?

Right now I'm doing

1) Edit
2) apple-S
3)tab to Cyberduck FTP client
4)drag the new file to the remote directory
5)saying "yes, overwrite it"
6)tabbing to firefox
7)refreshing the page

When I'm just learning, the iterations are fast and furious; what's a better workflow?

Thanks!

Alex
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Nov 4 2008, 12:30 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE

1) Edit
2) apple-S


Editing hasn't really changed for me in (about) 38 years.

QUOTE

3)tab to Cyberduck FTP client
4)drag the new file to the remote directory


I click a button, which I think is more reliable.

QUOTE

5)saying "yes, overwrite it"


Hmm. You probably have the option of turning this off. OTOH, it's a useful bit of feedback -- if it doesn't happen, I've usually done something silly.

QUOTE

6)tabbing to firefox
7)refreshing the page


The only part of this you could reasonably eliminate is the ftp step. I haven't got round to installing a local version still. It's a lot of fiddle, and there's the job of keeping the test version appropriately up to date with the live version.

I think the biggest savings come from more thinking, less hacking. Instead of writing out the first thing that comes into your head, go to bed, and have an Idea. These are usually ways of doing the whole thing slightly better, and Much Simpler.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Nov 4 2008, 03:18 AM
Post #3


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



FTP clients usually have an option to open files in an external app. From there, the file can automatically be saved on the server.

Transmit (and Fetch) work that way and I suppose Cyberduck can too. If you use BBEdit, then you can open files directly on the server through its FTP browser.

It avoids your steps 4) and 5).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Nov 4 2008, 08:55 AM
Post #4


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(Frederiek @ Nov 4 2008, 05:18 PM) *

FTP clients usually have an option to open files in an external app. From there, the file can automatically be saved on the server.

Transmit (and Fetch) work that way and I suppose Cyberduck can too. If you use BBEdit, then you can open files directly on the server through its FTP browser.

It avoids your steps 4) and 5).


Yes, but it also means you only have one copy of the file. And _if_ something goes wrong in the editing process, you have the only copy in mid-air.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 4 2008, 09:26 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



So make a backup. I use FTP enabled editors a lot and those I've tried have been able to do a Save As. I imagine BBEdit can too.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Nov 4 2008, 04:33 PM
Post #6


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Yep, sure.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Tom H.
post Nov 4 2008, 06:30 PM
Post #7


Advanced Member
****

Group: Members
Posts: 129
Joined: 24-August 06
Member No.: 14



QUOTE
... I was to resist setting up PHP on my machine as much as possible.

Recent versions of Mac OS come with Apache and PHP installed, and I find it fairly painless to enable the latter in the Apache configuration file. Installing MyPHP is a little more difficult, but not that bad. (See http://www.entropy.ch/home/)

QUOTE
Is there a way to edit the files on my webhosted site in a "mostly" live fashion?

I use BBEdit for this purpose, but in a pinch, I SSH into the server and use the command line text editor (e.g Pico) my host provides.

I favor editing and saving a file locally, then uploading it to the server, because my work is all on live web sites. That might not be the case for you. Another approach I use is to have live sites duplicated in a "sandbox" environment on the same server, and that's the one I experiment with.

This post has been edited by Tom H.: Nov 4 2008, 06:46 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
SteveL
post Mar 25 2009, 01:01 AM
Post #8


Newbie
*

Group: Members
Posts: 19
Joined: 25-July 07
Member No.: 3,445



I'm not sure how much control you have over your server environment, but for me, the absolute biggest help to my workflow is Subversion. If you can give yourself a subversion setup on your server, I heartily recommend you do so...This will give you a work flow similar to this:

1. Get a local copy of your files to edit, on your own machine.

2. Edit files, save and commit them.

3. Update files on server.

4. Refresh Page.


So...you save a few steps, and more importantly, subversion is a version control system...do something you don't like, and you can always back up to a previously saved version of your code...no danger of making a bone-headed mistake that will take hours to recover from smile.gif.

Given the possibility that you don't have subversion as an option, I say that using the direct FTP editing feature is your best bet...I believe that you can even mount an FTP 'drive' in Mac OS X, so that you can easily access your files for editing through a local application.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
geoffmerritt
post Mar 25 2009, 03:12 AM
Post #9


Member
***

Group: Members
Posts: 66
Joined: 23-December 08
From: Adelaide
Member No.: 7,394



QUOTE

I click a button, which I think is more reliable.

QUOTE

5)saying "yes, overwrite it"



LOL


Have xamp loaded on my laptop, took about 10 minutes to get my localhost working, that will save the ftp and checking the live site until the code is working
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 06:06 AM