Saturday, February 18, 2012

Comparing blog-order hacks #1: Reliability now and tomorrow

You can show your blog content in its original posting order, oldest first.

There are several approaches you can take, none perfect, as described here.

One way bypasses one set of problems by using third-party web services. Another bypasses problems with web-services by using Blogger's own architecture.

Which is best for your blog? Consider which is likeliest to hold up over time.

In this case, compare a web-services solution that I created and document on this blog with a newer script-based approach created by a Finnish programmer whose chosen Blogger name is MS-Potilas.

It's not a slam-dunk, but the new method is very promising.

A key issue for me in evaluating these methods is reliability. Changes to web services can ripple though web-services methods, requiring users to scurry to compensate.

Last year for instance Yahoo Pipes decided to paginate its feeds at 100 posts, affecting anyone using my web-services method on blogs of more than that.

I posted the workaround, but what a pain in the neck! I felt badly for everyone I had convinced to use my solution.

However, there is an equivalent issue for scripts that reorder content without thrid-party web services. Changes in how Blogger works, or in how different browsers work, can have similar side effects.

Recently for instance Blogger rolled out a new commenting feature that screwed up comments on many blogs.

These changes can and do break script-based hacks regularly.

My web-services method was in response to that: a popular javascript-based solution no longer worked on some browsers. These approaches kept breaking.

Web services let us avoid that problem by taking the blog content, in the form of the blog feed, completely out of the blog, manipulating it, then returning it to the blog as a script you just paste onto any static page. Brilliant, unless the web services fail.

I quizzed MS-Potilas about the robustness of his no-web-services script-based hack. Might it break someday as browsers continue to evolve?

No, in his view because "Javascript DOM [Document Object Model] handling is solid, so it won't break on future browsers."

Of Blogger itself he says
I don't think Google/Blogger will change the "old" (layout) templates, which the script works with, so DOM should keep intact, and DOM handling in javascript is done in just basic javascript, no tweaks or anything that might break on browser update.

Of course there is slight possibility that they change something so radically, that the script breaks, but that would be very difficult, with people having their customized templates, without breaking many other things at the same time.

For future templates the script might not work, but for current, it should not break.
I am a glass-half-empty kind of guy about these things, so I take this with a grain of salt. But just a grain.

See my conversation with MSP about these (and other) questions if you'd like to evaluate for yourself.

A related issue has to do with the maintenance of these solutions.

Any blog tweak can feel daunting and confusing and with the potential for error; it's a good idea to back up your template and make a disciplined little production out of every such change. But once you've done it, and it works, it's great and you are done with it.

That's how my hack worked a year ago, but thanks to changes in Yahoo Pipes last fall, no longer. Pipes now segments the hack into blocks of 100 posts. A blog of 350 posts needs four iterations, not one, to show all the content in chronological order.

Worse yet from my point of view, as that blog adds posts (at the 400, 500, 600-post mark, ad infinitum), additional scripts are required.

One hundred posts is a lot, depending on how you blog. But if you use Yahoo Pipes, as I do, you will never be done with the need to tinker. As of this writing, that is not true of the Finnish solution.

That is why I recommend that bloggers seeking to flip their blog content give MS-Potilas's script a try first.

If it doesn't work for you (and it may not) or if it breaks someday, then my blog-journey hack has the virtue of independence from changes to browsers and Blogger alike.

No comments:

Post a Comment