Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59854 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6842 invoked from network); 13 Apr 2012 06:37:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 06:37:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.45 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.210.45 mail-pz0-f45.google.com Received: from [209.85.210.45] ([209.85.210.45:65315] helo=mail-pz0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/01-01254-6B9C78F4 for ; Fri, 13 Apr 2012 02:37:42 -0400 Received: by dacx6 with SMTP id x6so3461974dac.18 for ; Thu, 12 Apr 2012 23:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=EVhwAb5YfU9ANFgX2dvBY4k4/gWI1PqGK6XTOAX3PIw=; b=reTooyrImbLfhAW/oWkyR1auBdRx9OICbpGJEh3MNsZY0ZHhl/+SiuQFGXZQczwURC MQDCVGtR2lnzlZeTrlY4C95HGNdgQ2mp1LAXdll/LfITz8zjVfcPwjg7xjsjdKupdQ4u 80T2wLm/7YaMGsKlErz5M4QAc0eZXIqd9nUU23nk7yEJF7gL5KXKgAZW3EHShzLm4SyT kJ3xrWpwCB9mh1KjtSUV0Zvr5ZnWlJ5G+hYgeONw1tIqsst1Ib+BhHFAij+kAZgxFdwM gzFZsDptw/f8JCmz/LczaFFXZWFwyr7uum7zSgRwOgfSiPLoFV88KoprbU9sF3aiqZy5 zxjg== Received: by 10.68.138.232 with SMTP id qt8mr2115864pbb.114.1334299059088; Thu, 12 Apr 2012 23:37:39 -0700 (PDT) Received: from [192.168.0.5] (dsl-202-173-152-56.vic.westnet.com.au. [202.173.152.56]) by mx.google.com with ESMTPS id p4sm7876101pbp.13.2012.04.12.23.37.36 (version=SSLv3 cipher=OTHER); Thu, 12 Apr 2012 23:37:38 -0700 (PDT) Message-ID: <4F87C9B0.4080809@gmail.com> Date: Fri, 13 Apr 2012 16:37:36 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Kris Craig CC: John LeSueur , internals@lists.php.net References: <4F876943.8030105@gmail.com> <4F877777.8050806@gmail.com> <4F8782CC.8030205@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: davidkmuir@gmail.com (David Muir) On 13/04/12 15:13, Kris Craig wrote: > Again, the controller should NOT be a .phpp file. Likewise, your model > should NOT be hooking directly to the view. The controller hooks to the > model. The controller then sanitizes that and returns it to the view. > Alternatively, if you're not conforming to a pure MVC standard, the > controller can also hook to a regular .php file in the model and pass the > data to that. Either way, it all passes through the controller. The model > and view should never be interacting directly. MVC or not, that's just bad > architecture and there are zero advantages to using such an ad hoc approach. > > If a developer insists on using such a broken model, however, they're more MVC is a broken model/bad architecture? > than welcome to! That's what people love (and hate) about PHP. It's > flexible. They just won't be able to use a .phpp file upstream from that, > as it is by its very nature inherently incompatible with such a broken > model. The only way to force it to be compatible would be to make the > .phpp file essentially meaningless. > > So if you're writing good code structure, a .phpp file will help you make > it even better. If you're writing bad architecture, then just keep doing > what you're already doing and don't worry about using a .phpp file! This > will in no way stop you from being able to do what you can already do in > PHP. You're just insisting on wanting to use a pure code file for > something that it's not intended to be used for. Just like having object > orientation added in PHP 5 didn't stop you from writing procedural code if > you want to, introducing this in PHP 6 won't stop you from writing > disorganized code if you still want to. What this will do is provide a > valuable option for people who do feel that writing clean, role-segregated > code is important. So basically, the only parts that might be ok to write as .phpp are some model and utility classes? David