Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92570 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 853 invoked from network); 20 Apr 2016 19:57:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Apr 2016 19:57:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=jesseschalken@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jesseschalken@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.172 as permitted sender) X-PHP-List-Original-Sender: jesseschalken@gmail.com X-Host-Fingerprint: 209.85.213.172 mail-ig0-f172.google.com Received: from [209.85.213.172] ([209.85.213.172:35999] helo=mail-ig0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/35-14036-D1FD7175 for ; Wed, 20 Apr 2016 15:57:18 -0400 Received: by mail-ig0-f172.google.com with SMTP id f1so138408867igr.1 for ; Wed, 20 Apr 2016 12:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=VraYodwl8vyB5PhRPByh3meK1gh4o8qtVusLRhN7P9A=; b=wb9A76WmkLJTujisDUuPNsXB0HzvYLvFucR+y0aK4eFl7aZkX2X0O5KYLaMhgt81tg tRrgWR1C51gOzi6htSRqJtOR8RmcaI/B6/34lyYO8XL0nIeZrxSsfwPq0eY/uFK4XQVY E038NY9/6EtbNkS+QnagBce19/e57L5Jpa6VVIp0InC6up4Y8KYNvtseY1fkS7lE7xvS 7+VYCTHzJ61bzLc2jxuGHZJlSSatLtu/BghQ2vm3EhLbi5bbiSAnCTZfdJ78qtStDa8x hJKDubzr5JWBqeS5vbBM5FizTQvrBEp6+5zD/lT8y2tH0BL+eVa+btC/xoEitMpQsA7z 2hsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=VraYodwl8vyB5PhRPByh3meK1gh4o8qtVusLRhN7P9A=; b=CyzzZUoTaLtAXvrPf5czSc1bYfLRhBYXYALWfKWcC8wD4Pl+ElhvskYkJ78p2EuxpY O5cWQJwTkLrnVBHAiav6PcP3nPeILt7C4jtGw9+FKnDv/+ljr/1KucgCWBvgUIvPzz3o nY3UXM74PA40GIrL1hv5kyrnPmwvPQm6VZrdp7By3hTk0sEqeKJAsizSqOEEng4PrEb9 TaWhnFoRSkDEO2kH2p1kxYoBYuV5FdiC/ziN1SadAwu00ObU+4pZ4XIWEvPD/g/Pjtzy 6DjmP9oxYEjM+fdcPrmXvFNYpQ/V9iDrbnKsnZzBWZPb12iVN2yNCtNjAXGY5rVoHf9A atsg== X-Gm-Message-State: AOPr4FWoIBghnCF9cLiupoMCaqO2uxrkHSVdo7y0E4VGysahg4JZtTRgVRLgX3dD0C1y7whrpymE9XgBojexwg== MIME-Version: 1.0 X-Received: by 10.50.56.114 with SMTP id z18mr5594225igp.44.1461182234619; Wed, 20 Apr 2016 12:57:14 -0700 (PDT) Sender: jesseschalken@gmail.com Received: by 10.79.139.133 with HTTP; Wed, 20 Apr 2016 12:57:14 -0700 (PDT) In-Reply-To: <5717D70E.5010706@lsces.co.uk> References: <5717D70E.5010706@lsces.co.uk> Date: Thu, 21 Apr 2016 05:57:14 +1000 X-Google-Sender-Auth: KYJxi1_lMFMk3Uo8cvlfl8SZSNE Message-ID: To: Lester Caine Cc: internals Content-Type: multipart/alternative; boundary=089e0158b3060c12610530f000d7 Subject: Re: [PHP-DEV] Quick sanity check ... From: me@jesseschalken.com (Jesse Schalken) --089e0158b3060c12610530f000d7 Content-Type: text/plain; charset=UTF-8 You can continue to use arrays for database records like you always have been. None of the new or proposed features are going to stop you. The concept of type annotations and type systems really has nothing to do with databases directly. It's about adding certainty with regards to the types that are flowing through your PHP program so the program can be modified reliably and predictably. A database is just one possible thing *outside* the program to connect to and interact with using some protocol. Creating a mapping between database records and types PHP objects and types in order to leverage PHP's type system for the purpose of using a databases is quite a complex topic in and of itself, but basically amounts to using some kind of object-relational-mapper such as Doctrine. However, I'm not sure how recent or proposed improvements to typing is related. All I can think of is that Doctrine could make use of type properties instead of PHPDocs for getting column types. You can also just continue to arrays, or a simple class with get($column) and set($column, $value) methods. That's what I do. :P On Thu, Apr 21, 2016 at 5:22 AM, Lester Caine wrote: > With all of the debate on the 'type system', can I just ask a probably > silly question ;) > > I'm currently working on porting an application that has been running on > windows as C++ code for 20 years. The main reason for changing is that > While it worked fine when sites upgraded to XP, the move to W7 and later > really needs all the code recompiled, something that will need a big > cheque book to buy a current compiler set. So for many reasons a switch > to web based using already existing tools makes perfect sense. > > The database is still running Firebird since the switch from interbase > in the late 90's so all of the existing data can be maintained, and I > already have a working base on which to build a new set of page > templates. ( Only hole is the need for a decent javascript scheduler > function to replace the desktop one :( ) > > This is all running on SQL based schema's which have not changed in > years, and ADOdb still quite happily produces arrays of results for > which there is little point creating new 'objects', just simply handling > the basic variable entries in the arrays just as I have for years. The > various tools handle data validation, and 'null' is an essential > component of that validation process. This does not need any of the > overload of creating 'getters and setters' and I see little point trying > to add any 'type' casting into the process since the validation layer > simply works with the bog standard variables without and need for > 'special cases'. > > So what benefit does all of the additional 'facilities' now being piled > on give that would actually improve that process. I am now seeing a > speed improvement on the PHP7 ports, but I'm not seeing any point to > make any changes to code OTHER than making the PHP5.2 code clean on PHP7 > ... As Zeev has already said "PHP is not broken" ... Do I really need to > change the way I work which is running fine for my clients? > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --089e0158b3060c12610530f000d7--