Which one to go; Yii or Symfony

Good. I DO NOT ask which one is better. I know that Yii is not better than Symfony, Symfony is not better than Yii.

I ask who should I go with.

I want to give a few points:

I have a big project that is very well formatted and very well coded. If you saw my codes, you would think that I created my own infrastructure, but it does not exist. It is just very well coded. I use custom controllers for HTTP requests.

All I want to do is make my code much easier to use and much easier to understand and simplify to change . Editing components by component and extension .

I also use the Zend Framework as a component, but not the base framework.

So, as you developers , what project structure for basic coding do I really use. Yii or symfony?

I really loved Yii, but the Symfony Bundle and Namespaces attract me. But I really wonder where I should go.

As I said, I do not ask which one is better. I want your questions to address this issue.

I am open to suggestions. Give me the way.

+4
source share
3 answers

Yii is perhaps the surest "infrastructure" of all the options - it provides the scaffolding you need with almost no assumptions about how you would prefer to implement something (with the possible exception of jQuery). It is incredibly fast developing and very fast, which provides excellent scalability.

The projects that I used Yii for always turned out to be much ahead of schedule - Yii just seems to make sense in how it works. I agree, my experience with Symfony is limited, but compared to Zend Yii, it’s a breeze. The Gii MVC generator is also a fantastic start, generating models and basic CRUD code from database tables.

ALl is just my opinion from my own experience, but what you asked for :)

+7
source

I think you are looking to see which recommendations are greater than any evangelism.

Just to give some guidance on what the current state of PHP is, and nice components that use the latest php features .

Requirements

Make sure you use the method ...:

  • send to journal (Monologue is good)
  • parse only text (YAML - good)
  • logically without patterns, with some conventions (Mustach, Twig)
  • Dependency definition definitions (Composer is a very similar way to package.json that Node offers)
  • define a general mechanism for creating a β€œservice” ( DependencyInjection - one example)
  • abstract way to load libraries ( ClassLoader component is good)
  • Localization Management (see the Symfony2 / Twig Documentation )
  • abstract database calls without a specific hardcoding database provider (Doctrine2, Propel)
  • Testing structure, usage and conventions (PHP Unit, Behat, Mink)
  • Database code does not use " mysql ", and istead uses mysqli

And all these different functional packages that you can mix and match.

Mix and match

Currently, some efforts are being made to solve this exact problem, here are some interesting:

Hope this helps you. with your own choice on what basis to invest.

+5
source

Since you already use Zend, why not use it as a frame?

And there is no answer to your question, it depends on the needs of the project ...

Symfony should be used in large projects with fast servers.

Yii is still a lightweight structure, but very fast compared to Symfony and has a short learning curve ...

... etc.

+1
source

Source: https://habr.com/ru/post/1398630/


All Articles