Thread: PGSQL and XML

PGSQL and XML

From
Date:
With lots of help from folks on this mailing list, the readme files and other net sources, i've found a simple process for seeting up an WinXP box as PHP/PostgreSQL development environment.
 
Just as I was getting started to begin work on my PHP apps, I ran into this...
 
 
 
and the last message here...
 
 
Which put me in a dangerous state of mind - thinking.
 
Should I evaluate XML and XSL to see if it makes more sense using it than PHP scripting?  Is keeping the business logic separate from the presentation important enough to switch technologies (at least I'm at the beginning stages)? 
 
What is this Box stuff?
 
 
While Box has an open license, does XML require proprietary anything or license fees?
 
Does PGSQL integrate well with XML or is it a moot point?
 
Any experience and related input would be very much appreciated.
 
PS - Thanks to all for re-affirming my decision to go PGSQL and stick to it when my lack of experience got really frustrating!  ;-)


Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.

Re: PGSQL and XML

From
Josh Berkus
Date:
Hey,

> Should I evaluate XML and XSL to see if it makes more sense using it than
> PHP scripting?

That's completely up to you.   I will point out, though, that:
a) XML is a document spefication, not a programming language, so I am highly
suspicious of attempts to turn it into one.   This is not a statement on the
products referenced, as I've never seen them in action, just a statement that
you should evaluate them skeptically.
b) at least 50% of the value of any programming language is in the community
and modules available for it.  This makes Java and Perl more valuable than
PHP and Ruby, and any of those much more valuable than BOX, currently.  Of
course, things change.

>Is keeping the business logic separate from the
> presentation important enough to switch technologies (at least I'm at the
> beginning stages)?

It is important, but it can certainly be done in PHP.  Use OO-PHP.  Or use
stored procedures (functions) for your business logic; I'm fond of that
approach with PHP.

> What is this Box stuff?

Never heard of it before your e-mail.

--
Josh Berkus
Aglio Database Solutions
San Francisco

Re: PGSQL and XML

From
William Yu
Date:
operationsengineer1@yahoo.com wrote:
> With lots of help from folks on this mailing list, the readme files and
> other net sources, i've found a simple process for seeting up an WinXP
> box as PHP/PostgreSQL development environment.
>
> Just as I was getting started to begin work on my PHP apps, I ran into
> this...
>
> http://www.joot.com/dave/writings/articles/php/
>
> http://www.joot.com/dave/writings/articles/bsp/
>
> and the last message here...
>
> http://www.webmasterworld.com/forum21/3799.htm
>
> Which put me in a dangerous state of mind - thinking.
>
> Should I evaluate XML and XSL to see if it makes more sense using it
> than PHP scripting?  Is keeping the business logic separate from the
> presentation important enough to switch technologies (at least I'm at
> the beginning stages)?

I used XML and XSL to write my documentation to test how ready for
primetime it is. First of all, it requires either Mozilla or IE6+.
Second, both browsers implement it slightly different so the look is not
the same. There are XML/XSLT -> HTML transformation modules for
Perl/PHP/etc to support browsers that don't support XSLT but they take a
damn lot of CPU power.

The next part of the equation is that XML / XSLT are not programming
languages. What that means is that you still need PHP/Perl/Java/Python
to extract data from Postgres and output as XML. Then the XSLT
stylesheet you create to present the data is applied to the XML to
output as HTML.

Needless to say, outputting directly as HTML is much easier to do.

Re: PGSQL and XML

From
A Gilmore
Date:
operationsengineer1@yahoo.com wrote:
> With lots of help from folks on this mailing list, the readme files and other net sources, i've found a simple
processfor seeting up an WinXP box as PHP/PostgreSQL development environment. 
>
> Just as I was getting started to begin work on my PHP apps, I ran into this...
>
> http://www.joot.com/dave/writings/articles/php/
>
> http://www.joot.com/dave/writings/articles/bsp/
>
> and the last message here...
>
> http://www.webmasterworld.com/forum21/3799.htm
>
> Which put me in a dangerous state of mind - thinking.
>
> Should I evaluate XML and XSL to see if it makes more sense using it than PHP scripting?  Is keeping the business
logicseparate from the presentation important enough to switch technologies (at least I'm at the beginning stages)?   
>
> What is this Box stuff?
>
> http://www.joot.com/box/
>
> While Box has an open license, does XML require proprietary anything or license fees?
>
> Does PGSQL integrate well with XML or is it a moot point?
>
> Any experience and related input would be very much appreciated.
>
> PS - Thanks to all for re-affirming my decision to go PGSQL and stick to it when my lack of experience got really
frustrating! ;-) 
>


Im not sure I totally understand what your wanting, but Im assuming you
are looking to XML for the interface portion of your web app?

If thats it, look here : www.xulplanet.com

This only works in gecko based browsers, but its _very_ powerful.  You
will still need some kind of logic on the server side (I opt for PHP) to
create your XML docs and pass them to the client.  They can then be read
and acted apon by the browser using javascript.

Here are some quick examples, they have no logic applied to them, so
they don't do anything, but you get an idea of its potential :

http://xulplanet.com/tutorials/xultu/examples/findfile/findfile-popups.xul
http://xulplanet.com/tutorials/xultu/examples/ex_6_8_2.xul

This really has little to do with pgsql.  Recently I created an app
using this technology, pgsql on the backend, PHP for the server side
scripting and XUL/XML for the presentation.  Worked great, and I liked
the natural seperation of logic and presentation it created, that is
sometimes difficult in PHP.

It does rely on gecko (mozilla) so its not ready for a public internet
site, but for internal applications its great, since even if IE is still
required, you can provide firefox like some kind of runtime environment
for your web services.

A Gilmore