Yii, symfony, and best practices

Yii is great. Symfony is great. These are the two php frameworks that I’ve been focusing on lately. I’ve been using yii for over a year now and I’m very much happy with it. Everything in yii is so easy (i bet most will agree on this). On the other hand, I think symfony2 is better but my problem with it is that it is too complex. With my inadequate knowledge about design patterns, I find it extremely difficult. That’s what make me stick to yii. In fact, I have never used symfony. It’s documentation is just awful and incomplete as of this moment and maybe that’s what keep me from holding back.

Correct me if I am wrong, but with so much differences between yii 1.1.7 and symfony2, I believe that symfony can do any kinds of application both that can and cannot be done by yii. I know that symfony is more kind of an enterprise framework, but what exactly are the kinds of applications that can be done by it but cannot be done in yii?

I’ve been reading about design patterns these days. That made me notice that symfony employs a lot of design patterns in contrast to yii. Everything is provided, and it’s up to you to implement those. That is really great. In my opinion, your code will be much more bulletproof. How about yii? To what extent does it ensure and help you to follow best practices and apply design patterns?

I hope people will enlighten me on this. The reason why I came up with this post is that I have new projects which involve making community sites for farmers and a middleware that connects a web financing tool to a banking api. The main concern is: I don’t know if yii would be able to handle these kind of projects.

Just don’t flame me on this. I am just somehow a little bit inexperienced. :rolleyes:

At my practice, development is divided into 2 paths, fast prototyping by one developer and long agile product development in a big command.

Rails is so popular in first path - languange has many syntax sugar, it’s possible to find all needed components at gems or github. This is a way like delfi - find component and put it in your application. It’s fast, but a lot of code written in this style is dirty. I like ruby, rails is great - but true.

Big enterprise frameworks like Spring, Zend is so difficult for understanding, but result of using - good abstraction layers, low coupling. This way is difficult, required know design patterns, architechure principles, knowledges in refactoring, agile work, a lot of experience.

When I work with simple frameworks, it’s need regular write some bad code - as example, layer for REST api. Look at Yii - for use as rest front contoller, need write standart controller using post and get parameters, someone parsed from urlRouter. And next day need realise Soap api, like rest. I can write code, using data from urlRouter and Soap front controller, but framework hasn’t interface for controller to front-controller. And at difficult situations it’s required write abstraction layer or write two identical controllers, working with two different components. But this controllers is realsing one function!

It’s a different between two paths - abstraction layers and instruments. If you need create new chair, you use saw and hammer. But when you build guitar, hammer is too heavy. You need more delicate instruments for simplify your work.

i’m sorry for my english, I have not practice.