Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38744 invoked from network); 13 Apr 2012 17:41:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2012 17:41:07 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:54813] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/93-35770-235688F4 for ; Fri, 13 Apr 2012 13:41:07 -0400 Received: by wgbdq13 with SMTP id dq13so2681030wgb.11 for ; Fri, 13 Apr 2012 10:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N6qxNU0utPF+CP/HCJT6RzQt/i/O5E/xbpB/tSqJR5w=; b=YgXpgI1t39yW9S6ifiId99nB/V+OUbeR13XHJ734A3W7I1Giq7tbseYYT/6rP48sWc spPFNQ1GPGsh9C2PzVb7bdQUXovodRfltq5/hT0yARkyy1mdeNNAShBuHmHPnkXiO1/J mx7ohGjug7ZJmdmyCmva2ZTcZE6QohSBAPrOC+T8uaVLbH4ei20WLfZycSL+sZ8yIj4T T/FB8P+y05VgCfjdnupT/x5GGReUslA2JWFABS6d/Sv2lILDBpZfk53EeVJTrSfeHUdM Vq9EypzWQCcWxkHe/GGJSUxtWsj1dt9umON92ewR/JJ/0cx3QfcVyWrZe1UGkmDqH599 qf/Q== MIME-Version: 1.0 Received: by 10.180.91.168 with SMTP id cf8mr5948096wib.0.1334338864001; Fri, 13 Apr 2012 10:41:04 -0700 (PDT) Received: by 10.223.79.67 with HTTP; Fri, 13 Apr 2012 10:41:03 -0700 (PDT) In-Reply-To: <4F87C9B0.4080809@gmail.com> References: <4F876943.8030105@gmail.com> <4F877777.8050806@gmail.com> <4F8782CC.8030205@gmail.com> <4F87C9B0.4080809@gmail.com> Date: Fri, 13 Apr 2012 10:41:03 -0700 Message-ID: To: David Muir Cc: John LeSueur , internals@lists.php.net Content-Type: multipart/alternative; boundary=f46d04389347ffb38b04bd92f906 Subject: Re: [PHP-DEV] [RFC] New .phpp File Type for Pure-Code PHP Scripts From: kris.craig@gmail.com (Kris Craig) --f46d04389347ffb38b04bd92f906 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 12, 2012 at 11:37 PM, David Muir wrote: > 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? > Arrooo? Not sure where you got *that* from, as it's basically the exact opposite of what I said.... > > > 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? > Essentially, yes. Despite your implication, often times these components make up the vast majority of a modern PHP application. > > David > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --f46d04389347ffb38b04bd92f906--