Considering Yii 2.0

Hello,

I wrote a post on Reddit venting some frustration I’ve been having with Laravel. www.reddit.com/r/PHP/comments/23ocgv/i_think_i_may_have_to_abandon_laravel/

At this point it looks as though I’m going to need to remove some extensions that made life easier. My point in going to a framework and Laravel was to leverage other people’s work such as the extension named Sentinel which provided a robust user management system. But this and another extension has costs me many hours of extra work and grief first by making multiple calls to the database for the same data (which to me is very frustrating) and then, after doing an update, breaking my site so I couldn’t do development work – instead I was bumping questions on different forums trying to get help which did not come.

So, looking for alternatives, and boy are there a lot, I found Yii 2 and it looks cool. But I wonder if it’s worth the time to change frameworks.

I need a solid user management system, a way to process monthly payments, but most of all a community that is robust and friendly. I don’t need immediate answers to my questions but never getting an answer is one of the problems I’m having with the Laravel community.

I’ve still not decided what I’m going to do yet but I’ll probably start with ripping out the Laravel extensions; especially the one that keeps hitting the database multiple times per page load.

Thanks!

Yii2 just came out not long ago so there are not enough extensions though you can try out the many extensions for yii 1.* to see if it works.

Otherwise, if time is a matter, you can use Yii 1 with the extensions Yii User(or Yii usr which is a clone of yii user but with more functionality), Yii rights or Yii user management(yum) and get a third party payment processors like stripe which i think would work with yii with minimal effort.

phpperson

It worth trying another frameworks. Before joining Yii team I’ve tried CakePHP, Zend, Symfony and many others. Then sticked with CodeIgniter for more than a year and then finally found Yii. I’m not saying Yii will fit your development style. It’s all a matter of preference but from personal experience I can say that many frameworks out there worth trying.

  1. Yii community is generally very helpful and friendly. There are, of course, rare exceptions. To get answers fast you can try Facebook and IRC as well as forums.

  2. In Yii we’re taking backwards compatibility seriously. After release is stable we are trying not to break backwards compatibility and we absolutely have to do so (for example when rare security issues are popping up) we’re writing upgrade notes. Yii2 isn’t stable yet so we may break it still. There will be RC release that’s 99% stable and then GA that will remain stable.

  3. There’s no Sentinel-like extension for Yii2 yet. Same about payments processing. We may consider implementing these but it will definitely take time and will be after stable release.

  4. If something makes too many queries or works too slow we’re considering it a bug and fixing it.

selorm

I was wondering about extension number as well and it seems Yii2 already has >250 packages at packagist.

Stripe is a good choice if you’re from the country where it operates.

I was using Laravel for some time too. And I can tell you it can not compare with Yii, and when I say Yii I mean Yii 1, because I am still not using Yii 2. I’m planning to start reading the Yii 2 docs soon, but I’m still using Yii 1. Laravel has some nice features that can attract you at the first glance, but from my experience Yii offers you so much more. Yes, Laravel is using stuff from php 5.3+, but still in my opinion Yii is better, it offers much more, and I am sure that Yii 2 will blow Laravel away.

The thing is, you need to spend some time learning framework on deeper level, it is boring and time consuming but it will pay off. I have red all Yii books and yii docs many, many times, and I still learn something new when I read them, because you just can not remember all the stuff if you are not using it right away in some project after you read it. Since you never used Yii before, you will probably need to spend some decent time learning Yii 2, I will have too, but I hope it will pay off, at least it did with Yii 1, and Yii 2 should be better.

My recommendation is stick with Yii, but of course the choice is only yours.

Thank you all for your replies; I’ve read them several times.

I’m in no rush to make a decision and if I do go with Yii it will be version 2.

Sorry if this is a stupid question but does the default installation come with bootstrap integrated?

And can anyone recommend some current videos that demonstrate version 2 features, setup, configuration, etc.?

Nenad, when you say Yii offers more than Laravel what do you mean?

Thank you.

Default application template has bootstrap package (that includes bootstrap itself and some PHP wrappers) in its composer.json and views are marked up according to bootstrap conventions. If you don’t want it you’re just removing it and adjusting markup to use something else. If you want it you have a good kickstart.

There are no videos I’m aware of.

As far as I know, there are no video tutorials for yii2, even for Yii 1 they are quite few, and explaining just basics. You have probably watched Jeffry Way’s tuts for Laravel, I did too :D, but “Yii people” do not do them very much. I am planing to do some in the future, but not soon, I am waiting for yii2 to become stable.

As far as I know yii2 is using bootstrap out of box.

