Newsisfree offers a new web service: hpe.searchItems, i.e., keyword-based seaches for news. I have created three new news services: enterprise architecure, web services, and service oriented architecture.
Category: Collective Web
-
Mature standards
InfoWorld: Web services maturity, benefits emphasized quotes Bob Sutor, IBM director of Web services technology:
Web services is a maturing technology and IT shops need to recognize its benefits now, rather than holding off until ongoing standardization efforts conclude… Web services is no longer a brand new technology and that Web services need to be brought into the “ecosystem.”
Microsoft’s Don Box (in SOAP author says enough specs already) comes up with four tips for developers:
Read fewer specifications, write more applications, write less code by using tools that generate code automatically, and remember that humans matter, so if you must write a specification, make it legible…
XML is by now “pretty stable,” Box said, and “the Holy Trinity” of Web services — meaning SOAP, WSDL and UDDI — are “complete enough for most developers to use.”
-
Newsisfree tools revisited
Mike’s been extremely helpful with my Newsisfree tools, and my searchSources service now works (source; there’s also a hardcoded term version (source)).
Do note that the search is done only in the name field. I have suggested Mike to also make it seach the description; so that my blog turns up in a search for “gov” 😉I now have all the bricks I need to use Newsisfree efficiently. Stay tuned.
-
Newsisfree tool
Here’s a nice learning example about using XML-RPC and Newsisfree.
In Newsisfree all sources have unique IDs. My blog is 1611, for example. In the web service, there is a function called hpe.getSource, which retrieves the metadata and a list of news items for a given source. I have used this in tweo different ways:
- The Lookup Tool: Sourcecheck (source). Form for looking up news from a given source
- The Retriever Tool: Sourcecheckbyurl (source), which does the same, but via the URL (e.g., sourcecheckbyurl.php?idnumber=1611)
The observant reader will notice that the only difference between the two tools is that the lookup tool uses HTTP_POST_VARS and the retriever uses HTTP_GET_VARS. In good RESTian spirit I will use get in my further work.
I have problems with hpe.searchSources (Source). Anyone see where the problem is?
-
Blogging together
I have written about trackback pinging before. My first experiment was interesting, but still needs to be wrapped up. Or maybe I’ll drop it, because there are many other interesting ideas floating around:
TrackBacks are comments. They are comments left on someone else’s site rather than your own, but they are comments nonetheless. Movable Type makes a distinction between entry comments and TrackBacks that seems artificial, and it made more sense to me to have TrackBack ping data appear within the comments portion of a Movable Type site.
SimpleComments is a new MT-plugin that puts comments and trackbacks together, so they are merged into a single list/thread. This allows us to have distriibuted debates. If you want to comment on my writings, you don’t have to use my comments form; you can just make a trackback ping.
There are of course many issues related to trackback pinging. Even though the Trackback system itself is a standalone system, it is as far as I can see only working with Movable Type and a few other systems. But Trackback and Radio doesn’t really work together, or do they? And how about Blogger?
-
Linking up the link tag
Udell’s The name game about URL politics and principles is important.
My private coding adventures with bookmarklets and auto-discovery continues. I am doing stuff that Alan can only imagine, and appearently others too, because I have not yet found anyone who can help me out. So, I decided to take a slightly different route in order to get to where I wanted. And where is that again? Here:
That’s a screen dump with what happens when I click on my bookmarklet on W3C‘s site. I don’t have to fill in anything besides picking a category (which can of course be preset). The rest of the information is filled in automagically, partly by the bookmarklet and partly with a small spider I ended up using to go and discover XML/RSS-feeds. Until I get the bookmarklet right (testers, mail me), the spider has a webinterface too, so try the autodiscovery there (fetching description is not there; it’s still in the bookmarklet, but the XML/RSS-autodiscovery should work.How? Appropriately, Sam Ruby today wrote P.S. Consider adding a link tag to your blog…. The same message goes from me, because the link tag is all a site needs for my spider to work. It’s not that I don’t like the small orange buttons everywhere, but from now on, I don’t need them if people just follow Sam’s (and others‘) advice. I think my blogging tool of choice supports link tags by default, but I am not sure about the other tools out there. Many Radio-sites doesn’t use it, I notice. Anyway, every blogger should be able to manually add the title tag, which only needs done once and for all, so please, go ahead and add it.
-
DOMocracy
Jon Udell tells A tale of two book sites about Bjørn Lomborg’s book in various contexts. Even though I had enough of Lomborg (he’s been en TV a lot here in Denmark), I found the example interesting. Nice one, Jon.
The technically inclined will also want to read Jon’s Revisiting the scriptable DOM. I’m glad this ball is rolling.
-
Coding for automation
Warning: Code ahead …
What is a perfect tool for a lazywebber like me, who wants to maintain a directory of resources? I need a tool that makes adding stuff to my database very easy. I want my bookmarklets. These small pieces of code that are used in the browser are not ideal, but does a great job, and are able to do small, disruptive wonders. The first generation bookmarklet were simple, but efficient tool, such as the dictionary look-up helper that redefined “smart tags”. We currently see a new generation of bookmarklets adding LibaryLookup, auto-discovery, trackback pinging feautes, and …
I’m going to look again on my bookmarklet. It looks like this [1]:
javascript:
1. if (m0=document.getElementsByTagName(‘META’)[‘name’,’description’]){metatagged=m0.getAttribute(‘content’)};
2. else if (metatagged=document.selection?document.selection.createRange().text:document.getSelection());
3. void(openstring = ‘http://slashdemocracy.org/links/page.php?do=add&Contact_Name=John&Contact_Email=john@slashdemocracy.org&cat_id=84
&URL=’ + window.location.href + ‘&Title=’ + document.title + ‘&Description=’ + escape(metatagged));
4. void(window.open(openstring,”,’width=900,height=400′));Let us go through the lines one by one:
Line 1: getElementsByTagName (surprise!) gets elements by tagname, here the -tag, specifically the metatag with name=description. If there are such tag, it’s content is put into an array (?) called metatagged.
Line 2. If there is no metatag called description, we use the selection mechanism and createRange instead grab selected text, and put that in the array instead.
Line 3. We use openstring to call a carefully designed, but rather long, URL which we now start constructing.
First, we set a few constant parameters, such as who I am.
Second, to get the location (URL) we use window.location.href. [This is not W3C-DOM!]
Third, to get the title we use document.title. I guess we could use the metatagged method too, but why should we? [I’m not sure whether this is W3C-DOM]
Fourth, we add the description we have in the metatagged to the URL-string.Line 4: We open a new, smaller window in which we call up the designed URL.
In action, the bookmarklet would open a window with a form with pre-filled content:
I can now edit everything, for example pick another category (I pre-set one in the URL-string, Line 3 above), or edit the description. But I can also just confirm everything, and click Add Link. Can it be any easier? The full operation of adding a link consists of three clicks: one on the bookmarklet, one on Add, and one to close the resulting window.
#
Up next: more automation.
One of the interesting “new things” on the web is markup for auto-discovery. This is a code snippet you add in the HTML-document head, such as:
<link rel=”alternate” type=”application/rss+xml” title=”RSS” href=”http://slashdemocracy.org/gotzespace//index.rdf” />
<link rel=”alternate” type=”application/xfml+xml” title=”XFML” href=”http://slashdemocracy.org/gotzespace/xfml.xml” />These two examples point to two XML-files (RSS and XFML), which can then be auto-discovered by tool that can go and discover things.
Specifically, I want to have my bookmarklet auto-discover RSS-feeds. Mark Pilgrim has looked at this for Amphetadesk. Diving into his code:
1. javascript:void(d=document);void(el=d.getElementsByTagName(‘link’));
2. for(i=0;i<el.length;i++){if(el[i].getAttribute(‘rel’).indexOf(‘alternate’)!=-1 && el[i].getAttribute(‘type’).indexOf(‘application/rss+xml’)!=-1)
3. {void(location.href=’http://127.0.0.1:8888/add_a_channel.html?unknown_url=’+el[i].getAttribute(‘href’)+’&go=1′)};};First, in Line 1, the author has also found getElementsByTagName, which here is used to check the link tag. In Line 2 we check for relevant tags in order to find the RSS feed. If we find such, we go to a special URL. I’ve tried it in my Amphetadesk, and it works. Exactly as described, that is. If there is no auto-discovery tag for RSS, the bookmarklet does nothing.
Hacking on this, we get:
javascript:void(d=document);void(el=d.getElementsByTagName(‘link’));for(i=0;i<el.length;i++){if(el[i].getAttribute(‘rel’).indexOf(‘alternate’)!=-1 && el[i].getAttribute(‘type’).indexOf(‘application/rss+xml’)!=-1){void(location.href=’http://slashdemocracy.org/links/page.php?do=add&URL=’+el[i].getAttribute(‘href’)+’&Contact_Name=John’)};};
That actually works, but is not good enough.
So, let’s see: Something like this should work, I thought:
javascript:void(d=document);void(el=d.getElementsByTagName(‘link’));for(i=0;i<el.length;i++){if(el[i].getAttribute(‘rel’).indexOf(‘alternate’)!=-1 && el[i].getAttribute(‘type’).indexOf(‘application/rss+xml’)!=-1){rssfeed=el[i].getAttribute(‘href’))};void(location.href = ‘http://slashdemocracy.org/links/page.php?do=add&Contact_Name=John&Contact_Email=john@slashdemocracy.org&cat_id=84&URL=’ + window.location.href + rssfeed + ‘&Title=’ + document.title + ‘&Description=’ + escape(metatagged));
But it doesn’t. What’s wrong? Please HELP! Any real coders out there?
[1]: A bookmarklet is literally a string of code (javascript). No line-breaks nor line-numbers should occur in bookmarklets, but have been added here for the sake of readability.
-
More OPML than Dave
Following up on yesterday ‘s post, I have now made GotzeLinked available in simple OPML. There are some 1000 links in more than 50 categories (example: Blogging), all of which are now available in OPML. Search results are available too (example: Udell).
I have added an auto-discovery feature on all category pages:
<link rel=”directory” type=”text/x-opml” title=”Directory” href=”http://slashdemocracy.org/cgi-bin/page.cgi?…t=opml”>
That is parallel to the blogroll auto-discovery. I use rel=”directory” to indicate that this is a directory.
-
Who wants some OPML?
Dave Winer, soon to be found here, doesn’t need to pay me to read this: … get started building a directory for each of three subjects you’re passionate about and knowledgable of.
I already have my GotzeLinked directory, and there at least three categories I’m passionate about and knowledgable of. I now consider making dynamically all content available in OPML, as Dave asks for (it shouldn’t be too hard). Currently, my content is available in old RSS 0.91, which does the job for my simple use, such as for running my blogrolls and a few news services. I’ve considered adding feeds in RDF/RSS1.0 and maybe RSS 2.0, but perhaps OPML is better? Or maybe it’s not either or? It’s not much more work to create a completely new template instead of just updating old ones, so I guess one should be generous with feeding whatever wants to be fed, in whichever format it wants to be fed in, as long as it is a reasonable request. OPML might be so. I occationally have use for my newsfeed OPML, so why not try using it for distributed and loosely coupled directory services.
Having said that, it should be no surprise that I also see a connection to my thematic tracks idea here, and to trackback in general.
I’ve played with the idea of trackback-enabling my directory, so that when I add a new link about this and that to the directory, a trackback ping (category-related) would be sent off to whomever wants it. Instead of “pull” (MT fectching RSS-feed on MT-update) it would be “push” (the directory trackback pinging MT).
How would OPML fit in here? Dave uses OPML as the source code for his directory. I use a MySQL-database and Links SQL, which builds static HTML-pages and generates XML on the fly. Where Dave uses his outliner, I use my bookmarklet. Not much use for OPML there, I think.