S
S
scarah2011-05-22 09:42:32
Yii
scarah, 2011-05-22 09:42:32

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

8 answer(s)
P
p4s8x, 2011-05-22
@skarah

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.

S
sl4mmer, 2011-05-22
@sl4mmer

Anything is possible, but I think in your case it would be better to look towards Zend

F
Fr3nzy, 2011-05-22
@Fr3nzy

Perhaps, of course.
For example, 66.ru do this

A
Anton, 2011-05-22
@sHinE

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.

S
sergeyvolobuev, 2011-05-23
@sergeyvolobuev

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.

G
gro, 2011-05-22
@gro

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 :)

S
skarah, 2011-05-23
@skarah

It is also an option!

G
gsd, 2013-11-14
@gsd

Using a Yii Application in Third Party Scripts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question