Yii has built in support for javascript/jquery/ajax. There are a lot of widgets that will do some cool client side stuff for you. I do not like doing front-end much, and I very appreciate that Yii is doing some stuff for me, that Laravel does not.

Yii code generators are more powerful than Laravel ones.

Laravel has nice active record ( Eloquent ), I think it is better than yii1 ones, but I saw that yii2 has improved it, so they will be equal.

Yii2 also comes with out of box support for smarty and twig, so if you are fan of blade templating, you can use one of these. Personally, I like twig.

Yii role based access control is great, and I saw that Yii 2 one will be better. They are very easy to implement too. It is not too hard to build good user management system.

Routing with Laravel is pretty boring and tireless, with yii you don’t have to worry about it…

The only feature that I am missing in Yii1 is native support for REST, But Yii 2 will have it. I hope Yii2 will have code generators for restfull controllers.

Maybe someone who is already working with yii2 can give you better comparison, because I am still working with yii1. Yii 1 is older framework than Laravel and is lacking some modern stuff that will come with Yii 2. but I still find it to be better than Laravel, and honestly I do not like namespacing :D ( there I said it, kill me I’m a noob) :D.

When it is about extensions, I wasn’t using many packages for Laravel, I remember I liked Carbon very much and that it comes out of box with Laravel, but I can tell you that yii core extensions are amazing, plus you can find some good user contributed ones, at least for yii1, yii2 is still in beta :D.

When it is about e-commerce, e-commerce is always tricky on so many levels, it is hard to find out of box solution for anything ( that is free ). At least I wasn’t lucky… :D

EDIT: lol, samdark made reply while I was still writing mine :D

If you really dig into both frameworks, you will find out very quickly which framework you like better and my guess is it will be Yii 2. Laravel is production ready and has superior documentation at this point. I really hope the Yii community will provide documentation that is as complete. The more complete the documentation, the more we understand why it works as well as how it works, the more inclusive it will be as a framework for developers of all skill levels. This is something the Laravel community has executed well on and has contributed to their success.

That said, Yii 2 is a vastly superior framework, delivering more features out of the box. With the advanced template, you get a working user model, forgot password, and frontend/backend separation. The built-in debugger for example, is extremely helpful. Need to check if your queries are lazy or eager loaded? Just click on the DB tab and follow all the queries and response times.

The Yii 2 team spent years developing this framework and it shows. It’s highly intuitive, clean, and addresses most of what you need from a framework right out of the box. My hope is that they follow this with documentation that is up to the level of the framework itself. Obviously you can tell I’m biased towards Yii, but I have checked out Laravel in great detail as well and I think I’m being fair. Even though Laravel is production ready now, I’m investing my time into Yii 2.

Yii2 is the first framework I’m learning. I’m somewhat of a newb with still limited knowledge but my goodness it’s fun. Yii2 takes care of so many things I don’t need to worry about that it makes developing very enjoyable.

I can’t really compare with any other framework but the way Yii2 is structured and how everything fits together is just brilliant.

Anything you need or want to do is very intuitive, even for someone who’s never used a framework before (such as me), everything just falls nicely into place.

Since there is not much documentation, no books and only a few videos on youtube I often have to revert to Yii1 documentation to get an idea of how things are done before coming back and extrapolating into Yii2.

Nevertheless, if you dive into the framework yourself, and you will, you will see just how well commented the code is. There is not a single property or method which doesn’t come with a block of text attached explaining what it does and how.

Strongly recommended.

Because of the enthusiastic replies here I’ve decided to at least install it and kick the tires.

Even if it is just the same as Laravel I’ll switch for a better forum/community.

Thank you for taking the time to share your thoughts.

yii2/doc is so hardly to understanding for new

zf2

framework.zend.com/manual/2.2/en/user-guide/skeleton-application.html

ci

ellislab.com/codeigniter/user-guide

is good example

Even though Yii2 is in beta … there are already a lot of extensions including user management - which will become better as Yii2 fully stabilizes. You could check them.

Self has also created a few extensions for this community to help you kickstart. Click the links on the signature to begin.

Yes, because the link is incorrect!

Should be this one: https://github.com/yiisoft/yii2/blob/master/docs/guide/index.md

and not the API reference.

The Yii2 definitive guide Website. This is a formatted portal version of the github link Orey shared - including easy navigation and search.

SchoolToJoin is awesome!

I can tell you it can not compare with Yii, and when I say Yii I mean Yii 1, because I am still not using Yii 2. I’m planning to start reading the Yii 2 docs soon, but I’m still using Yii 1. Laravel has some nice features that can attract you at the first glance, but from my experience Yii offers you so much more.