Yii Framework Forum: Yii2 which version choose, basic or advanced - Yii Framework Forum

Jump to content

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

Yii2 which version choose, basic or advanced my test article Rate Topic: -----

#1 User is offline   pceuropa 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-October 14
  • Location:Bruxelles, Belgium

Posted 06 March 2017 - 05:15 PM

I wrote article Which Yii2 project template to choose, basic or advanced? Could I ask check my article ? grammar, ideas. Thanks for any feedback.
My Yii2 extensions | BOINC Science Project: Universe@Home & Radioactive@home
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,543
  • Joined: 10-October 10
  • Location:Denmark

Posted 06 March 2017 - 06:06 PM

I strongly disagree :)

The basic does indeed have a console end, so you are wrong there.

The basic is a great starting point for all Yii 2 applications, except those very few that actually need two separate applications (frontend/backend).

I am using the basic application template for 99% of my Yii applications.
Including many with admin functionality.

That you need two separate applications to have a backend is wrong!
Because, and I think it's better in almost all cases, you can use a module.

So, the difference between basic and advanced is only this:
Basic -> one application.
Advanced -> two applications with shared code.

What I've found is that advanced application template will give you a lot of complexity compared to the basic application template.
And it does not really offer any advantages.

I am building several big and advanced projects based on the basic application template.

Can't really think of any reasons why anyone would use the advanced template.

Other than maybe that they don't want to use a template which name is "basic" Posted Image
"Less noise - more signal"
3

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,543
  • Joined: 10-October 10
  • Location:Denmark

Posted 06 March 2017 - 06:08 PM

Having said that: great to see Yii 2 articles! Kudos for writing it. Posted Image
"Less noise - more signal"
1

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,543
  • Joined: 10-October 10
  • Location:Denmark

Posted 06 March 2017 - 06:18 PM

In my opinion, they really should be renamed to 'one' and 'two' - because the basic is not really basic and the advanced is not really advanced (over-engineered, yes).

..

Yes, I know that all of us really want to be using the 'advanced' application template, simply because it sounds better than 'basic', right?

Sorry for the rant. Posted Image
"Less noise - more signal"
0

#5 User is offline   pceuropa 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-October 14
  • Location:Bruxelles, Belgium

Posted 07 March 2017 - 03:25 AM

Many thanks for your help :) , I will think about it and improves.I probably agree with most of the changes .
But you look at it as someone with advanced knowledge. I would want to approach this issue from the side of someone for the first time faces a choice.
The aim of this article was to show that the choise of Yii 2 Basic Application Template(that I missed). is often a better choice.
My Yii2 extensions | BOINC Science Project: Universe@Home & Radioactive@home
1

#6 User is offline   pceuropa 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-October 14
  • Location:Bruxelles, Belgium

Posted 07 March 2017 - 04:35 PM

Ok, I corrected text. The first time I did not have idea I can expand admin panel using modules. Now I am richer for this experience. :rolleyes:

You can still consider that change is to small. But I'll wait with further changes to the time to get a new level.
My Yii2 extensions | BOINC Science Project: Universe@Home & Radioactive@home
1

#7 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,543
  • Joined: 10-October 10
  • Location:Denmark

Posted 07 March 2017 - 08:00 PM

I agree with your re-written article - great work! Posted Image
"Less noise - more signal"
1

#8 User is offline   samdark 

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

Posted 08 March 2017 - 06:28 PM

Thanks for the article. Post it to http://yiifeed.com/ to get more readers.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
1

#9 User is offline   newbiedo 

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

Posted 20 March 2017 - 06:55 PM

As a newbie I find this helpful, even though I have already been through this choice, started with advanced and rewrote the app using the basic. I didn't really need two applications, just a section only available to admin, managers and staff, customers only need the "frontend".

It was not that hard to create a pseudo backend with an admin module, using RBAC to control access. Doing it this way solved a lot of problems by not creating the problems in the first place like, "How do I get it to redirect to the Home page of the frontend when I log out of the backend?", and other similar issues.

I wound up having to co-opt the User MVC from the Advanced into my Basic app, which they should do with the basic out of the box anyway, in my opinion. The docs tell you why you should replace what they give you (demo-demo, admin -admin), and what to replace it with, which turns out to be what they give you in the advanced version.
1

#10 User is offline   mmx 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 20-June 11
  • Location:Virginia Beach, VA USA

Posted 21 April 2017 - 11:24 AM

The advanced template or a variant of that template are best suited for projects where you need to use a single backend to manage a domain with one or more subdomains, or for intranets where an IT manager wants to manage the net from a single access point.

However, if you build MVC triads as self-dependent modules (i.e., as self-dependent as possible) it's fairly easy to switch between the basic, advanced or custom templates if you always store your shared files in a common directory. That is, make the modules as reuseable as possible without breaking Dry and Kiss principles. Modules can have their own config files, message files, custom components, etc. Using a common directory with the basic template makes it possible to switch between templates easily because the base URLs and paths for common files are standardized. This avoids changes to the use statements in the various module files. For basic, this involves introducing the bootstrap.php from advanced. I can think of a few other approaches to achieve the same code reusability requirements (e.g., composer).

To make modules as independent as possible, it makes sense to incorporate the admin MVC triads into the module within the directory structure or as a nested submodule. Then access those triads through your menu routes or other navigation system.

In any case, I think of the basic and advanced templates as example templates. It's fairly easy to modify the basic and advanced templates to create custom variants. Yii pretty much lets you build custom templates to suit your needs and wants.
1

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