What Yii issues i should be aware of ?

Hi.

I’m new to the Yii framework ( digging through yii book right now ) and i have to learn it in really short time period. This is why i would like to ask Yii community for some heads-up on the problems i could encounter. I’m interested in problem and limitation of this framework, that i might run into.

P.S. : the book i mentioned is "Agile Web Application Development with Yii 1.1 and PHP5" ( amazon.com/gp/product/1847199585 ) , but the forum-hack prevented me from embedding it.

Be sure to visit the dedicated Book subforum - most questions are answered therein. :)

And if not: ask.

IMO, Yii is one of the most un-limiting PHP frameworks - but if you run into trouble, shout here.

It’s better to ask small, focused questions for quicker answers, of course.

Do read the official guide, the wiki and the linked to tutorials. They’re worth it.

In addition to the (excellent) book.

The sticky Known Issues topic in the Book subforum is a must read first. ;)

The biggest issue is probably the whole MVC business…

So may I suggest that you read this:

understanding-mvc/

Larry Ullman is great - be sure to check out his Yii tutorial series as well.

But do yourself a favor and grok the MVC stuff first.

That’s probably one of the biggest stumbling blocks when dealing with a MVC framework like Yii.

What did you mean with that ? Are you saying that Yii’s implementation of MVC is flawed and will be a problem ?

Quite the opposite! :lol:

No, what I’m saying (or trying to say) is that you will have a hard time getting into a MVC based framework like Yii if you don’t have a clear picture of what MVC is.

And what kind of rules it brings with it.

But, if you do have solid understanding of MVC, then learning Yii should be straight forward.

One example:

In Ruby on Rails, CakePHP and Yii you get an awful lot of directories with a lot of files in it, and that can be quite overwhelming.

However, due to the rules of MVC, you know instantly (if you know the system) where things are supposed to be.

That’s MVC’s Convention over Configuration (Google or Bing that phrase for references).

In practice, that means that it takes me a very short time to become familiar with new code, like an open source Yii project, when (almost) everything follows the rules.

I don’t have to figure out where things are.

Welcome to Yii, by the way. :)

I fail to see how any of this can be characterized as issue, problem or shortcoming …

Alright. You fail to see it.

Well, in that case you shouldn’t face any. ;)

What I just said is the major obstacle for most people. But if you fail to see it, then you must obviously be used to the paradigm.

And will have a much easier time than I had when I learned CakePHP (which I was using before switching to Yii because Yii has less shortcomings than CakePHP has).

If Known Issues means ‘outstanding bugs’, then take a look here:

http://code.google.com/p/yii/issues/list

Yii is a fantastic framework although I came across an issue recently. I am using PHP 5.3 namespaces for my code. When using any widget that implements jQuery, the functionality breaks because Yii doesn’t fully escape the backslashes in the HTML output e.g.




//.. the model

$model = new \application\models\form\LoginForm();


//.. the jQuery - don't work

$('application\\models\\form_form_element')


//.. should be this

$('application\\\\models\\\\form_form_element')



IMO, it’s totally f****d up that PHP uses backslash as namespace delimiter.

Why on Earth did they do that?

But that does look like an Yii issue.