-- Luke Richards <[EMAIL PROTECTED]> wrote
(on Tuesday, 20 May 2008, 03:39 PM +0100):
> I looked through 'Part 2' quickly. Something that did catch my eye was the 
> part
> where you return the response from the front controller in your bootstrap and
> set the content type header to be text/html. I assume you've done this to set
> the UTF-8 encoding? What happens if you want to return JSON, XML or file
> downloads from part of your application as a response? The response object
> force ably overwrites any headers set to text/html.

I have to agree with Luke here -- this is a really bad idea if you want
to send alternate content types later. I'd suggest setting this in an
early-running plugin instead, so that it can be overwritten later by one
of your actions if needed.

<snip> 

> Just a suggestion (I've not actually tried the code so I'm not sure if it
> works, specifically ..._HelperBroker::getHelper part as the method isn't
> defined as static?? Although the method does seem to be able to operate as a
> static?? Can anyone explain?).

Use ::getStaticHelper() instead, which _is_ static:

    $viewRenderer = 
Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');


> Viper X wrote:
> 
>     Hi all there.
> 
>     I'm writing simple web application to be used from me as "kick-start" when
>     starting new application, which needs user registration and 
> authentication.
> 
>     I think it can be interesting for someone to see my approach to the 
> problem
>     and eventually to use some of my code for his own purpose :) So i decided 
> to
>     put the code along with some descriptions to a blog series here:
> 
>     http://zfsite.andreinikolov.com http://zfsite.andreinikolov.com
> 
>     Now there is only the first part - setting up the MVC, later today I hope 
> I
>     will manage to write the next part - putting the session management in the
>     database.
> 
>     I'll appriciate any comments on it.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to