有没有关于快速 PHP 重构的工具或技巧?
我们当前的“内部”新闻通讯系统只是 PHPlist,上面贴有公司徽标。我的任务是向其中添加各种功能,但 PHPlist 的代码是单一的,很难分解。我想首先将其分解为更易于管理的部分,但我最终的目标是使用 CodeIgniter 和 ExtJS 从头开始重写整个 UI 和逻辑,仅保持与 PHPlist 的数据库兼容性。
我只能说“管它呢”,完全从头开始编写一个新系统,但我想尽可能多地保留原来的 PHPlist 行为,因此,我要做的第一步是了解 PHPlist 的所有功能在哪里PHPlist 首先被埋葬,并且潜入数十个文件,其中包含数百行至数千行未注释的 PHP,而且没有明显的结构,这并不有趣。 :(
Our current "in-house" newsletter system is just PHPlist with the company logo slapped on it. I am given the task of adding various features into it, but the code of PHPlist is just monolithic and hard to break down. I would like to break it down to more manageable pieces first, but what I aim to do ultimately is to rewrite the whole UI and logic from scratch with CodeIgniter and ExtJS, keeping only database compatibility with PHPlist.
I can just say "screw it" and write a new system completely from scratch, but I would like to keep as much of the original PHPlist behaviour as possible, therefore, the first step I have to do is to understand where all the features of PHPlist are buried first, and diving dozens of files with hundreds to thousands lines of uncommented PHP with no apparant structure is not fun. :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果它只是内部的,您是否考虑过其他选项,可能会节省您的时间和金钱,
例如 MailChimp.com
最多可存储 2,000 个订阅者。每月最多发送 12,000 封电子邮件。没有过期的试用版。没有合同。无需信用卡。
if its just internal have you looked at other options, may save you time and money
Eg MailChimp.com
Store up to 2,000 subscribers. Send up to 12,000 emails per month. No expiring trials. No contracts. No credit card required.
我的直觉反应是,如果代码那么糟糕,那么你应该把它扔掉。通常,最好的方法是使用一次写入、永不读取的代码。
在此之前:
如果有任何方法可以让业务人员明白这一点,请告诉他们 RSS 和 ATOM 比群发邮件远远要好。
My gut reaction is that if the code is that bad, then you should just bin it. Often the best approach with write-once-read-never code.
Before you do:
And if there's any way you can get it across to the business, tell them RSS and ATOM is far better than bulkmail.