Benefits of Yii over other Framworks?


(Hemendra Singh) #1

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


(Alirz23) #2

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.


(Hemendra Singh) #3

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?


(tri - Tommy Riboe) #4

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


(Alexander Makarov) #5

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.


(Auzadventure) #6

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.


(Fsb) #7

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.