[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CGI::Aplication and PHP


-- Dan Horne <suppressed> wrote
(on Monday, 30 August 2004, 01:31 PM +1200):
> It looks like I could be starting a piece of work using PHP and MySQL. Well
> I've spent the last month playing with CGI::Application, and I seemed to
> remember coming across mention of a PHP port on this list. A quick Google
> has identified the software
> (http://weierophinney.net/matthew/content/downloads.html), but I'd like to
> know if there are any gotchas that I should be aware of, before I go
> charging in and recommending this technology to the customer without having
> used it. I have used and feel comfortable with Smarty, so I guess if just
> comes down to the port. Has anyone used it? If it's just the same as
> CGI::Application in another syntax, I guess it'll be fine

I've seen quite a number of downloads, but nobody's reported to me their
experience with using it. 

I've been using it for all new development where I work (a PHP shop),
and haven't run into any 'gotcha's'. The one thing that *is* different
than CGI::App + HTML::Template is the order in which you do some of the
templating operations. Smarty requires you assign values to the template
*before* specifying the template, so you typically do something like:

    $this->tmpl_assign($values);
    return $this->load_tmpl('template.html');

instead of 
    
    $tmpl = $self->load_tmpl('template.html');
    $template->param(\%params);
    return $tmpl->output;

If you have any questions, please feel free to contact me.

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.