<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 19, 2014 at 10:13 AM, ianG <span dir="ltr"><<a href="mailto:iang@iang.org" target="_blank">iang@iang.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="">But this is not what well-written PHP programs do, IMHO, or at least<br></div>
they do not need to do that.  A well-written program can cache the<br>
entire lot, and write it out in one block.  For efficiency, for error<br>
handling, and for security.  So we can call this PHP practice for what<br>
it is:   bad!  no surprise there.<br>
<br>
Bring on other examples!  I'll lay 10 to 1 that most dynamic page models<br>
are really datagram models.</blockquote><div><br></div><div>Rails started by only allowing the entire page to be calculated first before writing it to the wire. This had the unfortunate problem that the server could not emit the page header prior to working on the body, so the browser was prevented from fetching scripts and stylesheets in parallel as the page was calculated.</div>

<div><br></div><div>That's not to say this doesn't fit your suggested messaging/datagram model, just that producing the page header (at the very least) prior to the rest of the page confers some performance advantages.</div>

</div><div><br></div>-- <br>Tony Arcieri<br>
</div></div>