Hi Guys,

Im appricating all the developers of the Yii-Framework. You did and do a great job and inspire

many other Frameworks (like Laravel). But I see latly a little lack on innovative steps

and decisions.

Instead of making new features I would start to make changes on the existing features to improve them

radically. Examples could be the whole routing-Aspect and view-Aspect with his own templating language

to make things more easier and innovativ etc.

This are my own opinions after working almost 5 years with the Yii-Framework.


Sounds very interesting although I don’t know what it really means :P

But it could be a completely different project from Yii, I guess. Do you think it’s possible to add the feature to Yii in a way that keeps the BC?

Hi softark

For the idea of the routes, I think the framework could be more decoupled from the controller centred approach.

An easy way to "create" a route-path returning something a view, string or whatever. Your right this would be a havy change on the core of the framework. Most of the frameworks latly follow the route centred approach. Im not saying this is better, but its definitly more flexibel and let the developer already decide on the route level to make decisions before the controller (and controllers behaviour logic).

For the views and layouts, im sure there the Yii framework should go more in the "helper" functions way. When I look at my views, they are heavy like controllers (maybe im following a wrong approach here). but i need to nampespace everytime the Html-Helper class for easy jobs todo etc.

Here would be great to have a good approach to solve this problem. example instead of making this in a view:


use yii/helpers/Html;

echo Html:a(…);


it would be much much more efficient if I could do something like this:

<?= html_a(…) ?>

Or if i want to make a active form:

<?php $form = active_form_begin(…); ?>

<?= $form->field(…) … ; ?>

<?php active_form_end();

What do you think about that?

I personally don’t think that hardcore OOP is the only way to go and every single line of the code must belong to a class but there are a few things to consider:

  • There’s currently no way to autoload functions.

  • Functions cannot be overidden.

-. Frameworks/libraries should not define functions in the global namespace - there’s a reason namespaces added to PHP - so in practice it would be something like:

<?= yii\helpers\html_a(...) ?>

which is uglier than a few use statements at the beginning of the file.


Regarding template engine I would recommend reading this topic:

I personally share the opinion of "Backslider" in this matter.

Best Regards

Laravel features Blade, which I think it totally pointless. And I am glad that Yii team is smarter than that. ;)

There are lots of shiny things in Laravel and it seems to appeal to a lot of people. Especially those who likes shiny things.

I am using Jade for my views and it rocks.

Other people can use whatever they want because Yii is designed that way.

If you want to use your horrible syntax, then feel free to override the html helper and the activeform classes.

Yii allows you to do those things.

And I am pretty sure that you can - if you want - use namespaces globally if that is what makes you happy, so that you don’t have to write it in your views.

Route-centered approach could be done in Yii without much changes and in BC way. The thing is that it’s rarely used in practice despite being in other framework guides all over the place.