tags:

views:

91

answers:

5

Hello,

I am new to this, I just reading about how I should not edit code on the live production server. I don't know anything about source control or SVN.

I would like to start coding on a test server then once everything is confirmed working, I want to send all the files over to the production server.

How should I go about this? I am on mac os x and was looking into apps like http://versionsapp.com/ but I am not sure if this is the right solution.

What do you suggest?

A: 

If you're just starting out I recommend you avoid SVN. Try git, there are numerous mac tools, such as GitX for Mac. There's also github and others to host your projects for easy pulling and revisions within a group of people.

asnyder
A: 

There are several ways to do this. Looks like version app is a svn client. Using a repository (svn, git, cvs, etc.) to store your code and to set revisions would be wise.

Here are a couple things you should have on hand.

  • FTP Client (filezilla)
  • SSH Client (Applications > Utilities > Terminal)

I would assume you're going to be using a LAMP stack for production.

Tar up your testing code using compression (-z) into a release package. FTP the package into your production environment. Terminal into your server and un-tar your package into the public html area. At that point go to your browser and check your code.

Brant
+2  A: 

If you are new to web development, I wouldn't suggest jumping into Subversion right away. You should have a firm grasp on Subversion before actually using it in any production environment, as its surprisingly easy to screw things up. Don't let that scare you off, though, as version management (whether through SVN or another avenue) is highly useful.

And if the project in question is small enough, I don't see anything wrong with the old "develop locally then ftp it to the server" approach. Sometimes a full-blown version management tool just isn't necessary.

Greg W
I am not new to web development.
zx
Ok, you said you were "new to this" so I wasn't sure which "this" was referring to :). Anyway, if you are really interested in SVN here is the guide that I used to get started. http://blog.circlesixdesign.com/2007/04/12/svn-getting-started-2/ I can also vouch for Versions.app being really nice, however I still find myself using command line more than anything.
Greg W
Sorry, I should have been more clear! The link you provided has some very useful information. I guess I will stick with command line as well then :-)
zx
A: 

Just go with SVN as it is the basics. After you get a taste of it you can explore the alternatives like GIT or whatever.

You should learn to do the basic SVN stuff through the console, there is no other way especially if you are going to work on a live server. Your live server should have SVN installed and some SSH access so you can execute your SVN command there.

You can also get TortoiseSVN which is a nice visual client for SVN.

The basic SVN you are going to use is those 3 commands:

svn co - Checkout svn ci - Commit svn up - Update

There are tons of tutorials of how to do stuff, here is the first one from google: http://paulstamatiou.com/how-to-subversion-basics

After you feel comfortable with that stuff and when you start working with team and contribute to public repositories you might start exploring the advanced stuff like branches, tags and all other terms that make some people feel important when they mention them.

This versionwhatever.com I would hold for now and explore the popular choices, before specializing, especially that SVN works on UNIX and you can put it on Linux which runs most of the web hosting out there.

Cheers!

Ivo Sabev
A: 

Whether or not a SVN deployment strategy is appropriate depends on factors such as the size of the site, your familiarity with using the command line, and whether you are working as part of a team.

It is worth noting that in most shared hosting environments you won't have the option to install SVN on the server, which narrows your options somewhat!

I don't think there is anything inherently bad about using good old fashioned FTP to get files up to a server, especially for smaller sites where you are the only person working on the site.

Even then, SVN can still be very useful. I keep all my sites under version control even if they are going to be deployed by FTP.

Jonathan Nicol
Cool, thanks.I am solo right now, but am going to be working with a team soon so I wanted to get familiar with it.
zx