views:

115

answers:

7

Hi all,

I've spent some time now developing a web application in php. It has mostly been just for the fun of learning as a side project, but the app now has a few users which I don't want to upset by breaking things as I develop.

At the moment, I have a very rudimentary method for managing the development - I use a text editor (ultraedit) to write the code and use its built in ftp to upload the files to the server. In terms of version control I have 2 domains, and only push files to the "live" domain when they work, but that's it. The domains are hosted on a cPanel shared hosting site which I have some doubts about its ability to handle even minor spikes in traffic. I looked at slicehost yesterday for something more scalable but that looks like a bit of a learning curve from where I am now.

I know I could do better than this, but where to start? I think I need advice on three things 1 - code writing tool 2 - version control / management 3 - scalable hosting

I've deliberately asked these in the same question as I'd like to know if one choice impacts another. Is there a good integrated solution?

Thanks in advance as ever.

+7  A: 

Each part of your question has been answered before. The list below lists some of the common tools to use and links to appropriate searches on StackOverflow. There is no all in one package and going into details about these tools in one question is out of scope, so I am afraid you have to do some digging:

Disclaimer: list is not meant to be complete and order is not important

Gordon
thanks Gordon. I appreciate there is a lot in the question, but your point that there is no all in one solution is helpful. thanks for the list too, it helps to know what I should search for!
Rob Y
+1  A: 

It seems that you're after a robust deployment strategy as opposed to a development one. But, correct me if I'm wrong.

In terms of 'code writing tool', and IDE choice is a subjective discussion. Feel free to work with the one you are most comfortable with, for me this is Netbeans.

As for a deployment strategy, I think it was best summed up in this answer.

Your point about scalable hosting is fairly broad. We will need much better forcasted metrics to give better advice. However, for now, if scalable hosting is a worry then maybe look into some sort of Cloud Hosting.

Russell Dias
+2  A: 

There is a lot going on here. I'll give you my two cents though.

  1. I used to use ultra edit. Now I use netbeans, its a fully integrated development environment and it makes my life soooo much easier. Its free too. I can't imagine ever going back to UltraEdit. Also, which brings me to number two, netbeans has SVN and CVS integration

  2. I would use subversion for version control. In my experience it does everything you need for version control. Others use ones like git and mercurial, but I think SVN is widely supported and easy enough to set up. As far as pushing code to the server, i've begun using svn for this too. I first ssh into the server and checkout the code into the public_html directory, and then set up an alias to do svn updates through the command line... its way easier than ftping in my opinion. There are other deployment methods, but i've never used them. see this question: http://stackoverflow.com/questions/425692/what-is-your-preferred-php-deployment-strategy

  3. obviously shared hosting is not going to handle traffic as well as a dedicated server. But there are lots of things you can do to improve performance before moving to a dedicated server. Check out this article: http://developer.yahoo.com/performance/rules.html

Andy Groff
thanks for the comparison - will def. check out netbeans
Rob Y
A: 

Hi there.

Have you looked at using wamp/xamp/mamp/lamp for development locally? Uploading via ftp for every change is a pain.

You could do that for local and see that everything works, then push it to your test domain and run through it again and then finally push live.

Might want to look at something like SpringLoops for doing your version control - this has the advantage of doing the deploy and then if it goes pear shaped you can revert it (free account gets 3 deploys a day).

I wouldn't worry about scaleable hosting just now, just focus on the site and the coding, you've only got a few users - wait till it starts becoming a problem before moving (however, I suggest looking into options) but don't try and get all cloud ready - might not ever be a problem.

ps, go with Linode over Slicehost.

Wizzard
A: 

Hello,

I think use Aptana Studio ( http://www.aptana.org ). It is an Eclipse based IDE with all the tools you need integrated in it. It has integrated PHP development tools, GIT or SVN for version control.

I've used shared hosting as well. Once an other site on the same server had DoS atacks and my site became unreachable as well. Otherwise it could work in reasonable speed after some optimization. It served 1000-3000 users per day. Dedicated servers are much better. Or you can use Amazon web services. I know they are more expensive.

Adam Wallner
A: 

1 - code writing tool

Zend Studio. I would recommend Linux as well if you are going to use linux servers.

2 - version control / management

SVN + phing (if you are going to build serious applications).

3 - scalable hosting

Amazon or RackSpace.

Elzo Valugi
A: 

For your editor, just use what you are comfortable and productive with. You most definitely should have version control in place. You never know when you need to rollback a version or two.

I always keep at least 3 versions on the production server. I use symlinks to point the web server at the latest version. If there is a problem, you just need to recreate the symlink to point to an older version.

As for shared hosting, you'd be surprised out how much bandwidth you can get. I have a $10/month shared host that gets about 500K page views a month. Generally, it's not that your shared host can't handle the load, it's that the hosting provider puts too many "shares" on the same server. So it depends on how much resources everyone else on the same server is using. If you are having issues, you can always ask to be moved to a different server.

Brent Baisley