I spent a few days designing and implementing the protocol that allows WordLand to be the writing tool for Bingeworthy, thus giving it a real writing and publishing function, instead of the usual ridiculous tiny little textbox. Today I'm going to make it work for writing and reading actual reviews for shows I have opinions about. I've always wanted to do this in a way that it's not just scattered into the wind, to rely on Google to find it again. Now I'll be able to scatter it, and also have it maintained in context, where it can help me remember what I liked about a show, and why perhaps I gave it an excellent rating when some parts really sucked. This was something that was missing in Bingeworthy, I knew it -- just didn't know how to make it work. Now I think I have it working.#
In Bingeworthy, I rate a program. Then I realize I want to say more, I want to write a review that explains the rating.#
I click on the Review in WordLand button. The bingeworthy client asks for a token from the bingeworthy server. The token is is part of the database record for the user's rating of the program being displayed. #
The button switches me over to WordLand using window.open, along with a package of data that gives the editor all the info it needs to update the post when published. It's worth clicking the link to see the data involved. #
In WordLand, I see a dialog confirming that I want to write a review for Bingeworthy. If I approve, it creates a new WordLand draft. #
I write the first draft of the review and when I'm ready I publish it. The protocol supports revisions, btw.#
When the user publishes, in WordLand it builds a URL with tv.bingeworthy.org as the destination. The post body has a JSON object with title and content properties, both of which can contain markdown. The URL params contain the id of the program, screenname of the user, the token that authorizes updating the comment for the rating of this program by this user. #
On tv.bingeworthy.org, if the token agrees with the one in the database, it updates the comment field of the rating, #
Then tv.bingeworthy.org sends a websocket message to the author, in Bingeworthy, so they can update the display of the rating for the user, if they still have the program displayed on their screen.#
I've done these kinds of protocols before, for example, menu sharing on the Mac in the 90s and rssCloud on the web. These are increasingly complicated things, because they require secure coordination between a circle of programs, and allow choice in each of the nodes. #
There's nothing hard-coded about the protocol only working for this pair of programs. #
It also supports updating. And the post is also available in WordPress and RSS, so even though it's editable in a great editor, and displayed in a collection of similar writing, it is also fully scattered into the wind. And there's no need for federation, it's just a protocol. We don't even rely on the apps using the same identity system.#
Last update: Tuesday January 21, 2025; 5:41 PM EST.
You know those obnoxious sites that pop up dialogs when they think you're about to leave, asking you to subscribe to their email newsletter? Well that won't do for Scripting News readers who are a discerning lot, very loyal, but that wouldn't last long if I did rude stuff like that. So here I am at the bottom of the page quietly encouraging you to sign up for the nightly email. It's got everything from the previous day on Scripting, plus the contents of the linkblog and who knows what else we'll get in there. People really love it. I wish I had done it sooner. And every email has an unsub link so if you want to get out, you can, easily -- no questions asked, and no follow-ups. Go ahead and do it, you won't be sorry! :-)