Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This used to be fairly common. Reddit is another site. A company I worked at.aroind the same time also had .xml, .rss, .atom. .xml would serve up the raw xml our middleware generated, which was normally "rendered" via xsl (what can I say to redeem myself for that?) server side. It was great for both debugging (you could browse the site in "xml mode") and to provide an API.

I still like the url approach - being able to browse until you have the view you need, and then just copy the URL and change format in order to find the right API call can be very nice. The challenge, of course, is that you need to be very cautious about which urls you guarantee will be stable, or you'll be locked into a site structure you might regret.



> xsl (what can I say to redeem myself for that?)

Why? XSL is awesome even if a little arcane now.

Time makes fools of us all.


Try to format dates in a generic way with XSL.

It's doable. It's also a massive pain.

The big problem was that the easy way out is that your XML ends up being changed to be "XSL-friendly", which means a ton of concessions that effectively encodes knowledge of the expected presentation no matter how much you want to keep it largely semantic.

Small presentation changes far too often result in changes to the XML to accommodate weaknesses in XSL.

I still like the idea. But not the use of XSL to achieve it. Unfortunately, we don't have any great alternatives that aren't horrible in all kinds of different ways.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: