Jump to content

Recommended Posts

well following on from my "PHP Frameworks for beginners?" thread, I have decided to go for YII.

 

After my research, I found it is probably the future one which companies will sway towards. Either YII or Symphony.

 

So i've downloaded YII and so far i have been very impressed.  However, due to its relatively late entrance, it does lack documentation, but it will only increase over time. Also once the initial configuration is sorted then most of it falls into place.

 

Apparently it is very similar to the Ruby on Rails framework, hence why it looks to be a very promising framework.

 

Anyone else using this framework?

What are your thoughts?

Any decent tutorials out there?

 

Link to comment
https://forums.phpfreaks.com/topic/198375-the-yii-framework/
Share on other sites

It depends on what you are going to do with it. Like many frameworks, it is really good for applications with static structure that matches to the default controller/action model. Furthermore, it is one of very few frameworks where the communication between view and model does not have to go explicitely through the controller which is correct, because this is how MVC was originally supposed to work.

 

However, I see two main drawbacks of Yii:

- If your application does not have a typical structure, you will find very tricky to implement your own solution. I'm writing a CMS in Yii now. I wanted to have independent modules for different content types and the controller should choose the module dynamically, using information from the database. At the same time their pages for the backend should act normally. However, it must have been built on the top of controller/action layer and it does not look very good. I tried to find a way to implement my own controller layer without that unnecessary action stuff, but then I discovered that Yii internals break some object-oriented design rules (primarily view-specific rules are hard-coded in the base controller code)...

- Yii classes have a very specific naming convention. Integration with Doctrine or some other zendy-style libraries makes a mess in the code and forces to use lots of different autoloaders.

 

Actually, I do not see the future in monolithic frameworks for several reasons. They are usually perfect for only one type/structure of applications. Their design is not flexible enough to face different problems, such as the CMS way I mentioned above. I tried different frameworks, but every time I faced some stuff that did not suit me, but on the other hand it was very hard to replace it with a much better, but standalone tool. If someone thinks that he or she can make a complete web framework from scratch where a single component, let's say - ORM, will be better than a standalone library, (s)he is wrong. This is why I prefer Doctrine to built-in ORM-s, why I prefer Open Power Template to built-in view layers and so on.

Link to comment
https://forums.phpfreaks.com/topic/198375-the-yii-framework/#findComment-1042312
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.