[thelist] XML help for static site `Mocha Cafe`

Christian Heilmann codepo8 at gmail.com
Sat Feb 18 03:48:06 CST 2006


> so yesterday only i thought of using AJAX method [either XML or JSON] to get
> product infomation, but only way i know is throught php/mysql or even php
> will do [i guess, i have to see that how to...]. my real question is
> [strong]`how can i get infomation from XML or JSON`[strong] since i cant
> write any php or i dont have any database?

You are mixing and matching a lot here. It might be more helpful to
take a step back and check what you want to achieve and then pick the
technology to match.

AJAX is just a method to use JavaScript and the XMLhttprequest to load
data from the backend without reloading the whole page - you just
replace the parts that change. From a server perspective it is the
same thing as a dynamic page sending data to the server and reloading
the whole page.

So:
      XML - Data in XML format, encapsulating content in elements and attributes
      JSON - a JavaScript Object notation. Normally you'll use JSON to
send back data from the backend to a JavaScript that uses AJAX, as it
is already in a format that JS can read and you don't need to convert
XML to objects.
      PHP/ASP/Cold Fusion/Insertlanguageofchoice - a server side code
that connects the HTML layer with the backend, for example a database
      Static Sites - HTML that stays the way it is and is loaded and
immediately rendered
      Dynamic Sites - Pages that are in another language, do some
preprocessing or data retrieval from a database and then render out
HTML
     AJAX - using JavaScript to bridge the gap between static and
dynamic page by only loading and replacing elements that need to be
changed.

Does that help?

My tip: For any site these days - get a CMS (Joomla, typo3, hell even
WordPress) as it will enable others to change content without asking
you every two minutes for changes.

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list