Movable Type 4.1 and AtomPub

February 17, 2008 – 12:57 pm

Finally, I had a chance to try MT’s AtomPub with Fude.

Here is the list of things that I’ve noticed.

I’ve reported this to SixApart dev team. They quickly responded and told me that they recognized the problems and would fix these problems. Nice!

1) missing link@rel=”EditURI” in the default template.

<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”http://example.com/rsd.xml” />

2) missing service document url in the rsd file.

3) MT returns “401 Unauthorized” if a client sends a request without a username/password.
This is OK, but “401 Authorization Required” seems to be much better.

4) MT returns “403 Invalid login” if a client sends a request with a wrong username/password.
I believe it should be “401 Unauthorized”.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
403 Forbidden

The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request SHOULD NOT be repeated. If
the request method was not HEAD and the server wishes to make public
why the request has not been fulfilled, it SHOULD describe the reason
for the refusal in the entity. If the server does not wish to make
this information available to the client, the status code 404 (Not
Found) can be used instead.

“The server understood the request, but is refusing”, “Authorization
will not help”, “request SHOULD NOT be repeated”

hum … This case, Authorization HELPs. So I believe it should be “401 Unauthorized” instead of “403 Invalid login (Forbidden)”.

5) content-type miss-match

HTTP/1.1 403 Invalid login
Date: Sat, 16 Feb 2008 20:57:24 GMT
Server: Apache
Www-authenticate: WSSE profile=”UsernameToken”
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

<error>HASH(0×90c29d0)</error>

In the header, it says “Content-Type: text/html” but the response body isn’t.
Error string is broken. HASH(0×90c29d0)

6) too many default namespace declaration in the feed.
Because of this, XPath fails.(xml parser’s problem?) This seems to be a bug in my code. I forgot to explicitly tell parser to use XPath instead of XSLPattern. This is because before IE5.5SP2, MSXML did not fully support XPath. I think it is OK to dump IE5.x support right about now.

7) unnecessary //feed/link in the feed.

<link xmlns=”http://www.w3.org/2005/Atom” rel=”service.post”
href=”http://example.com/mt/mt-atom.cgi/1.0/blog_id=1″ title=”My First
Blog” type=”application/x.atom+xml”/>

Instead,

<link rel=”self” type=”application/atom+xml” href=”someurl”/>

is preferred.
and additionally,

<link rel=”first” type=”application/atom+xml” href=”someurl”/>
<link rel=”last” type=”application/atom+xml” href=”someurl”/>

are nice to have.

8 ) //entry/content@type=html

<content xmlns=”http://www.w3.org/2005/Atom” type=”html”>
<div xmlns=”http://www.w3.org/1999/xhtml”>This is a test.</div>
</content>

//entry/content@type=html
but, its actually child element is a xhtml:div. That means
//entry/content@type=xhtml
is the right one.

9) missing //feed/id, //feed/updated

10) missing media upload.
This is not a bug, but I want it ;-)

11) missing support for custom fields, tags, commentEnabled, trackbackEnabled, text_more, etc.


Twitter client TwitterDesktop

January 13, 2008 – 9:37 am

TwitterDesktop is a Twitter client for Windows. It is a simple, light-weight, easy to use application which runs natively on Windows. 

Download: http://www.witha.jp/eXeries/Twitter.zip

Runs on: Windows 98SE / ME / 2000 / XP / Vista
Prerequisite: Internet Explorer 6 or greater

Installation: There is no “installation”. Just unzip and you are ready to run.

Note:

  • It fully supports Unicode, meaning you can use all kinds of languages.
  • It behaves nicely to Twitter servers. (retrives data only when there is one or more updates)
  • If you have multiple Twitter accounts you wanna use with, you can copy TwitterDesktop.exe and rename it and run side-by-side.

Read the rest of this entry »

MT4.1 beta2 and AtomPub support

December 24, 2007 – 1:04 pm

I’ve been waiting for a long time for this. First of all, congrats to the developers at SixApart. Now MT 4.1 supports AtomPub.

Unfortunately, I can’t see MT4.1 beta2 in action due to some mysterious errors during its installation. I’m very interested in how they implemented AtomPub in MT because, so far, WordPress’s AtomPub support is practically unusable. Aside from a few bugs, WordPress’s AtomPub support offers very little features compared to those of XML-RPC API. There is no reason to choose AtomPub over XML-RPC API at this point.

