What's the purpose of a dedicated development setup?

I recently set up Frappe using Docker, following the instructions provided in the official repository. The process went smoothly, and now I’m looking to create a development environment for building a custom app.

Initially, I considered setting up a separate server identical to the production system, but with Developer Mode enabled. This would be distinct from my actual production server running the live app. However, I’ve noticed there are separate instructions for setting up a development environment, which appear to differ from the production setup.

This leads me to question:

  1. What distinguishes a development server with Developer Mode enabled from a full development setup as described in the documentation?
  2. What are the potential consequences of developing on a server configured like the production system but with Developer Mode enabled, rather than using the recommended development setup?
  3. Are there specific advantages to using the dedicated development setup that I might miss by simply enabling Developer Mode on a production-like server?

Hi:

Actually developer_mode is not the same that “developer environment”

Hope this helps.

1 Like

The difference between development and production setups is how files are served.

Production setups use an nginx reverse proxy interface to background processes controlled by supervisorctl. Development setups use a much simpler werkzeug process initiated at the command line (bench start) to serve files.

Practically, the biggest difference between these two modes is request caching. Production uses significant caching, which is more performant but requires clearing before changes made to source code will become visible. Development setups are less performant, but changes made are immediate. The werkzeug process also outputs request information and Python errors directly to the screen rather than logs, which can make debugging easier.

There may be other differences, but these are the major ones that I’m aware of.

1 Like

Hey, thanks a bunch for all the awesome answers! I’m feeling way more clued in about the whole Frappe universe (or at least on this topic) now. :blush:

1 Like