XML for my product lists and rollover menus?
August 27, 2006 4:42 PM Subscribe
Are there any good XML/XHTML frameworks for using XML data to automatically populate both/either web page content and JavaScript rollover menus?
I'm working on a website for a client; it will basically be an online brochure for available products in a bricks-and-mortar store (without any merchant features). We've already decided that this site will have an index page with a rollover menu, and that the menu will link to subpages populated with product content.
I've now realized that, as opposed to writing everything out in (X)HTML, I could compose XML files with all the appropriate product data - a field for the product name, description, thumbnail filename, full-size filename - and make a general template page that could read XML data and populate a list with it. While we're at it, why not do the same thing for the navigation menu? Not only would that allow me to flexibly change the product menu whenever I want, but it would keep the menu consistent for the whole site. As a former applications programmer (ASP, C++, SQL), this sounds like life would be great if I could get both to work.
So before I either try writing this in PHP (which is a new language for me) or contracting the work out on some freelancing site, does a framework or template exist (open source, perhaps) to just drop this into my site and go with it? Or is this application really simple enough to do in an hour of my spare time? If I have to code it myself + debug it, I may simply do everything by hand in existing authoring programs the way it is classically done, at the expense of tedium in making future updates. (Plus, I have to provide deliverables to my client sometime in the next few weeks. In this case, "finished quickly" is way better than "elegant".)
posted by brianvan to computers & internet (4 answers total) 2 users marked this as a favorite
Have you considered using a pre-written Content Management System that would generate the appropriate output? This would allow the client to change product data through a web interface and for the site to be dynamically generated based on the current data, without having to custom-develop a dynamic site like this. I don't have any suggestions, but others might.
Otherwise, you could always fall back on your experience and build a database-based site. If you use a toolkit like Ruby on Rails, Maypole, or whatever floats your boat, such a project would be fairly simple.
In addition, Dreamweaver and GoLive have a number of tools for building database-driven sites that turn the process into literally a point-and-click operation. These applications also have strong templating features that you could take advantage of if you go with a static site.
Lastly, I would make sure that a dynamic site is really appropriate for this task. Depending on how frequently the data would be changed, a static site in (X)HTML might well be far cheaper, easier to build, and more suitable for the task at hand. You might want to present the situation to the client: offer them a static site that will take you less time to build and hence cost less, or a dynamic site with more upfront costs, but where it is free for the client to make changes later.
posted by zachlipton at 5:12 PM on August 27, 2006