Yes, it is a good thing we have a choice. But I don’t think current status of AtomPub support in WordPress reflects true potential of AtomPub. Also, now that MT has the custom fields, MT could take advantage of the extensibility of Atom. The same thing can be said with Vox. Vox support only one API which is an old (pre draft version of) Atom API. That is a shame because there are not only blog posts but also “photos”, “audio”, “video”, “books”, “collections” that can be used via web service interface. The old version of Atom API can’t handle all that great, but AtomPub can.

So, developer teams at WP and Movable Type, keep up the great work and I’m hoping the two tools will be much much better.

By the way, what I got during the installation was bellow (which I already reported to the dev team).

Got an error: Can’t call method “execute” on an undefined value at /somedirectory/mt4/extlib/Data/ObjectDriver/Driver/DBI.pm line 118.

(I heard this was a bug in MT4.1 beta2 and will be fixed)

and

Got an error: Statement has no result columns to bind (perhaps you need to successfully call execute first) at /somedirectory/mt/extlib/Data/ObjectDriver/Driver/DBI.pm
line 119.

 (Seems like MySQL version is old…)

AtomPub Test Client released

December 10, 2007 – 2:36 pm

Finally…

You can download the latest version from this page, and here is the screenshot.

direct link to the zip archive

Yet another Twitter Client for Win (alpha)

December 10, 2007 – 2:16 pm

[update]New version is posted here.[/update]

I started to develop my own Twitter client just last week. It is really really early alpha. You can download it from here. It’s only a three day-old software. So if you are crazy enough to use it, use it at your own risk!

What you can do: View status and update status.

Runs on: Windows 98SE/ ME / 2000 / XP / Vista

Relative URI and APP Test Site

November 30, 2007 – 12:45 am

I believe I found a possible bug in the APP test site at http://bitworking.org/projects/apptestsite

I was trying to PUT on the Edit-Media URI that returned from the entry, but all I got was Not Found errors. After having a little conversation with takemaru san, it turned out that the base URI of the Edit-Media was not the URI of the entry but the collection’s URI.

If you GET
http://bitworking.org/projects/apptestsite/app.cgi/service/media/416/

The server returns an entry with following Edit-Media link.
<link href=”416/;media” rel=”edit-media”/>

So, combining the two,
http://bitworking.org/projects/apptestsite/app.cgi/service/media/416/ + 416/;media
you get,
http://bitworking.org/projects/apptestsite/app.cgi/service/media/416/416/;media

Dah, that is Not Found on the server. The correct URI is http://bitworking.org/projects/apptestsite/app.cgi/service/media/416/;media

I just sent a mail to the developer, so I hope that will be fixed soon.

[update] Today, I confirmed this has been fixed. (2008/02/12).

But I found another bug.. //feed/entry/link@rel=”edit-media” should not be in a normal entry.

AtomPub client - progress so far

November 21, 2007 – 2:20 pm

Here is the early alpha of the Atom Publishing client I’ve been working on. The basic features work OK, but it seriously lacks usability. You probably don’t wanna use it just yet even if you’re a developer.

fude_atom_client_alpha2.png

fude_atom_client_alpha1.png

The hardest stuff would be to figure out the effective way of sync’ing. The UI is also very hard, but pretty much any UI design is difficult and time consuming. So, well, stay tuned.

WordPress 2.3.1 and AtomPub [update2]

November 21, 2007 – 9:05 am

I’ve noticed a couple of things while messing around with the latest WordPress’s Atom Publishing Protocol support.

  1. Bug: Malformed XML returns when GETing a Media Link Entry.
  2. Bug: 404 Not Found error on GETing a category and a collection document if “WordPress address” and “Blog address” are different.
  3. Bug: Entry’s published, Updated and Edited time stamp are always the same.
  4. No Etag.
  5. No “page”, “tags”, support.

Missing Etag support isn’t a big deal for me because it’s easier to develop a client and test with… at least for now. But, the XML error is kind a annoying.

Where am I supposed to report this, by the way? I’m kinda late for the bug hunt.

After asking in the wp-hacker list, I was instructed to join the wp-xmlrpc list.

AtomPub and WordPress

September 8, 2007 – 9:41 pm
WordPress 2.3 beta 1 has significantly upgraded support for the Atom Publishing Protocol.
- WordPress 2.3 ♥ AtomPub

Anyhow, WordPress 2.3 is going to be a first-rate Atom Protocol sever.
- Long-Weekend Fun

Great news. I’ll be definitely messing around with it…. and here I am.

I’ve been working on an Atom client library for a long time. I have a test client software as well. Though I’m kindda itching to release it, there are a few things left to do..