SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XML and "data-driven" websites "in?"

    I converted my organization's website "Job Opportunities" from a static page to database driven using Kevin's tutorial on PHP/MySQL.



    Human Resources (HR) is delighted, I as web manager, am no longer the bottleneck getting their updates on the web and the page is easily updated daily by HR.

    Now I have a new boss who says PHP/MySQL and database driven websites are "out." XML and "data-driven" websites are "in."

    So how would a "data driven" page based on XML have worked to better advantage? I am trying to get answers from XML websites and my boss, but so far just vague generalities that you can do "anything" with XML. Until I get further clarification from XML sites or from the boss, does anyone know practical uses for XML such as the above and how it presents a more viable option to PHP/MySQL?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    XML and "data-driven" websites are "in."
    What is "data-driven"? no need for a database? If your boss throws away Mysql then he must need other database software or he doesn't want any?

    If your boss throws away PHP, does he want Java or no programming language at all? incredible!

    BTW you can use XML with PHP/Mysql. Go to PHPbuilder.com and read these articles:

    XML How-To
    Using PHP and XML with Apache Cocoon
    PHP and XML: Using the expat functions
    Transforming XML with XSL using Sablotron
    DOM XML: An Alternative to Expat
    The web of services: using XML_RPC

    John

  3. #3
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in the instance you have described, i don't think that it would work better. I have played around with xml/xsl transformations with the web and what is nice is being able to separate the data from the display of the data.

    For example, lets say that you want to display your page with format layout "A" for client "A" and format layout "B" for client "B". When I say format layout, this can mean listing your information by date, by subject, by author, in a table, in frames...almost anything. no problem, your database will always output the same xml results (assuming they see the same information) but you apply a different xsl transformation to it depending on whether it is client "A" or "B".

    so your code would go something like this:
    if user == "a" {
    transform xml results with formatFileA.xsl;
    }
    else {
    transform xml results with formatFileB.xsl;
    }

    This may seem like overkill but it is nice if you have 20 screens that you want to display the same way or for cobranding or...for portability. you can create an xsl file that will transform your info. for display in a wireless device, or Adobe format (I think you can do this.) the possibilities are almost limitless but if you are always going to display the info the same way for the same audience, I don't know if doing all of this is necessary. thoughts?

  4. #4
    SitePoint Evangelist
    Join Date
    Jun 2001
    Location
    Houston, Texas, USA
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    An interesting article...

    I think it was devshed.com which had an article explaining how to use php with xml. How exactly are you suppose to program without a programming language? I guess you're suppose to code everything in XSLT?

    This sounds like a Dilbert cartoon.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •