Benefits of Yii over other Framworks?

I want to know benefits of yii framework over other frameworks. How I should suggest Yii to someone?

Hi there,

Yii is just another tool like many other tools, I would say evaluate your options and choose what works for you, I primarily use Yii because it has very small learning curve compared to some of the other frameworks out there, comes with sensible defaults which you can customize it to your liking and the performance is pretty decent.

1 Like

that is fine thanks for answer.
but what if I ask that which one is better Laravel or Yii? what would you like to say?

https://forum.yiiframework.com/search?q=laravel

Both are OK with their own cons and pros. For example, Yii has better performance, is easier to learn. Has different set of features. Has code generation that really works. Is easier to debug. Has more advanced Active Record implementation. Etc.

2 Likes

Here’s the long version.

  1. documentation.
    This is so important. Yii2 has excellent documentation. Try searching Eloquent. That’s Laravels ORM. It’s pretty confusing.

  2. GII
    Saves so much time, especially at the start looking at CRUD

  3. Form Models
    Used to hate them, now I love them. Handle your validation OO style by default. You’ll be happier in the future when things get big. Has some nice ajax built into the forms if you need it.

  4. No routing (sort of)
    Alg! I hate doing the routes. app->route(’/this/$page’)

Yii2 handles it just by putting an action in from of the function

  1. Debugger Default
    Very nice debugger at the bottom of the page. Better than Ruby

  2. Simple named classes
    Activeform, activerecord.

2 Likes

100% agree with 1. I have little experience with Laravel but enough to hate its documentation. A sorta mix of tutorial and marketing text without formal API reference. Yii’s Guide is mostly free of the chit-chat style and self-aggrandizement while its API reference is terse but largely complete and accurate.

And with 5. Idk where that debugger came from but it is really great. Whoever did the work: Thank you.

1 Like

Today I’ve published a comparison between Yii and Laravel a 2019 comparison, you can have a look at it, hopefully it can help you find the answer.