Yii Framework Forum: Why don't you use the app-basic template? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Why don't you use the app-basic template?

#1 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,500
  • Joined: 16-February 11
  • Location:Japan

Posted 25 December 2017 - 10:03 AM

Merry Xmas and a Happy New Year in advance, my dear friends!

Reading the various posts in the forum, I wondered so many times why the poster wanted to use the app-advanced template, while the app-basic template looks quite appropriate for his/her current project. Sometimes it looks to me that he/she is only making things complicated and tough by adopting the app-advanced template, especially when he/she is going to deploy both the front-end and the back-end apps to a shared hosting service. It doesn't make sense.

There seems to be too many people with relatively less skill and less resource who try to use the app-advanced template only to lay an unnecessary burden to themselves.

I think we have to clear up some misunderstandings about the app-basic and the app-advanced templates.

1. The app-basic is only for the front-end.

They seem to have a misunderstanding that the app-basic can not have administrative pages, thinking that we need to use the app-advanced when we need some administrative sections.

But it's not true, of course.

By constructing an appropriate RBAC structure, it's fairly easy to have the administrative pages that can only be accessed by the administrators of the system along with the front-end pages for the ordinary users.

We may also have a separated administrative module for the administrators in the app-basic template.

2. The app-advanced can easily be deployed to a shared hosting service.

I have to admit it is possible to use the app-advanced template for a shared hosting environment. The document also describes how to do it.

But the modification of the app-advanced template for a shared hosting service is not very simple and easy. IMO it's so tricky and twisted that no one with a common sense would not like to try. And it's less efficient than the app-basic for a shared hosting.

I'd like to hear what you think about it, my dear friends. :)
3

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,196
  • Joined: 17-January 09
  • Location:Russia

Posted 25 December 2017 - 02:20 PM

Good topic. I'd love to hear about it as well.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark
0

#3 User is offline   jimgwhit2 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 27-September 17
  • Location:U.S.A.

Posted 25 December 2017 - 03:12 PM

Basic or advanced really makes no difference if you write your own admin area and code your own stuff.
I have found it better to ignore

Quote

The Yii Way

or

Quote

The Laravel Way

I generally follow the

Quote

PHP way
.

That way if I have to change an application from laravel to Yii2, or cakephp 3.X, it is so much easier.

I also find it so much easier to write regular sql and stay away from active record on complex queries.
Though I do like the query builder in both Yii2 and laravel.
Like
$dogs = (new \yii\db\Query())
                ->from('dc_dogs')
                ->where(['adopted' => 0])
                ->orderBy('sex ASC')
                ->addOrderBy('lastedit DESC')
                ->limit($rowsperpage)->offset($offset)
                ->all();

0

#4 User is offline   Arockia Johnson SR 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 194
  • Joined: 25-June 13
  • Location:Singapore

Posted 25 December 2017 - 09:04 PM

Hi Guys,

I was expecting exact topic to discuss.

As a Yii Developer, I am very comfortable and convenient that the basic-app is best and easiest way to implement any scalable web apps.

Till now I have used Yii 1.x and 2.x for building large scale applications to small web apps and even for building Mobile API's.

My vote is for yii2-basic!

I accept yii2-advanced has many features, but why we should complicate ourself? unless there is a need and the situation matches to go with advanced!
மகிழ்ச்சியாக குறியிடுங்கள்!..... Happy Coding!.....


Thanks & Regards,
ஜான்சன் ( Arockia Johnson SR )
www.arojohnson.tk

Hit (+) button If my replies really helped you!
1

#5 User is offline   alrazi 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,533
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 26 December 2017 - 12:36 AM

I agree this is an important issue far to many users go for app-advanced when they can simply use app-basic, I don't exactly know what the reason is, I figured it had to do with the size of the app maybe they working with large project. As it turns out @softark is right many users just use it to have an admin site as well as front site and they think app-advanced is the right way to do it, they can simply get away with a module or even with RBAC as @softark mentioned above.

Also another thing I have noticed many of users using app-advanced and have no clue how to deploy it be it shared hosting or even a ec2 instance and a lot of them don't even know what init scripts are.

I think we should highlight this somewhere or perhaps create a docs page maybe.
1

#6 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,196
  • Joined: 17-January 09
  • Location:Russia

Posted 26 December 2017 - 04:47 AM

https://github.com/y...yii2-app/issues Most probably we'll have only one template in Yii 2.1.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I can work more on Yii: https://www.patreon.com/samdark
0

#7 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,500
  • Joined: 16-February 11
  • Location:Japan

Posted 26 December 2017 - 06:07 AM

http://www.yiiframew...031#entry309031

Jacmoe had already posted almost the same opinion on it long before my post.
0

#8 User is offline   newbiedo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 28-June 12

Posted 26 December 2017 - 10:03 AM

When I was making this choice, I knew I wasn't on shared hosting, I needed a backend and frontend and liked that in the advanced app, the user authentication was already there instead of being hard coded demo/demo, admin/admin with the need to build or copy an authentication structure. Our server was managed by my mentor who let out an audible groan when he saw that I had uploaded the advanced app to our test site. Then I got the message about using a module for the backend, and RBAC all within the basic app.

I believe there are some versions of the basic app that include user authentication. Failing that, the authentication from the advanced template can be made to work in the original basic app.
2

#9 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,500
  • Joined: 16-February 11
  • Location:Japan

Posted 26 December 2017 - 06:05 PM

The difference between the app-basic and the app-advanced:
yii2-app-advanced guide > Comparison

The difference boils down to 3 features, and 1 limitation:
  • Front- and back-end apps
  • Ready to use User model
  • User signup and password restore
  • Requires 2-host configuration (which should be in the comparison table 8) )


Front- and back-end apps
The 1st one can easily be accomplished in the app-basic by making use of module.

The problem lies in the next 2 features. The less experienced the developer is, the more attractive they look to him/her.

Ready to use User model
We definitely need User model, but with a different spec from the one that the template supplies. We usually need to create different User model project by project according to its business requirements.

Do you need the template to do it for you? I always do it for myself using Gii.

User signup and password restore
The same goes much more for this feature. It's too specific as a template feature. We might as well call it an example or a demo.

IMO these 2 features should not have been included in the app-advanced.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users