about w3cvalidator plugin for movable type

Dear Brandon,

Someone brought your w3cvalidator plugin for Movable Type to my  
attention today.

http://www.sixapart.com/pronet/plugins/plugin/w3cvalidator.html

I think this is a good idea, as it makes the lives of MT users who  
want to check the validity of their web pages easier.

I see, however, a few problems, mostly small, with your approach:


1) your plugin is doing some screen scraping... Please, don't do that.
code such as
[[		
if ( $response->content =~ /\<h2 id\=\"result\" class\=\"valid\"\>/ )
]]
is wrong. Too fragile. I don't want libraries or tools to expect that  
the validator's output markup will not change. it *will* change over  
time and your tool will break. That's why we are developing an API -  
http://validator.w3.org/docs/api.html

If the API is overkill for you, then here's a hint:
use
$response->header('X-W3C-Validator-Status')
and
$response->header('X-W3C-Validator-Errors')
.
At least these aren't too likely to change, as far as I can tell.


2) the badge you are presenting to the user is hardcoded to XHTML  
1.0. What if users are using another flavor of HTML?


3) Last but not least, it seems that your module is making a request  
to the W3C validator instance for each page published by MT. While  
this is almost OK for a static instance of MT (I wish there were a  
timer to make sure not to send a burst of requests), this is  
problematic for dynamic instances. The W3C validator servers are  
public, shared resources, and already overloaded, and it is not  
currently acceptable resource-wise to accept a request for validation  
each time a page on John Doe's blog is accessed. This just doesn't  
scale.

I do not know MT plugins well enough to know if it is possible to  
have this plugin disabled for dynamic MT publishing, but if it is,  
then I would advise you to consider it. If not, then the module  
documentation should be discourageing people to use the module with  
dynamic MT.

Another thing I would ask, is to make an option for your module to  
choose the instance of the validator to use. We are encouraging  
people, especially heavy users, to consider installing their own  
instance. It would be good if your plugin allowed people to choose  
which instance of the validation service to send requests to.

Thank you, Brandon.
-- 
olivier Thereaux - W3C - http://www.w3.org/People/olivier/
W3C Open Source Software: http://www.w3.org/Status

Received on Monday, 30 October 2006 04:53:29 UTC