type of Modes in Yii2

[size="3"]What is difference between three Mode in Yii2([color=#222222]maintenance mode,[/color][color=#222222]development mode,[/color][color=#222222]production mode[/color])?[/size]

Here: http://lmgtfy.com/?q=development+production

For example you have a setup like this:

  • Dev = your local machine. (If ready developed move to Test)

  • Test = testing your new developments if any problems occur (if not move to prod)

  • Prod = your website accessable by any user.

For short:

Every environment has its own configurations.

Including own Database, Own Tools / Components or whatever you want.

(For example in Yii you usually have enabled “DEBUG Toolbar” and “Gii” on DEV… but you don’t need / want this tools be available for page-users, do you?)

Reason / Example explaination

Lets say you have a client and he wants a new feature in his "production" website.

You code directly in production and make a mistake and break the website.

And now?

The Website of your client is not working until you have solved the issue.

Who do you think has to pay for the time the website was not reachable?

(A small hint: The client will tell you "everything worked until you came and did something")

So would it make sense to code the new feature in a seperate environment and test it before you actually do something on the "production" website of the client?

Yes it makes sense.

Hope this answers your question.

Regards