2 edited body
source | link

Yes you will need to run bin/magento setup:di:compile everytime when you added new classes with dependencies (constructor parameters) or changed dependencies of existing classes.(di.xml)

Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.

While developing your extension in magentpmagento 2 and upper versions whenever you change any custom logic or some front end side operations there is no need to run this command . But if you change something in either di.xml or class ,factory method etc etc ... then you must need to run this command.

Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html

Yes you will need to run bin/magento setup:di:compile everytime when you added new classes with dependencies (constructor parameters) or changed dependencies of existing classes.(di.xml)

Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.

While developing your extension in magentp 2 and upper versions whenever you change any custom logic or some front end side operations there is no need to run this command . But if you change something in either di.xml or class ,factory method etc etc ... then you must need to run this command.

Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html

Yes you will need to run bin/magento setup:di:compile everytime when you added new classes with dependencies (constructor parameters) or changed dependencies of existing classes.(di.xml)

Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.

While developing your extension in magento 2 and upper versions whenever you change any custom logic or some front end side operations there is no need to run this command . But if you change something in either di.xml or class ,factory method etc etc ... then you must need to run this command.

Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html

1
source | link

Yes you will need to run bin/magento setup:di:compile everytime when you added new classes with dependencies (constructor parameters) or changed dependencies of existing classes.(di.xml)

Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.

While developing your extension in magentp 2 and upper versions whenever you change any custom logic or some front end side operations there is no need to run this command . But if you change something in either di.xml or class ,factory method etc etc ... then you must need to run this command.

Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html