Basic App or Advanced?

I have a Yii 1 website, but I am changing my business model and totally rebuilding a new site from scratch (might as well go Yii 2). I am wondering if the basic app will be sufficient. I am on shared hosting, I’m the only person writing code and the only one who needs admin privileges.

In Yii 1 I could restrict access to admin views with accessRules(). Could I do something similar in Yii 2 basic?

The basic app should be sufficient for your case.

For one thing, the advanced app is meant to be deployed as an multi-host app for which you’ll have some difficulties with a shared hosting.

I’m now working on an in-house app on a local network which will have about 200 users. The app must implement a bit complicated role based access control system. And I selected Yii 2 and the basic project template as the starting block for it.

Am I doing right? Of course I am. I’m quite satisfied with the out-coming result.

I agree with @softark. For you project Yii basic is sufficient.

You shoud see the PHP host requirements, if it have PHP 5.4 or higher.

Yeah, you could do a restrict access to, in the DOC have an example to do it. Yii basic has an implementations using "hard-code" to do a login, but it you change easily to data base login.

I’ll post this here to save starting a new thread.

I am still a little confused about the difference between the basic and advanced app.

I am about to start a new project which will be the building of a site that will be in the same vein as that for an employment agency - there will be a separation in user types, most notably admin users and basic users (public viewers of the site). I will need a backend for the creation of new candidates, jobs etc so the idea is to have www.website.com and admin.website.com.

I am unsure of which template I should use. I might have missed it, but is there some user requirement that clearly separates one template from the other? The obvious requirement I have is access control and views/layouts. I am unsure if I should use the basic template or simply change layout files as per the controller being run?

As always, any help greatly appreciated!

U4EA

U4EA, In your case you should choose Advanced template. This structure, is already separated in frontend and backend.

The template cam be changed for both structure (frontend/backend) separated. You can use a same model with both structure, olny use a common directory.

For other explanations see the guide. Doc Yii 2

Thanks guys. The advanced template it is then!

I assume the idea for the login would be to have entirely separate login tables for the front and back ends?

If we don´t can use composer how can we use and install advanced instead of basic ?

on my shared webhost basic work fine … advanced don´t …

My webhost tell me I can not use composer so need to install it manually …

I am a beginner and need some help to get starting ;)

Hope someone can help me find out how to install advanced so it work on a shared webhost …

I mean a guide / tutorial how to do it … so even a beginner as me can understand it ;)

Thanks …

IMO, "advanced" + "shared hosting" is the most difficult type. No need to choose it unless you definitely need it.

I try to make a little community site for my users with a registerform and a loginform

using frontend for users and backend for admin …

so I should use basic and not advanced ?

seems I had misunderstand it all …

must try understand the difference between basic and advanced …

Try this maybe: https://github.com/mickgeek/yii2-advanced-one-domain-config

Thanks …

I have an advanced application in a shared webhost, but I put the files there by FTP. To make it point to frontend index, I created a index.php in the root using a redirecting meta.

Thanks I will try it …

This confuse me :

Basic is very easy to install and use on a shared host.

Advanced seems must be installed with Composer.

Had google in days now and can not find any tutorials how to do it without …

this make it very difficult for people who need install it with ftp access and not use composer.

Hope someone can make a tutorial here on the forum how to do it for advanced …

I am sure I am not alone to need this ;) Thanks guys …

I have gone over the documentation, and I am a little confused about how to recreate the access control which in Yii 1 included ‘admin’, ‘@’ and ‘*’. In Yii 2 I see ‘?’ for not logged in and ‘@’ for logged in. I don’t know if I’m supposed to customize the Access Control Filter to add ‘admin’ or just use a very simple RBAC with just admin, and everyone else for roles.

Also I read the part about password security, and would like very much to follow the guidelines therein. The guide shows bits of code that I am not sure where to put them.