Why Yii3 does not support PJAX and Cubrid DB no longer?

I am curious about the reason that removed PJAX and Cubrid DB support in Yii3.

I am not sure about the particular reason why it was remove, but I think a goal with yii3 is to have a modular structure and flexibility so users can pick and choose what they would like.

Dropping Cubrid.

Dropping Pjax.

1 Like

Cubrid wasn’t used by anyone as far as we know.

PJAX was a huge time-eater for us, we had to patch it and then mere upstream changes from time to time. While it’s OK overall, we decided to drop it from the framework because it’s easy enough to be used directly as a JavaScript library.

1 Like

Okay, and is there any possible to ingrate any JS Framework like Vuejs in Yii3?

See JS Framework for Yii 3.0

are you using CUBRID? Would be the first one I hear from :slight_smile:

1 Like

PJAX replacement - will this be supported in new “plain JS” frontend bindings?

  • If NO - would e.g. grid work without such a functionality (to replace DOM node rather than reload whole page) ?
  • If YES - do you think maintaining own pjax-like functionality will be less time consuming than maintaining Yii2 pjax?

Pjax was really nice and performance-wise functionality in Yii2, which is why I am curious about alternatives in Yii3. Thanx.

I believe that updating not the whole page but only a grid view (or a list view) content will still be very easy without PJAX, provided that we can make use of jQuery.ajax or some alternative to it that supports AJAX.

But the difficulties will lie in the query string management, I guess. Probably I’ll be able to forget it. :smirk:

The answer is NO and widgets initially won’t work without page reloads. You can either add PJAX yourself or implement it with your JS framework of choice.

:scream:

We used to have $.fn.yiiGridView.update in Yii 1.1 and I liked it very much. And of course Pjax::start() and Pjax::end() in Yii 2. It has been very helpful for me.

It’s a pity that we won’t have that kind of helpful shortcut anymore in Yii 3.

So if I would want to update only the grid view content, I will have to write some javascript in view to catch the events that should trigger the updating, call the dedicated controller action for updating, and replace the content with the response, all by myself. Is it correct?

At first, yes. It could be added later though.

3 Likes

Personally I’m in favour of decoupling front end libraries from Yii. However what I would say is that the AJAX support in Yii - which has been there since v1.1 is one of the really useful features - and selling points of Yii. Where I think PJAX is most useful is in backend / admin modules - where you just need a quick and easy backend to manage your application.

Now of course there’s nothing to stop you from adding your implementation (recently I’ve used this one: https://github.com/MoOx/pjax which works a bit better than the one included in Yii2 and does not depend on jQuery).

But I personally think PJAX should exist in one the base application templates at least.

From maintenance point of view PJAX was a disaster to take on board :frowning: