There was never any doubt that I would ultimately take a hit somewhere ...
how much of one was really the question. I agree that in a sense you are
adding an extra step but that's not entirely accurate either. I would think
to avoid that "extra step" the page would need to be straight html and
that's it. Your first php tag adds the extra step regardless of what the
output is. So now I would think that it would hold true for the flip side of
the coin as well ... think of it as "saving" an extra step. If you know part
of the page is going to have to be processed through the server anyhow why
not just start with PHP and stick with it throughout the page instead of
jumping back and forth from PHP to HTML?

Yes, I totally agree that straight PHP requires a bit more overhead but I'm
still on the fence as far as efficiency goes.

- Ed

On Thu, Apr 22, 2010 at 8:02 PM, Jamie <[email protected]> wrote:

> I agree with Miles that you should just use static HTML wherever
> possible. It's just plain faster. If you use PHP to generate your
> HTML, then you're adding an extra step to the process: instead of just
> serving up plain HTML, the PHP parser needs to read the code,
> interpret it, figure out what to do with it, and then output the
> results. Not terribly efficient, especially if all you want is
> "<div>".
>
> Like you just said, your file size nearly tripled. You can generate an
> entire website with CakePHP's helpers, sure, but you'll sure take a
> hit in the efficiency department.
>
> - Jamie
>
> On Apr 22, 4:01 pm, Ed Propsner <[email protected]> wrote:
> > Yep, the entire page is full of 'em ... 8-). I was just goofing around
> with
> > it ... I wanted to see if the page could really be coded in nothing but
> cake
> > tags. In the end it turned out to be quite the project to code the entire
> > layout that way (the file size nearly tripled). Why is it that you would
> > suggest using all static divs? I'm contemplating putting it back the way
> > that it was but I'm really not seeing the difference at this point.
> >
> >
> >
> >
> >
> > On Thu, Apr 22, 2010 at 2:05 PM, Miles J <[email protected]>
> wrote:
> > > Wait, so your saying you used the HTMLHelper div() method to build
> > > everything? Should just stick with static divs.
> >
> > > On Apr 22, 2:34 am, Sam Sherlock <[email protected]> wrote:
> > > > I think its a question of clarity and ease to create maintain views
> >
> > > > - S
> >
> > > > On 22 April 2010 09:47, Ed Propsner <[email protected]> wrote:
> >
> > > > > I'm with ya' on  consistency and jumping in and out of php. The
> > > document
> > > > > seems to have a better flow and feel to it now that's it more
> uniform.
> > > If
> > > > > anything else it was good practice for someone new to Cake :)
> >
> > > > > - Ed
> >
> > > > > On Thu, Apr 22, 2010 at 4:35 AM, Jeremy Burns <[email protected]>
> > > wrote:
> >
> > > > >> I have asked myself this question too and posed a similar point
> (is
> > > using
> > > > >> Cake tags ultimately slower than straightforward html? to which
> the
> > > answer
> > > > >> was 'probably, yes'). However, I have adopted the Cake tag route
> > > throughout
> > > > >> because (i) it provide consistency, (ii) it means I am not jumping
> in
> > > and
> > > > >> out of PHP and (iii) it just feels 'safer' - pass in the right
> options
> > > and
> > > > >> out pops the right html. I guess it's a matter of choice?
> >
> > > > >> Jeremy Burns
> > > > >> [email protected] <[email protected]>
> >
> > > > >> On 22 Apr 2010, at 09:31, Ed Propsner wrote:
> >
> > > > >> Out of curiosity and perhaps a little boredom I re-scripted my
> > > default.ctp
> > > > >> to completely follow Cake conventions.
> > > > >> From the doctype to the closing html tag there is not a single
> > > > >> conventional html tag on the page.
> > > > >> 95% of my layout is structured with divs in lieu of tables so
> there is
> > > > >> quite a bit on the page as far as tags go.
> >
> > > > >> My question is this ... how much is too much? With the increase in
> > > file
> > > > >> size the pages will ultimately render slower,
> > > > >> or is this of little significance assuming how much time is really
> > > being
> > > > >> lost?
> >
> > > > >> I don't really see any immediate advantages besides consistency
> which
> > > in
> > > > >> itself works for me because I never cared much
> > > > >> for jumping in and out of php anyhow.
> >
> > > > >> - Ed
> >
> > > > >> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > >> others with their CakePHP related questions.
> >
> > > > >> You received this message because you are subscribed to the Google
> > > Groups
> > > > >> "CakePHP" group.
> > > > >> To post to this group, send email to [email protected]
> > > > >> To unsubscribe from this group, send email to
> > > > >> [email protected]<cake-php%[email protected]>
> <cake-php%[email protected] om>For more options, visit this
> group
> > > > >> athttp://groups.google.com/group/cake-php?hl=en
> >
> > > > >>  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > >> others with their CakePHP related questions.
> >
> > > > >> You received this message because you are subscribed to the Google
> > > Groups
> > > > >> "CakePHP" group.
> > > > >> To post to this group, send email to [email protected]
> > > > >> To unsubscribe from this group, send email to
> > > > >> [email protected]<cake-php%[email protected]>
> <cake-php%[email protected] om>
> > > <cake-php%[email protected]<cake-php%[email protected]>
> <cake-php%252bunsubscr...@googlegro ups.com>>For
> > > more options, visit this group at
> > > > >>http://groups.google.com/group/cake-php?hl=en
> >
> > > > >  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > > others with their CakePHP related questions.
> >
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "CakePHP" group.
> > > > > To post to this group, send email to [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<cake-php%[email protected]>
> <cake-php%[email protected] om>
> > > <cake-php%[email protected]<cake-php%[email protected]>
> <cake-php%252bunsubscr...@googlegro ups.com>>For
> > > more options, visit this group at
> > > > >http://groups.google.com/group/cake-php?hl=en
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> others
> > > with their CakePHP related questions.
> >
> > > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<cake-php%[email protected]>
> <cake-php%[email protected] om>For more options, visit this
> group athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]<cake-php%[email protected]>
> <cake-php%[email protected] om>For more options, visit this
> group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<cake-php%[email protected]>For
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to