Make your site's content portable to remote consumers without a web service or RSS
I run a news Web site (obligatory applause), and one of the keys to us staying competitive is making our news headlines portabloe to other sites. It's a simple model: people put our headlines on their page(s), which link back to us. I figured out a way to do this
This is atually the pseudocode for a tutorial I did a couple years back for ASP101.com but it resurfaced recently, and some people thought it was cool in today's XML-friendly web:
- Connect to your data store (database, XML, Exchange, etc.)
- Write the content in JavaScript syntax to a .JS file that you save on your server (usually overwriting a file of the same name)
- Have ALL remote clients reference the full URL to your .JS file in the SRC attribute of <SCRIPT> tags:
- <script language=“JavaScript“ src=“http://www.somedomain.com/somedir/anotherdir/foo.js“></script>
It's a simple, 2-minute solution that practically all consumers will be able to use. Documenting and supporting it is a snap, and you won't need to worry about whether distant-end developers know how to consume XML Web services, RSS feeds, updating DLLs, etc. It's also usable in third-party hosting situations where supported services are a bit tighter than most. You write it once, update it as often as you see fit (my own implementation runs off of a scheduled Windows task).
Click here for the ASP 3.0/ADO source...let me know if you need it for ASP.NET. It's not posted, but I've got it.