duanqiu3800 2014-02-12 18:42
浏览 17
已采纳

需要组织的旧PHP项目[关闭]

I am working in a company that owns a website which I find very difficult to coop with, not because of my lack of experience in PHP but due to the fact the code is written in a very old and low quality, written with no OOP.

What I can see in the APP:

  • html page ,
  • Php Page
  • Template
  • mysql structured like the Pablo Picasso paintings, no foreign keys, no constraints nothing

I only see code written and rewritten over and over I just myself can't understand how do people mingle in this ocean of codes vomit ? When I tried to contact one of my colleagues to understand more about it, he told me that its taking them more and more time to achieve tasks already emphasizing on the fact that complexity is gradually increasing and they can't do anything anymore because a massive amount of data has been initiated.

has anyone had any similar situation? any advice ? maybe there is a way to fix this chaos ?

Any post would be appreciated !

  • 写回答

2条回答 默认 最新

  • dongzhou4727 2014-02-12 18:52
    关注

    Picking a development framework and re-implementing the application using that will significantly improve the maintainability of an application.

    If you want a way of justifying this from a cost perspective, do an audit with a SQL injection testing tool and you'll probably find a million things wrong. Some of these things will be so terrifying you'll be tempted to just burn the codebase to the ground and start over.

    The best approach is to migrate, feature by feature, page by page, from the old application to the new one. Often you can do this by creating a content map, adding rewrite rules to map particular URLs to the legacy code, then start deleting these rules one by one as they're no longer required.

    Remember to have a robust mapping table if you ever change URLs. Returning a 301 Permanent redirect is the best way to do this.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Oracle触发器记录修改前后的字段值
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器