Alex Black wrote:
> >> part of the point was for _PHP_ to be embedded html, in my opinion your
> >
> > It was created that way. It still is possible. Is can be quite handy,
> > sometimes (or often, depends on what you do). That doesn't mean you have
> > to use it.
>
> I'm not implying that there are rules etched in stone somewhere, but I am
> trying to prove a point, because I see many people making the "echo"
> mistake, which makes their otherwise great code much less useful.

I have to admit that I generally prefer echo because it doesn't break the 
indentation of the PHP-code, and, uhm, I just don't like your way. It seems 
to be the other way around with you. EOT?
BTW, this doesn't mean I _like_ echo.

> > Code that uses templates tends to be very reusable, at least it is VERY
> > easy to change the design.
> > And if the design is done by a designer who doesn't know PHP, it may also
> > be done faster.
>
> The code I have to maintain (single-handedly when it comes to html) for
> even very large stuff inside of binarycloud is pretty simple.

Seems like we just have different needs here.

> Maybe if you have a badang-crap html editor :) Try using emacs, BBEdit,
> HomeSite, or any of the other quality editors out there.

lol, ever seen a designer using emacs?

> my system does loops with php code.
>
> it is very important to note that that code need not be embeddedin the same
> file as the markup.
>
> for example, I need a "style" for an individual record coming out of a
> database. so I make that html, put a little function "tag" around it"
>
> <? fucntion hello($stuff) { ?>
> <font color="#999999"><b><?=$stuff?></b></font>
> <? } ?>

This is extremely ugly PHP with some readable HTML embedded. Since I tend to 
find HTML ugly as well...
Never mind.

> That is an intentionally simplistic example, but you can obviously see that
> if a php coder tells the html coder "that bit of html is going to be looped
> for as many records as we get out of the database - they html coder should
> think accordingly.
>
> After all, we really aren't talking about "rocket science".

Believe me, if you don't completely seperate logic and markup, most designers 
won't be able to edit your design freely without quite a bit of learning.
I'm sure designers become more comfortable with "pure" HTML as it is found in 
templates.
Well, our code runs a few sites now, all of which have completely different 
layouts. I mean, it would't be easy for a designer to change not only the 
look but also number and position of navbars on a site with your system, 
would it? Without touching your codebase (so that all your sites run the same 
code, they would become unmaintainable otherwise).
Well, even if it wouldn't be that much of a problem, it still is easier with 
templates. As you admitted, doing it with templates is cleaner, on the HTML 
part. This can be important, if when you change layout often and have to work 
with designers.
Of course, execution times are pretty slow (or worse, depending on 
complexity).
As I said, a world of tradeoffs. Can we agree on that?

Wagner

-- 
One maniac alone can do what 20 together cannot

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to