What can be improved in Yii2?

What the (new and improved) Yii website - the Guide as well - should point out is the wealth of options that people have, after successfully having run the initial basic application.

It is much better to link to, even describe, various options - like CMSs, Gulp/Sass, tutorials, etc. - much better than having official docs that requires something that not everyone is going to be using (like Node.js or Gulp).

As for modern things, Gulp is seriously “yesteryear” isn’t it?

Nowadays, people simply use npm - or I could be wrong: it changes so fast now.


You don’t need to install node.js, to get the things working, a template can use for example sass and have the sass files and also the generates css is the person want to use plain css, can add more css files or edit. If the person want to change the sass file then they need to install the things necessary. This is how Laravel work I think is great, they give you everything needed to use gulp but if you want to use plain css there are no problems with that.

If people have problems installing composer maybe is important to create a tutorial how to install it.

About a month ago I have a project for a laundry management, it requires a frontend with a form to tell the laundry that people drop and a backoffice to manage the laundry received, in one of the forms we need to upload a file. Since the project was simple I decide to learn a little bit about Laravel and saw some video tutorials and after that I select one boilerplate template that have a basic CMS (user manager, file manager, page manager), in 2 days I finish the project, its a clean and simple website implemented using SASS. Using https://www.yee-soft.com/ probably I will achieve a similar website but with a ugly design and without sass for the assets, and why, because yii2-app-advanced only use plain css and the CMS is based on that template.

It’s important to start the things in the official templates, this template will be used in most of the things created with the framework.

That’s actually also how Yii works, if you didn’t know it:

The default UI framework for Yii is Bootstrap.

That means that people can use CSS, or they can use Less (for current Bootstrap) or the Sass official Bootstrap fork.

(Bootstrap 4 is Sass).

There are lots of Yii boilerplate templates available - you can choose the one provided by Yee CMS, or one of the others.

Should Yii have a collection of official templates/extensions ?

As for the ‘basic’ application template, do you want this to be offered in Sass? -> https://github.com/yiisoft/yii2-app-basic/blob/master/web/css/site.css


My word is not Gospel - even though I am talkative.

But I have been around long enough to know what is Yii.

And it sure is not Laravel

No, what Yii needs is a better overview of what’s out there.

Not something that is pre-packaged.

If you want a turn-key solution, why not use Yee CMS ?

Or some of the other alternatives?

And, that’s my point: it is already in place.

The Yii community is large, and there is something for everyone.

There’s even a full fledged, professional grade CMS that you can just install and use: Craft CMS

The community is already providing, so that the Yii team can concentrate on Yii itself.

And that is all that I want to say about this topic - I think I have said more than enough already

Let other people chip in and speak their mind.

OK, I lied, I want to mention this:

The new Yii website is using Sass and Gulp, check out the source code for that.

Maybe the official Yii application template(s) will be upgraded to include support for Sass/Gulp as well when they be upgraded to match the new design?

We haven’t decided yet.

To sum up my opinion on this:

Everything is already here or there.

What Yii need to be better at is to present that to the user, to bring them together.

Hopefully, the new website will help with that.

And, also: if anyone has improvements to make / suggest, Github is a good place to start. :)

Exactly jacmoe the biggest problem in yii the the way the things are presented. With this topic I already find 2 good CMS that I will try in the future.

I thing that is very important have a real time channel more friendly like gitter, since yii team not like Slack. I think the new website should learn a little bit with laracast and have a section for video tutorials, and also text tutorials.

We need a section to present the best modules/templates.

There are simple things that make a huge difference. I don’t want that Yii became equal to Laravel, I love the simplicity of Yii but we can learn somethings from them they created an amazing community around Laravel, I think Yii can do the same.

That’s why I have pushed for a new Yii forum :)

Discourse or NodeBB would be nice.

Because they can be both real-time and topical, and maybe help to bring together people who currently are using other channels.

I don’t wanna start a framework war but everybody keeps talking about laravel does this does that, imagine gulp is not maintained anymore and laravel elixir is based on gulp if you have a large application written in laravel and you upgrade now to latest version of laravel that comes with some alternative to gulp you are screwed, please excuse my language.

In my opinion you are confusing a framework to CMS, Yii is a framework not a CMS I think it is the very reason people prefer using it over many other frameworks.

I agree with you Yii might have some rough edges that can certainly be polished, but putting all that stuff into the framework does not make sense to me.

[size="2"]I would like to see Pagination have direct integration with the Yii2 restful service. I know you can make a custom one but It would be nice to have the default one have the options to be used with restful service. Maybe even have a RestDataProvider that is pretty much a copy of ArrayDataProvider but does the rest call for you when you set a url.[/size]

I would replace Pjax jquery with Barbajs (what i use when i use Yii and haven’t ran into any problems yet. Here is one of the yii2 sites i’ve made with it). You can use it to make the whole site universal/isomorphic unlike the current pjax widget. I don’t use it on the contact page because of the dreaded jquery.

I would make the advance app be a standard basic app for the frontend that consumes data via a restful backend. I would make the backend a basic app with an api module.

I would remove jquery dependencies. I’m not a fan of it at all and don’t use it unless I’m using Yii.

It would be nice if the new site let users suggest edits in the documentation pages that admins just have to reject or accept and not have to do it through GitHub as that requires much more effort and most likely community updates will be far and few as they appear to be now.

As far as the Slack comments I would say no unless it’s free as there is no real money to pay for it.

Get rid of the IRC as it’s extremely outdated way to communicate and just one more thing to worry about.

skworden one note Slack is free, but with some limitations for example you can only search on the last 10 000message, but the free version is more then enough, and for example if you want o pay the pro version you can pay and you will get all the features but only you the rest of the people will get the free version features.

alzari in fact Elixir use gulp, but I think but Elixir is an api to easly implement GULP commands if they change from gulp to other technology I think that can do that almost in a transparent way. But gulp is a very stable technology and Laravel have a huge community so gulp will not die in a near future.

I think Elixir from laravel is a very useful class.

But more important most of the things I talked about are not to be implemented on the Yii2 framework, things like gulp/sass/less should be used on the official templates, now the official template use plain css, most of the people that are starting use that templates and never learn to use technologies like sass, I think a framework like yii should do some forcing to educate the community to use the lastest technologies.

When Yii starts to force new technologies on me - or old technologies for that matter - I would pull down it’s pants and spank it really hard!! C:-)

The whole asset management system in Yii is incredibly flexible and a thing like Elixir is possible to do.

If we look at the current roadmap for Yii, we can be happy that the only thing that Yii forces us to do is embrace PHP 7 because it bumps the minimum requirements up to PHP 7.1.

Other than that, it will remove jQuery as a requirement, which is really nice!

And they are contemplating dropping the advanced application template too.

That’s stepping forward!

Adding opinionated features is not stepping forward!!

Those people are beyond help anyway.

Yii is like a Chef’s knife: sharp and minimal and extremely versatile in a master’s hands.

Let’s not turn it into a Swiss army knife

I prefer the Advanced Template. The problem with the Basic/Module approach is that it messes with webanalyzers for apache…EVERYTHING goes through index.php even when I am work with in ‘admin’