duanpuqi9965 2011-02-28 11:58
浏览 37

将一个非常大的php代码库迁移到rails的理想选择是什么?

im just soliciting opinions/advices. Like we have this really large PHP code base, by large these are what i meant:

over 500 tables over 4000 files - action, displays & templates. over 1,000,000 lines of code - this software spans more than 8 years already.

So many deprecated, duplicated code all over the place, and so many hacks.

I want to be able to still run the software, while parts of it are being migrated to rails.

So it will be running in hybrid mode, that is, both PHP and rails at the same time. Parts of the software that hav been migrated already, will start using the Rails version.

I suppose my idea is:

  1. migrate to Git
  2. I suppose all the more than 500 tables remain.
  3. Find a way so PHP and rails will interoperate?
  4. Chew one display & management screen at a time?
  5. Work on the front end?
  • 写回答

2条回答 默认 最新

  • dousha7645 2011-02-28 12:26
    关注

    I expect such a thing is going to be toff. Anyway let me try to give some advice.

    1. Build both basic "runnable" applications.
    2. Make sure that both applications can access the same database, the same session sources, the same cache and so on. Here'll you have to make sure that that your data sources are compatible to both your applications. For example: you could migrate your user sessions to the database.
    3. Build an extra routing component (in mod_rewrite, PHP or whatever you like) to start routing several pages to your Ruby application instead to PHP. Test it thorougly. Build the router in such way that it can function in development mode as well as in production mode.
    4. Slowly start adding routes to your router for added components in your Ruby application.
    5. When you've completely migrated, change the default route to your Ruby application. You can start using Ruby-specific data sources now.
    评论

报告相同问题?

悬赏问题

  • ¥15 vscode问题请教
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM