OT. RSS feed.

R

Roedy Green

I am thinking of putting an RSS feed on my website to tell people of
recent changes to the Java glossary. I wonder what tools people use
and LIKE to prepare the XML. The file format looked almost simple
enough for me to roll my own tool that would generate both RSS and
HTML to include.

There seem to be so many RSS variants. What is the "McDonalds"?
 
D

Daniel Pitts

I am thinking of putting an RSS feed on my website to tell people of
recent changes to the Java glossary. I wonder what tools people use
and LIKE to prepare the XML. The file format looked almost simple
enough for me to roll my own tool that would generate both RSS and
HTML to include.

There seem to be so many RSS variants. What is the "McDonalds"?

RSS 2.0 seems to be popular enough. And we do indeed role our own
where I work. Dozens of different ways I might add :)
 
R

Real Gagnon

I am thinking of putting an RSS feed on my website to tell people of
recent changes to the Java glossary. I wonder what tools people use
and LIKE to prepare the XML. The file format looked almost simple
enough for me to roll my own tool that would generate both RSS and
HTML to include.

Good idea. That's what I'm doing now for my site.
I have done some HowTo's about that:
http://www.rgagnon.com/bigindex.html#java-xml

I have tried some (free) tools to create my feed but I went back to
TextPad!

Bye.
 
M

Manish Pandit

I am thinking of putting an RSS feed on my website to tell people of
recent changes to the Java glossary. I wonder what tools people use
and LIKE to prepare the XML. The file format looked almost simple
enough for me to roll my own tool that would generate both RSS and
HTML to include.

There seem to be so many RSS variants. What is the "McDonalds"?

Alternatively, you can use rome (https://rome.dev.java.net/) to
produce RSS feed in various formats. The library handles the
differences between supported formats without impacting the developer.
Once you have a servlet (or something similar) to produce a feed using
ROME, you can hook it up with feedburner (www.feedburner.com) which
will take care of HTML-ing the feed, as well as giving the users
options to bookmark it on various social bookmarking sites, add the
feed to various readers, provide statistics for the click-thru on the
feed items, etc. You can also get a user-friendly URL by doing so. A
good example can be http://feeds.feedburner.com/Techcrunch.

-cheers,
Manish
 
R

Real Gagnon

Does RSS require server side code or you do just create a great wad of
little xml files in a magic directory?

In my case, it's a simple XML file (with an XSL),
http://www.rgagnon.com/feed.xml

A dynamic RSS may be required with a bigger site where the updates are
coming from many contributors (like a newsgroup or a blog) but since I am
the only one making the updates, the TextPad solution is good enough!
 
R

Roedy Green

Does RSS require server side code or you do just create a great wad of
little xml files in a magic directory?
I had a look at cbc.ca's RSS. It appear to be just a vanilla HTTP
serve of an XML document. You would have to add that mime type.
They seem to drop elements more than a month old from the. XML file.
It is up to the client to hold onto them.
 
D

Daniel Pitts

I had a look at cbc.ca's RSS. It appear to be just a vanilla HTTP
serve of an XML document. You would have to add that mime type.
They seem to drop elements more than a month old from the. XML file.
It is up to the client to hold onto them.

Where I work, we show the latest N items, where N depends on the feed,
not time. We get so much content that you can miss items if you don't
check regularly, I think a time based approach would be better, but
I'm just pointing out that there isn't really a standard of which
items to remove.
 
O

Oliver Wong

Roedy Green said:
Does RSS require server side code or you do just create a great wad of
little xml files in a magic directory?

The idea behind RSS is that your web server hosts an XML file, which a
client (the RSS reader) will periodically download (say every 2 hours). I
forget the exact name of the elements, the the XML file holds a list of
entries, with each entry having a title, a summary, and a link to the
webpage where the full content can be viewed. So something like (again,
with fictious element names):

<rss>
<entry href="http://myblog.net/viewEntry.jsp?id=842">
<title>Pictures of my cat</title>
<summary>Isn't my cat adorable? Her name i... &lt;a
href="http://myblog.net/viewEntry.jsp?id=842"&gt;[Read
more]&lt;/a&gt;</summary>
</entry>
<entry href="http://myblog.net/viewEntry.jsp?id=841">
<title>My favorite song</title>
<summary>Here's the lyrics to my favori... &lt;a
href="http://myblog.net/viewEntry.jsp?id=841"&gt;[Read
more]&lt;/a&gt;</summary>
</entry>
</rss>

Note that if you include HTML in your summary, you have to escape them
one level, so that "<a href>" becomes "&lt;a href&gt;".

Because an RSS reader will download the RSS file periodically, it's
customary to make that file fairly small (for every reader who subscribes
to your site, you may get 24 or more hits per day; so with 100
subscribers, that's 2400 hits to your RSS file per day). Thus the RSS file
typically contains only the most recent 10 or 20 or 25 entries, depending
on how frequent the updates arrive.

It's up to the client software to determine which entries have already
been read by its user, and which are new, and they use various heuristics
to detect that stuff. Perhaps they keep a hash of all the old entry
elements or something along those lines.

If you already have server-side code to handle all your other stuff,
then you *probably* have all your content in a database somewhere, with
timestamps. If that's the case, you can generate your RSS feed dynamically
on the server. Simply run your SQL query to get the title, ids and
summary, and then truncate the summary at, say, 200 characters. Then
generate the XML file accordingly.

Otherwise, while it's possible do update the RSS file by hand, it's
tedious.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top