Web Development Best Practices for Small Teams

javascriptpythonweb-development

Currently developing a web app in a team of two maybe three in the near future. Tech stack is at the moment : flask, mongodb, and extjs for the fontend. I currently have the project under version control using mercurial and bitbucket.

Question

What is exactly the best way to work as a team on a we app peoject? I ussually work on the back end while my colegue works on the frontent. Sometimes i also help out on the front end. How should we do this? Each has a repo on their system but whee is the web server started? Curentlly i have it on my computer but that means that my partner needs to commit and push for each modification and i need to pull the changes and merge for each change. And for frontend stuff there needs to be a lot of changes.
We tried having a server started on each of our machines but its a pain with multiple mongodb servers.

Anyway any tips, clues and advices are greatly appreciated and welcomed.

Best Answer

I've worked in multiple projects in a similar environment to what you describe. In my experience something like this works pretty well:

  • Each developer should have their own development setup - servers, databases, etc.
    • You need to be able to test your work quickly and without disturbing other people's work
  • You also should have a "testing" or "staging" server.
    • This is where you should try to keep an environment as close to your production system as possible.
    • You should test your code here before moving code into production
  • The source control repository can be kept on a server as well. (This could be your staging server too, you don't necessarily need a separate one)
    • Although mercurial keeps copies of the repos on the dev machines, it's easier to keep everyone updated if everyone pushes their changes to a central repository.
    • You can also do deployments to staging/testing and later production more easily if all the code is in a central location.

To address some of your problems...

At least with SQL databases it's relatively simple to keep the database shared. You can just take dumps of the data and copy it over to the other people.

You don't necessarily need to have the same exact data on all developer's computers. It should be enough they can perform testing etc. with the data they do have.

The testing/staging server should preferably have the same data as your production server - this is to ensure your code gets tested in a realistic environment before it's moved to production.

Related Topic