Reputation: 433
I'm a newbie in the field, but in the near future I have to develop an application for a friend(I've already did some work of the app and the friend is happy).
I assume that I need 3 places to store my work, but I'm not sure if this is the best approach. I need your advice, opinion, link,book, blog about this subject.
I plan to have:
I'll use git in the development stage, but for the later I don't know what tools to use, or which are the good practices. Can you give me an advice?
PS: at this moment I'm using cakephp to build some webapps, but I play with C++ from time to time too.
Upvotes: 14
Views: 2562
Reputation: 19940
1: a place where I develop the application
This would be you local git checkout.
2: a place where I keep a back-up of the application
Do you mean the sources or any compiled result? For the sources you can
With either way you git push
your commits into the remote repository to have a backup of your work.
3: a place with the application ready for use
There is no definite standard on the storage of compiled results. Typical the results are stored with a defined numbering scheme on a file share/web server/whatever.
I'll use git in the development stage, but for the later I don't know what tools to use, or which are the good practices. Can you give me an advice?
As @Navi already said, an automated build tool is a big plus. A best practice is to have a one-command build, which means that you need to run exact one command to build the complete software after a checkout.
You should also consider a continous integration system, this is a software which monitors a central source code repository for changes and automatically builds the software in a clean room environment when it detects something new. CI systems are especially handy if there are many (>1) people working on a software product, since they can show broken builds very quickly.
Upvotes: 8
Reputation: 8443
A lot of people have talked about having an issue/feature tracker for your work. If it is only you that is doing work I recommend you to have a look at FreeMind.
Mind mappings is an excellent way of keeping track of the tasks and things you need to do for you project. Write down any thought that you want to keep, but you don't have time to do right now.
Edit: I added an example for a task for an expansion in my open source project:
Upvotes: 1
Reputation: 2111
Most good advice has already been given:
In addition, I also recommend
I find it important to keep track of what's left to do and how important it is, differentiate between bugs, improvements, necessary tasks and nice-to-have items and so on. It's easy to get Lost In Development and forget stuff - programming requires you both to dive deep into the inner workings of code, and to keep the overall structure in mind. You'll need something to keep your mind free from all those "and I'll have to do this as well" things. Sticky yellow papers don't work that well, nor do writing pads, since with more than, say, 50 items, paper makes it hard to keep track.
There is software for that. Use it.
Upvotes: 5
Reputation: 1408
Upvotes: 1
Reputation: 3219
Store your code on http://www.github.com. If you need the code to be private, you can create a hosted, private repository for a nominal fee, which will satisfy the first 2 of your requirements.
If you are looking to store the code and host the site, there is a cloud services company called PHP Fog ( http://www.phpfog.com/ ) which will host the code and have it ready to use (requirement 3).
Upvotes: 1
Reputation: 9519
Here's the best practice for high productivity, yet straight-forward enough for a newbie.
Setup a local dev environment. Use a VCS like TortoiseSVN or ideally use something that fully-integrates with your IDE. I use Aptana with Subclipse to develop PHP apps.
Setup nightly scripts to auto-backup your VCS remotely.
Get a remote dev environment setup (ie, dev.mysite.com). Use for live server testing, client proofing, UI feedback testing, etc.
If there's a need, setup a staging server (stage.mysite.com). Use for live integration testing, feedback testing, etc. If your projects are small enough you can usually skip this stage and just use you dev environment for integration testing.
Setup a production environment (www.mysite.com)
Don't over-engineer your workflow... your time is precious. For now, I would say start with this, get some experience under your belt and then you'll know how to refine your workflow.
Upvotes: 3
Reputation: 7576
I have found a minimal set of code is development and release. Some sort of version control is essential. I use HEAD for development, and branch on release. Backup your repository, or at very least have it on a different disk from the one(s) used for development and building.
I prefer to have three sets of code: development, testing, and release. Each should have an automated build environment. These are build environments. For development, only a single set is needed.
You can use GIT for development and production, but the workflow is different than you would have with CVS or subversion. Look at the ProGIT online book to understand the flow.
Avoid coding in the environment to the application. Any environment dependencies should come from the configuration of the environment. It is nice to display some indication of the build and environment in the interface.
Upvotes: 2
Reputation: 3172
Quick-and-dirty workflow for single developer, who don't use any version control sw:
If you're using a db, there would be one database versions for each program version.
Upvotes: 1
Reputation: 8736
Common practice is to have a dev, test, integration test and production environment. Integration test and production will be more or less the same.
I suggest that you use some kind of build tool as well. It's not clear from your question what kinds of platforms / technologies you are using, but there probably is one suitable for you.
If you are using Maven, then the convention is to have the distinction between stable releases and snapshot experimental versions.
Upvotes: 7