Re: Tidy HTML source?

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

 



"is ever generated by anyone at anytime?   Most pre-packaged applications
> such as blogs, CMS, picture galleries do produce HTML directly without
> template engines which would require a separate installation issues and
> dependencies which most designers try to avoid.  Even template engines
> have
> libraries of gadgets which do produce HTML directly."

Good point. That's the example I was looking for. Thanks. Just didn't make
sense late last night why you would go through all the effort and I did
read your thread. The \n\t\t\t was just meant to show one of the reasons
why I chose to move it out of the php code.

No doubt, is your solution impressive for the purpose it serves. I did not
mean to offend you in any way.
GL.
Fredrik
>
> ----- Original Message -----
> From: "Fredrik Thuresson" <ft@xxxxxxxxxxxxxx>
> To: <php-general@xxxxxxxxxxxxx>
> Sent: Wednesday, November 29, 2006 5:45 AM
> Subject: Re:  Tidy HTML source?
>
>
>> "At one point or another plain HTML has to be generated. "
>>
>> Care to give me an example? I never generate any html in my php code
>> anymore.
>>
> You are entitled not to, but stretching it to the point of denying that
> HTML
> is ever generated by anyone at anytime?   Most pre-packaged applications
> such as blogs, CMS, picture galleries do produce HTML directly without
> template engines which would require a separate installation issues and
> dependencies which most designers try to avoid.  Even template engines
> have
> libraries of gadgets which do produce HTML directly.
>
> So, you might not echo HTML directly.  That is fine, it is an option.
> This
> is not for you.  Evidently those who participated in these thread before
> do
> generate HTML directly because they are concerned about formatting it and
> that would be unnecesary if they used templates.
>
>> It's not very pretty when your code looks like echo
>> "\n\t\t\t\t\t\t<tr>";
>>
>
> Look at the examples I pointed to, you won't see anything like that.
>
>> Is that not a form of a templating engine that your are building?
>
> No, not at all.  Just read the document.  Moreover, I would appreciated if
> you read my e-mail in full, specially the part that says:  " I would
> appreciate any comment on the project, EXCEPT that you use template
> engines
> and that you do not generate HTML  directly."
>
> Satyam
>
>
>>
>> Fredrik
>>
>> Satyam wrote:
>>> May I invite you to check http://satyam.com.ar/pht/?   This is a
>>> project
>>> I started some time ago to help me produced HTML in a more clean and
>>> efficient way.  Usually, producing good HTML involves running a sample
>>> output through some HTML validator or looking at the HTML and checking
>>> it
>>> out by hand, which, of course, requires good formatting to make it
>>> understandable.   In the case of too dynamic HTML (meaning, output can
>>> vary widely) it is impossible to produce enough samples of all the
>>> possible outputs to get them checked out.
>>>
>>> So, my idea was to embed HTML into the language itself so that the
>>> final
>>> output could be checked at 'compile time' and even before, using the
>>> standard tools provided by the IDE (even just matching braces goes a
>>> long
>>> way into checking for missmatched HTML tags).
>>>
>>> The samples page (http://satyam.com.ar/pht/sample.htm) show several
>>> examples.
>>>
>>> I think that a tool such as this one might avoid any concern about
>>> tidying up HTML since, after all, most of the checking could be done at
>>> the PHP source level.   Further development (which I have not started
>>> yet) would lead to automatic verification against DTDs or XSchemas.
>>>
>>> And, of course, I would appreciate any comment on the project, EXCEPT
>>> that you use template engines and that you do not generate HTML
>>> directly.
>>> I've heard that and it is completely missing the point so, please,
>>> spare
>>> me that one.  At one point or another plain HTML has to be generated.
>>>
>>> Satyam
>>>
>>> ----- Original Message ----- From: "Mark Kelly" <php@xxxxxxxxxxxxxxx>
>>> To: <php-general@xxxxxxxxxxxxx>
>>> Sent: Tuesday, November 28, 2006 4:13 AM
>>> Subject: Re:  Tidy HTML source?
>>>
>>>
>>>> On Monday 27 November 2006 17:10, Mark Kelly wrote:
>>>>
>>>>> Am I crazy to make an extra effort in my code to make the generated
>>>>> HTML
>>>>> pretty?
>>>>
>>>> Thanks everyone for your thoughts on this - I'm quite relieved that
>>>> I'm
>>>> not
>>>> the only one who sits and tweaks so that the HTML is nice and
>>>> readable.
>>>>
>>>> It just struck me that trying to make my PHP spit out page source that
>>>> looks like it was made lovingly by hand was perhaps the work of an
>>>> obsessive.
>>>>
>>>> Now I know that even if it is, I'm not alone :)
>>>>
>>>> Cheers!
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
-Fredrik

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux