Advanced App Usage

Hi,

I wanted to understand the usage of the advanced app more. I can see that it’s separated more. How are you supposed to differentiate between what would tupically go in the front end and backend? Could you give me a simple scenario. Before looking at it in more detail I would assume ‘backend’ to be anything with management of the site by admins for example. Frontend to be what users would see? Is that right?

Also I wasn’t sure what kind of things the environment would set and how dev and prod would differ?

I’m sorry if this is simple. I don’t need a huge answer just a brief pointer so it’s clearer for me.

Thanks

I suppose advanced app template is for large projects, with frontend and backend separated to different hosts(?).

It’s not very convenient for small and medium websites (backend can be done very simply using modules).

Ahh ok so for deploying across multiple servers/sub-domains. I follow. Thanks for that.

What is the role of the environment settings?

Environment setting is to apply different rules for particular environment. i.e. for your development environment you want use gii for code generation but not for production server. Same case applied for debug mode.

You can check some code in web.php at bottom.


if (YII_ENV_DEV) {

    $config['preload'][] = 'debug';

    $config['modules']['debug'] = 'yii\debug\Module';

    $config['modules']['gii'] = 'yii\gii\Module';

}

Here in case of development module debug and gii module will be active.