 |
Tuesday, July 02, 2002 |
On Saturday we went to a sluggish carnival on 66th and Portland in Richfield. The operators were responsible for several rides each and when they saw someone waiting for a ride, they would walk over to that ride, let the one or two people on and then let the thing run until they had some signal from the riders. Each ride warned visitors with a sign of a smiling guy with his head wrapped in bandages and a big line through him. "No Recent Surgery" As if this guy just left the hospital after a dura-mater transplant and decided to hop on the tilt-a-whirl with only an ace bandage holding his head together. We couldn't convince Maggie to go on any rides. She really really wanted to, but when it came time to bite the bullet and step on to the car ride, she just couldn't do it. Luckily we just had one ticket. I used it on the giant slide after Maggie refused to go on it and I had to walk her down the steps. $2.50. I would have had a wilder ride if I spent that money on a double Latte at Dunn Bros. It was kind of painful to see Maggie really wanting to do something but unable to overcome her fear.
9:14:56 PM
|
|
PRE
What I don't know is truly amazing. It got less amazing with the discovery of the <PRE> tag. I have lived with the browser's way of ignoring whitespace and linebreaks of preformatted text. Now that this radical new tag has been tested to my satisfaction over the past four years or so, I can surround that text with the <PRE> tag. This is especially helpful in outputting queries to the screen for debugging. If I just did print $query, I would get a mashed text output that was hard to read. Now with print "<pre>$query</pre>"; I get a nicely formated SQL statement. Works great with outputting Get, Post, Session and Environment variables during debugging.
9:02:19 PM
|
|
In a fit of optimism, I bought a book called PHP and XML. This book is brand new and discusses a bunch of PHP functions that are listed as being in the experimental phase on the PHP web site. The book never clearly states the experimental nature of all of these functions, which could completely change in name and behavior in the next release. The book is so new that the forum and errata list on the web site for the book is still empty except for one question that I posted (which is still unanswered). But I feel like this subject is going to take off. PHP's XML related functions are starting to become more sophisticated. People are realizing that XML is the pathway to web services, powerful templating, SVG, and other technologies. There are really two problems to address when dealing with XML related technologies. One is how to create and manipulate xml files "on the fly". The book covers this extensively both through PHP's SAX extension and through the DOM functions that PHP provides. There is an entire chapter on transporting XML back and forth between XML and a MySQL database. The second problem is how to transform XML data into pretty layouts. The book covers the PHP XSL functions but holds back from any details about the XSL language. I guess XSL warrants a book all to itself. I would recommend this book for people who know PHP but are beginning to learn XML.
I am convinced that the best way to do templating is with XSL and XML. Templating systems like PHP Smarty and others are limited by attachment to a particular language. PHP's cross platform and cross server abilities can be enhanced by the universality of XML technologies.
8:19:47 AM
|
|
© Copyright 2003 mcgyver5.
|
|
|