Ask a Question related to PHP Development, Design and Development.
-
Jim Lucas #1
Re: [PHP] Frequent Mode Switching
This method has been my personal choice for the past 3-4 yrs in coding,
I have not found any problems with it thus far.
But I am gradually switching all my code over to a seperate template style
design as where I have all my values in a variable format and then parse a
*.html file and str_replace() all the values accordingly.
I have found no significant performance difference between <?= **?>, echo
"";, print()
But I have found a much cleaner method by using the templateing method that
I am switching to.
To sum it up, if you are concerned about performance, I wouldn't worry too
much. But if you are worried about readability, I would stick with the <?=
** ?> method myself. It keeps everything flowing in the script.
Jim Lucas
----- Original Message -----
From: "Derrick Fogle" <derrick@foundationcomputing.com>
To: <php-general@lists.php.net>
Sent: Tuesday, August 05, 2003 2:13 PM
Subject: [PHP] Frequent Mode Switching
> Thoughts on frequent switching in and out of PHP mode:
>
> <? switch in, do some code
> ?>Switch out, static HTML
> <? switch in, do more code
> ?>Switch out, more static HTML
>
> I've found that I prefer programming this way, for the most part,
> putting most of the heavy PHP programming at the top, and then using
> static HTML interspersed mostly with quick <?= $variable ?> statements
> for what users see.
>
> I'm sure there's more than one viewpoint out there, so I'd like to hear
> a couple of them. Is this frequent mode switching good, bad, or
> indifferent? Is there a point at which the mode switching starts to
> seriously degrade performance and reliability?
>
> -Derrick
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>Jim Lucas Guest
-
Frequent quitting
I have a project running that consists of a series of medium resolution images playing randomly. It's on a recently purchased Windows XP machine... -
PS CS crashing when switching screen mode
I'm freezing up when hot keying through screen mode quickly. This doesn't happen when I do slowly. I'm on a G5 running10.3.2. Anyone have similar... -
frequent crashes
Yes me too. I tried ditching the prefs and Apple's disk utility. Still the same. It seems more stable for a while after doing this and then off... -
frequent CS crashes on a new g5
Something is wrong, i just purchased a new dual g5, with 2 gigs or ram runing panther and photoshopCS. and it keeps crashing, about an hour after i... -
Frequent Mode Switching
"Derrick Fogle" <derrick@foundationcomputing.com> wrote in message news:B4735EB9-C789-11D7-9AA8-000393C7877A@foundationcomputing.com... I used... -
Chris W. Parker #2
RE: [PHP] Frequent Mode Switching
Derrick Fogle <mailto:derrick@foundationcomputing.com>
on Tuesday, August 05, 2003 2:14 PM said:
In that case you will want to adopt a templating system. Smarty[1] comes> I've found that I prefer programming this way, for the most part,
> putting most of the heavy PHP programming at the top, and then using
> static HTML interspersed mostly with quick <?= $variable ?> statements
> for what users see.
to mind first.
chris.
[1] [url]http://smarty.php.net/[/url]
Chris W. Parker Guest
-
Reuben D. Budiardja #3
Re: [PHP] Frequent Mode Switching
On Tuesday 05 August 2003 05:13 pm, Derrick Fogle wrote:
As long as you're organize, and consistent, and coding readably, that should> Thoughts on frequent switching in and out of PHP mode:
>
> <? switch in, do some code
> ?>Switch out, static HTML
> <? switch in, do more code
> ?>Switch out, more static HTML
>
> I've found that I prefer programming this way, for the most part,
> putting most of the heavy PHP programming at the top, and then using
> static HTML interspersed mostly with quick <?= $variable ?> statements
> for what users see.
>
> I'm sure there's more than one viewpoint out there, so I'd like to hear
> a couple of them. Is this frequent mode switching good, bad, or
> indifferent?
be fine.
Basically what I do is I try to separate programming/logic with presentation
as much as possible. Put most programming on the top (PHP, Database query,
etc) and presentation on the bottom (HTML part with some PHP for logic and
displaying variable).
Not that I know of. I am pretty sure the answer to your question is No.> Is there a point at which the mode switching starts to
> seriously degrade performance and reliability?
RDB
--
-------------------------------------------------
/"\ ASCII Ribbon Campaign against HTML
\ / email and proprietary format
X attachments.
/ \
-------------------------------------------------
Have you been used by Microsoft today?
Choose your life. Choose freedom.
Choose LINUX.
-------------------------------------------------
Reuben D. Budiardja Guest



Reply With Quote

