Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62506 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64789 invoked from network); 26 Aug 2012 04:22:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2012 04:22:40 -0000 Authentication-Results: pb1.pair.com header.from=rewilliams@thesba.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rewilliams@thesba.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thesba.com designates 208.106.205.210 as permitted sender) X-PHP-List-Original-Sender: rewilliams@thesba.com X-Host-Fingerprint: 208.106.205.210 ntsexchedgea1.newtekemail.com Received: from [208.106.205.210] ([208.106.205.210:51291] helo=ntsexchedgea1.newtekemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/8C-06857-F84A9305 for ; Sun, 26 Aug 2012 00:22:40 -0400 Received: from NTSEXCHHUBA2.NTS.PHX1 (208.106.205.209) by NTSEXCHEDGEA1.newtekemail.com (208.106.205.210) with Microsoft SMTP Server (TLS) id 8.3.137.0; Sat, 25 Aug 2012 21:22:12 -0700 Received: from NTSEXCHA1CMB2.NTS.PHX1 ([fe80::3913:915c:3f89:aad]) by NTSEXCHHUBA2.NTS.PHX1 ([fe80::5599:ebdb:9671:6550%11]) with mapi; Sat, 25 Aug 2012 21:22:34 -0700 To: PHP internals Date: Sat, 25 Aug 2012 21:22:33 -0700 Thread-Topic: [PHP-DEV] Older style frameworks ... Thread-Index: Ac2DQmqAJBJY1CG8RbWb/utjw6H3eg== Message-ID: References: <503897B4.8020303@lsces.co.uk> <5038C04D.9080509@lsces.co.uk> <5038C0F8.9060008@ajf.me> <5038D2B1.6060704@lsces.co.uk> <5038D5A2.6050002@ajf.me> <5038D6D0.8020100@lsces.co.uk> <5038D850.6020009@ajf.me> <5038F92A.2040900@lsces.co.uk> <503913FE.4060602@cubiclesoft.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [PHP-DEV] Older style frameworks ... From: rewilliams@thesba.com (Robert Williams) On Aug 25, 2012, at 17:24, "Guillaume Rossolini" wr= ote: > What you say is true, versions get old. But as Lester pointed out, they > work. that is why some computer systems that have been outdated for years > are still functioning today. It is hard to make a case for rewriting cod= e > that already works, don't you think? Actually, no. In fact, if anything, I think it's just the opposite: it's ha= rd to make a case for letting code stagnate. No matter how stable an app ma= y seem, there will come a day when it will suffer a serious blow. It might = be that a critical component has a major security breach, or a business req= uirement comes along that forces you to play nice with another system in su= ch a way that it can only be done with newer software, or the underlying ha= rdware breaks and cannot be replaced, or the company grows and the app can = no longer scale... whatever. The world changes, and it's going to take your= app with it one way or the other. The term is technical debt, and like financial debt, you must deal with it,= you must keep ahead of it. If you're pouring all your resources into new c= ode, then you're piling up technical debt. Yes, refactoring code to modernize it isn't always fun, but if you do it re= gularly, then the debt remains low and you settle in making making many sma= ll changes at a constant pace and over time, rather than making big changes= too quickly. Other benefits come from regularly revisiting code, too, e.g.= , fixing hidden bugs, increasing performance, reworking algorithms and flow= s with the benefit of experience and hindsight, etc. How much maintenance, as a share of overall work, is right for an app varie= s with the overall quality of the code and how rapidly the app is evolving.= It may be 20% or 80%, you have to decide for yourself. But if all you're d= oing is adding code without ever refactoring code, you're setting yourself = up for a real mess when the sh** hits the fan, and you're doing your compan= y (or customers, or clients) a terrible disservice. BTW, before you blow this off as an unrealistic view, consider my own situa= tion. A few years ago, I took over management of a few million lines of cod= e that had largely come to be via the throw it together and never touch it = again method. Most of it was written in the PHP 4 era (some in the PHP 3 er= a), and it had things like reliances on pre-1.0 beta releases of pear libra= ries that had long since lived a full life and died in unmaintained peace. = These were mission critical applications, so we couldn't just toss them out= or stop new development. At the same time, they were starting to become pr= oblematic, with serious performance issues and security flaws. Our approach was simple: whenever we added anything, we took the time do it= the right way, which almost always included refactoring old code that was = involved. And, we spent most of our time fixing things, pulling dependencie= s on third-party libraries (like pear), and so forth. Over time, things hav= e improved dramatically, and now most of that old code at least runs under = 5.3 comfortably. Our newest apps specifically target 5.3 and will be switch= ed to 5.4 as soon as Zend gets its act together and releases Zend Server wi= th 5.4. Perhaps most interesting, the business users are really starting to= understand the importance of staying on top of technical debt, since they = were bit so badly by not doing so and are now starting to reap the benefits= of doing so. My point is, I feel your pain. But you have to power through that, get the = code cleaned up, and then get it on a maintenance schedule that keeps it th= at way. The rest of the world is not going to slow down for you, so stop wa= iting for that to happen and just jump in. Regards, Bob Notice: This communication, including attachments, may contain information = that is confidential. It constitutes non-public information intended to be = conveyed only to the designated recipient(s). If the reader or recipient of= this communication is not the intended recipient, an employee or agent of = the intended recipient who is responsible for delivering it to the intended= recipient, or if you believe that you have received this communication in = error, please notify the sender immediately by return e-mail and promptly d= elete this e-mail, including attachments without reading or saving them in = any manner. The unauthorized use, dissemination, distribution, or reproduct= ion of this e-mail, including attachments, is prohibited and may be unlawfu= l. If you have received this email in error, please notify us immediately b= y e-mail or telephone and delete the e-mail and the attachments (if any).