📜 ⬆️ ⬇️

Interview with Alexander Makarov, Yii core team

One of the key developers of Yii, Alexander Makarov ( SamDark ), will speak at DevConf with a report on packet metrics and I took the opportunity to ask some questions of interest to me about the new version of Yii , the new ORM , the collection of money for OpenCollective , the full-time open source development and a bit about the conference.

I will start with the question that you are asked all the time. What's up with yii ? When is Yii 3 ? I’ve been watching the active creation of new packages for quite a while at github.com/yiisoft

With Yii, everything is fine. Almost. To explain, you need to look back a little.

When we did version 2.0, we somewhat overestimated our strength. It is understandable, Qiang Xue turned mountains every day and it seemed to us that we could do everything at once.
')
Then, unfortunately, he did not have enough time for OpenSource, and the support of what was done was eaten all the time by the rest of the team. Well, since no one was engaged in the full-time framework, this resulted in the fact that the releases were not frequent and large. In addition, when designing, then we made mistakes. Now they seem obvious to me, but then we thought it was so good. They, fortunately, not so much. They do not make Yii 2.0 bad, the framework is good. But over time, they resulted in the promise of backward compatibility, many features and lack of time giving us problems with the development of the framework: the introduction of PSR , avoiding closeness to common PHP packages and libraries, improvements in the use of more complex development approaches, better testability

There was an attempt to get off with evolution. I believed in it for some time and spoke about version 2.1. But, technical debt was already too big. It would have turned out not a very good framework in which there would be no meaning. And so, at some point it came to the realization that it was necessary to refactor everything and a lot, and even throw out many parts and rewrite. But before throwing into battle, I sat well and reflected. Designated for myself what I want to fix, the principles of building 3.0 and the values ​​of Yii as an organization. This resulted in several documents:

https://github.com/yiisoft/docs/blob/master/001-yii-values.md
https://github.com/yiisoft/docs/blob/master/003-roadmap.md

Then work began on the allocation of individual packages and in the process re-read and rethought the principles of the construction of packages of Robert Martin. Packages are not really new. These are parts of Yii2 , which, for the most part, can be used separately.
But there are new ones, such as:

https://github.com/yiisoft/event-dispatcher
https://github.com/yiisoft/di

The process is not yet complete, so the growth in the number of packages will continue. With them now is not easy, but later it will all be much easier to maintain.

I remember you had in your plans the use of a certain ORM, about which few people know. github.com/cycle/orm I have not bothered to familiarize myself with it in detail, tell me how it differs from others and what attracted you?

Yes, it really is Cycle . It was implemented by Anton Titov, by roadrunner.dev . The documentation there is not yet completely relevant, so if you are not ready to read the source, it’s too early to go inside.

Anton and I communicate for a long time. He then had an in-house framework and asked questions on how and what was arranged in Yii , what I like and don’t like in Active Record. We discussed the pros and cons of Doctrine . Sometimes they talked up and Anton showed how and what was done there and I said many times that it’s more convenient in Yii .
At some point, I started talking less so and realized that something globally interesting could come out of Cycle . At that time, there was already a syntax similar to Yii query builder, the concept of relations, and much more. Especially the fact that in production at Anton RoadRunner and it was critical to him that Cycle didn’t flow, eat more memory and did not fall apart due to errors in batch processing, was particularly captivating.

In fact, I last looked at Cycle in detail in the spring and the decision to take it as default for Yii was not made. This is only an option. But one thing is clear: we will not be tied up on Active Record for validation, forms, and so on. This should work with anything: with the DTO, with the Doctrine entity, with the Cycle.
Yii recently started raising funds through opencollective.com/yiisoft . Currently, the goal of “One focused core developer - $ 24,000 per year” is close to fulfillment. What does it mean? Full time developer who will deal exclusively with Yii? Who will it be?

Yes, we really started a fundraising campaign because Yii 3 takes more time than it used to support Yii 2 before. Focused core developer does not mean that it will be full-time (the amount is still not comparable to commercial fulltime), but it means that almost every day one developer will spend considerable time on the framework without being distracted by burning production, deadlines, team problems and that's all . That is, it is not only more time, but also a good focus of thoughts without strongly distracting factors.

I will be the first such developer. Upon reaching the goal, we will try to raise the bar and extend it to another core team member.
All this increased activity is most likely due to the fact that you finally have time. You worked in Skyeng, left from there (you can read about the reasons and details here - rmcreative.ru/blog/post/poka--skyeng ). Do you continue to engage only open source? How do you feel? Family budget?

Yes, everything is like this: time has appeared and Yii has risen strongly in the priorities of goals. I am engaged almost only OpenSource. Now OpenCollective allows you to pay almost all accounts. Sometimes I take some small side jobs like review of code, processes or security, design OpenSource libraries, search for people for companies (familiar good developers, it happens, they are also looking for), but not much so as not to harm the development of the framework.

Feelings ... all kinds. This is really what I like to do. I am glad that you get a great tool. Pleased by people who are not indifferent to Yii and who help. Like to speak at conferences.

Sometimes the burden of responsibility presses. I want to rest, but “it is necessary” to force something to do. Most often in this mood nothing sensible comes out, so I still try to convince myself that the rest is well deserved.

Well, the understanding that there is still a lot of work ahead is also not felt very much. Although, if we look at what has been done every week, it becomes clear that to make it all real and that we will do it.

I look forward to the moment when it will be possible to announce the alpha and get the first angry reviews :)
I still remember you opened something like a coffee shop, and maybe not even one. Business for the soul? A lot of time it takes?

Two coffee houses, yes. They did it to be nice. The bar is high. Good things turned out, but there is room to grow. My brother is now mainly engaged in coffee shops. Time does not take much.
In May, you were one of the organizers of the PhpRussia conference. How was she?

Went good. They did almost everything they wanted: 500 people plus online viewers. Eminent foreign speakers, a strong program. The almost complete absence of any overlays. The reviews are mostly positive, but there is much to develop. We will do more.
Why should an ordinary developer attend such conferences?

  1. In order to know where to grow.
  2. In order to understand, everything is correct in the project or not.
  3. Recruit new tools and practices.
  4. To communicate This often gives very unexpected results: from simply pleasant communication to priceless advice and insights.

And finally, about your report. "Programming Theory: Packet Principles and Metrics." You mentioned Robert Martin and his thoughts about the packages. How applicable is this in the PHP world? In the world of compiled languages, dividing one project into several packages that are compiled into separate assemblies is quite a normal practice and there are really some rules that are needed. In PHP, we usually talk about composer packages, which are a bit different, and these principles with metrics are needed only for projects of the Yii3 level. Not?

This is perfectly applicable to PHP . Of course, this is primarily necessary for projects of the Yii , Symfony or Laravel level, but for commercial projects it also makes sense. Packet metrics can be applied not only to Composer packages, but also to code modules, microservices, and so on.



DevConf will be held June 21-22 and there are only 2 weeks left. Strong reports , the opportunity to discuss a bunch of questions on the sidelines or on coffee breaks and get a good positive charge for a long time - register .

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


All Articles