Search code examples
localhostdevelopment-environment

Development environment: localhost vs web server


I was going to post this question on Server Fault but I thought of it as a programmer question since what I am trying to implement is just for programmers and some a bit.

There are 4 of us working on a web application. Before I joined the team, there wasn't any type of version control and an proper environment to work in localhost so I am trying to achieve both. Right now the team duplicates whatever the file they need to fix or update, implement on the duplicated file, delete the original, and then rename the duplicated file. Everything is done via ftp to our web server and there is bunch of problem with this approach.

First off, do people in industry work in localhost? I remember one of my professor stating that he never work in localhost without any reasoning but if I could set my localhost as close as possible to my web server, I don't see why not.

Some of my teammates are not strict programmers. So if they have their own working environment ( and due to our resources, we all have different OS ), I or other programmers will have to walk to them and set things up frequently which I would love to do but not so much.

So my plan is to have a single LAMP in virtual machine, each person will have their own directory that they can edit and view so they can have their own repository.

localhost/
    person1/{repository}
    person2/{repository}
    person3/{repository}

Is this approach alright to do?


Solution

  • This will probably be closed, as it's really an opinion question, but here goes. Ideally, yes - you all want to be working a VM on their own machine. Ideally you all use the same vm "image" and make sure it's as close as possible to production - that way you can hopefully factor out any big surprises when you push to stagin and then production. All of you somehow using one VM isn't really practical. Everyone has their own repo inside their VM. You get git or some other VCS involved, and you use that to merge changes into the code.

    This is a gross oversimplication, but hopefully that gets you pointed in a better direction.