Hello Chris,

On 14-Apr-01 16:07:59, you wrote:


>Alright I'll start this out by saying I have a subscription to "Visual Basic
>Programmers Journal". Before I converted and realized that I loved PHP so
>much I used ASP. Well it seems that in this magazine that XML is a hot topic
>in the MS world. I know XML can be used by PHP, but is there a point? I only
>know 2 things about it:
>1) You can make your own tags:
>            <mytag>    </mytag>
>2) It's supposedly good for databasing?

>If its for databasing, why not just use MySQL( or a variation). Am I missing
>something here?

Actually XML is yet another Internet mania, pretty much like Java.  Java
represented the dream of some programmers of "write once run everywhere".
XML represents the dream of one data/document source, many target medias
(HTML, WML, PDF, etc...).

The problem is that all this flexibility comes at a price, most frequently
CPU time.  For general Internet development this is a kind of waste,
because the usual latency in deliverying information is already a problem,
it gets worse if the information servers have to interpret Java programs or
process XML formatted information to serve the user requests.

Good sense tells that if you can serve content without going through the
hops of transforming raw data (database, etc...) into XML to later
transforme it into HTML, you'd better go directly from raw data to HTML or
else your hardware bill will be much higher when you attempt to scale up.

Now, if you mean to use XML for purposes that do not require extra
processing on demand when you are serving your content, it may provide
extra flexibility that may save you a lot and hand-programming.

Take for instance this example.  Metabase is a PHP database abstraction
package that lets you develop applications that are database independent.
This means that if you use Metabase you can write applications that may
work seeminglessly with different databases.  Just figure how much porting
efforts you will save when you figure that MySQL is not enough.

To help you develop fully portable applications, Metabase not only provides
a database independent API, but also provides a database independent means
to install and maintain database schemas.

Metabase uses a custom XML format to describe database schemas:  tables,
fields, indexes and sequences.  It comes with a parser that extracts the
schema description from those XML files.  Then the Metabase manager is able
to install that schema by creating all the tables and sequences that are
described.

If someday you change your database schema, Metabase manager is also able
to figure the changes and alter the schema of the previously installed
database without affecting any data added to the database since the it was
installed or updated for the last time.

Metabase manager is also able to dump in its XML format a installed
database schema along with any data stored in the database so you can
install it in another database server without information loss.

The use of XML in Metabase is just an example of how it can be used for a
purpose that improves your development process and does not affect the
ability of your applications to serve data to the users with great
performance impact, like when you get when you use XML/XSL to serve data on
demand.

Metabase is free and is avaliable here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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