11

On the past 2 projects I've worked, teams prefer a local development environment over a development server.

The one project lead stated that local was better since it didn't require an internet connection. But, this seems assumed when developing.

Which is usually better?

  • 4
    Hard to say which one is better, both have pros and cons. It would really depend on the situation. – DFord Jun 25 '13 at 13:23
  • The answer here is the classic it depends - ultimately it's a matter of convenience. For complex architectures, a mix of local services and shared resources is not uncommon for development (e.g. everything local but that read-only mostly-static data store, might as well just point to the dev server for that). The important thing is that you're comfortable that you're developing in a representative environment and that you have good tests that run in a fully integrated environment. – Ant P Apr 22 '17 at 10:56

5 Answers5

14

The benefits of running local is that you can work without influencing/hindering others. The benefits of a central dev server is that you can test how your changes influence and interact with the changes others are making as they are being made.
Ideally you want to have both. Develop and run your unit tests locally so you can isolate your changes until you're comfortable with them, then integrate them on the team server so you can check integration of changes before things go to the test systems.

Another benefit of a local server on your laptop is that you can work remote where you have no access to the company network and thus can't access the dev server.

jwenting
  • 9,783
10

Actually there are 3 options:

Local development

  • advantages:
    • easy to work with most development tools
    • no need for internet connection
    • not affecting other devs
  • disadvantages:
    • depends on underlying OS
    • might need to run all kinds of server services on your local machine
    • environment might be quite different from production

Local virtual machine

  • advantages:
    • fairly easy to work with most development tools, provided you properly set up folder sharing
    • no need for internet connection
    • not affecting other devs
    • environment might be virtually identical as production
    • server services started/stopped within the virtual machine
  • disadvantages:
    • bit more resources required (mainly amount of RAM, CPU isn't an issue with modern hardware virtualization support).
    • some local debugging tools which would attach directly to server will not work

Shared development server

  • advantages:
    • environment might be virtually identical as production
    • server services on the server
  • disadvantages:
    • remote access
    • changes affecting other devs
    • much harder debugging (either by using remote tools, or logs)

Optimal solution

Use either of local development options and push to shared development server once you have completed self contained part of the feature and your have verified that your code isn't completely broken.

vartec
  • 20,806
3

Your development environment really depends on how your IT Department/Company is organised and run. In general though the closed your development environment matches that of your production environment the better.

If for instance you are developing stand alone desktop applications that require no internet access then of course a local development environment is acceptable.

On the other hand if you are developing a desktop application that requires communication with a remote server/database etc and you do not have network connection to simulate this in work you may find additional bugs in production due to network latency, security issues.

If you are developing an Internet/Cloud application then while you may need the internet to develop the application you will need access to test and verify.

Btw you don't need an Internet connection to have a development server just a local network connection.

armitage
  • 652
2

Do both,

Local development until whatever your working on is done and all tested.

Push to the Shared Server at the end of the day and run integration tests to ensure you didn't break anything.

Why?

  • Its faster to code locally. Less steps between tests, less integration worries.

  • Fault isolation is easier when something breaks only after you push it to the shared server. You know it works fine locally, so it must be something to do with how it integrates with the shared server. If you worked directly on the shared server, then it would be especially difficult to narrow down bugs.

I would do it something like this:

After each person pushes there changes at the end of the day, all integration tests are run, and if any fail, then you know exactly who's code broke to project. Roll back the changes, get the problem fixed locally, then attempt to push it again, repeat until all tests pass, then onto the next person.

1

A lot depends on how you deliver your projects. Some arguments to have a central dev environment could be:

Quality Control: how far do you want to go on testing? Local dev environments have constraints on testing capabilities. Virtual test environments are better suited for load testing and automated system tests.

Central infrastructure can help on shortening your dev-test-deliver cycle. Thus implementing a continuous delivery.

Extra benefits from central development server can be source control, task management, central builds,..

Steffe
  • 271