Answer the question
In order to leave comments, you need to log in
Is a partial transition to Yii possible?
There is a project already with a fairly large functionality on a self-written engine, in which a lot of things are not entirely successful and are implemented with crutches. As a result of improvements and fouling with new services, the engine is overgrown with all sorts of crutches. There is no time at this stage to carry out a complete rewrite under Yii. As a result, the idea appeared to be partially ported to Yii, i.e. write new services using the framework already and gradually rewrite the old ones for it.
The crux of the matter is this: is it possible to partially implement Yii so that only part of the project runs on it?
Thanks in advance for your replies.
Answer the question
In order to leave comments, you need to log in
For example, I pulled out ActiveRecord from Yii into one of my projects and a couple more classes, but now I have completely transferred everything to Yii.
In terms of implementation, there are no restrictions, you can safely store all project files in one folder together with another (or select a subdirectory for someone), and redirect specific requests through .htaccess, for example, to some specific modules - to Yii.
Anything is possible, but I think in your case it would be better to look towards Zend
Recently, the same question was asked on Reddit - as a result, several dozen comments with advice: www.reddit.com/r/PHP/comments/h3qhg/recently_started_with_a_new_company_and_im/ look, maybe you will find something useful.
Yes, it's possible, as I did:
1. If this is a new section of the site (ala trick, etc.), then it has its own unique URL, for example, news: site.com/news and everything else, then through nginx (htaccess in Apache) through RevrayTrule redirected to the framework.
2. If this is some kind of service layer, then specifically in yii I implemented it through api / rest api or through web services.
3. It is very similar to the second one, only to make requests not from the old application, but from the new one (in yii) to the old one. In my opinion, a very correct decision. Those. we create rest-api in the old application, and communicate through it in yii.
Yii is good, but I have repeatedly seen with my own eyes how many things were implemented on it unsuccessfully and with crutches.
So you just need to do it without crutches and just switching to yii by itself will not help :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question