Doubt about kind of project

Hello friends

I’m studying Yii 2, and I have some doubts

  1. For each new project I need create using a composer? This line command:

composer global require "fxp/composer-asset-plugin:1.0.0-beta4"

composer create-project --prefer-dist yiisoft/yii2-app-basic MyNewProject

Or after I create one , I use for all projects?

  1. When create a new project I use this line:

composer create-project --prefer-dist yiisoft/yii2-app-basic MyProject

And this line have this part yii2-app-basic. What this means? About basic? There are other ways? Whats difference?

Should be done only once per computer you’re working on.

Should be done once per project.

  1. http://www.yiiframework.com/doc-2.0/guide-tutorial-advanced-app.html

Thanks for help.

I read the documentation about advanced template, and the differences are:

Front- and back-end apps

Ready to use User model

User signup and password restore

I have a doubt about Front- and back-end apps, when I use Yii 1, to work using mvc is very easy, I create a controller, in a actionTest for example, and I make a render to view, very easy.

I read the guide to use the basic in Yii 2, and the same way Yii 1 I can create in controller the render to view. Using Yii 2 advanced is different, the backend is divided from the frontend, is good, but the way to work is different? If I create a controller I cant render directly to view? I did not understand.

Yes, working with advanced app is kinda different but it’s only about the strucuture. It’s still MVC and it’s still Yii so nothing changed about rendering views etc.

Thanks for informations.

One more question.

I will start a new medium-sized project, my team has 4 members, the app work with 2 defferent databases, we have a server to database and another server to app. In this case whats the better template? Basic or Advanced? We have a designer working in front end and developers working in back end, but the app will run in one server.

I ask this because the documentation mentions:

This template is for large projects developed in teams where the backend is divided from the frontend, application is deployed to multiple servers etc.

But my team work together on company. I think I did not really understand the difference between basic and advanced, for me is the same.

:blink:

backend in this context mean admin part and frontend means public part. It’s not about serverside and clientside. You can easily stick with basic template if you don’t plan to divide your project into separate applications. Basic is pretty fine for teams and doesn’t affect your designer in any way.

The difference is in directories structure and entry points only. advanced suits applications that are mean to be run on separate domains/servers better. That’s it.

I get it. Thanks