November 13, 2004

http:serverpost 0.6

Based on my work earlier this year.

The concept is simple, yet highly flexible. I could use some help in figuring out what's required to make it better. The specification I wrote needs work, in particular, and some very careful reviews. I'm calling it 0.6, because although it's very, very stable, I want to leave room for improvement.

If you're going to use it, you'll need the following attribute:

xmlns:http="http://serverpost.mozdev.org/namespaces/serverpost/"

The element can then be referred to as <http:serverpost/>, and fields you designate for the serverpost element have a http:serverpostnames attribute.

I've already filed two bugs against http:serverpost, and there's plenty of room for more. Bug fixers, QA, testers and enthusiasts wanted!!!

(Yes, I know I promised it in twelve hours. It took just under twenty-four. I had other things that came up...)

Posted by WeirdAl at November 13, 2004 7:58 PM
Comments

The testcases don't seem to be working... take a look at this:

[...html code...]







[...xul code and more html code...]

looks like mozdev is messing up your testcase.
jason

(From Alex: I am aware of that, and speaking with the mozdev group on a fix.)

Posted by: Jason Lustig at November 14, 2004 12:14 AM

Unfortunately the testcases do not seem to work on MozDev: http://serverpost.mozdev.org/testcases/index.html

The testcase is being embedded within the MozDev-content and therefore becomes useless. Perhaps MozDev can be configured to not treat XUL files as content. Or have another server host the testcases if all else fails ?

Posted by: Martijn at November 14, 2004 2:09 AM

I can give you a subdomain at moztips.com (serverpost.moztips.com) if you want to publish your examples and content there. (It will be controlled by a separate FTP account.)

(From Alex: At this point, it's far too early. I have full access to the mozdev site for serverpost from cvs.)

Posted by: Jay Sheth at November 14, 2004 11:12 AM

How is this intended to relate to WHATWG's Web Forms 2.0 work?

(From Alex: It wasn't, because when I wrote this code back in February or March, WHATWG didn't exist... I didn't build it with Web Forms 2.0 in mind. If WHATWG wants to give me guidance and/or take over the project, that's fine. If they want me to offer feedback based on my serverpost extension, that's fine too. I'm amenable to working with others in any way on this project. I just wanted to build a widget that was simple and flexible.)

Posted by: Dan Mosedale at November 14, 2004 1:03 PM

Your whole spec can be implemented as a single XBL binding. That's not to say it isn't useful, it clearly is. It's just that it should be described as an application of XBL.

I am also a longtime advocate against meaninglessly long namespaces. What's the matter with:

http://www.mozdev.org/post/post-2004

or better still

http://www.xbl.org/post/post-2004

People have to type it, after all.

You're also having a problem with event target site naming (a problem increasingly seen in various specs).

For my money the HTTPResponseReceived event should merely be named postsubmit (like presubmit), since forms do not necessarily have to use HTTP, and don't necessarily have to send to a server, and don't necessarily have to complete synchronously. They might use SOAP-over-HTTP, or IM or a wallet or whatever.

I'll stop there or I'll be writing forever ...

- Nigel.

(From Alex: Au contraire! I love and welcome intelligent commentary. Please, keep writing!

There's nothing really wrong with using a www.mozdev.org/foo/bar URI for the namespace, except for the little fact that mozdevgroup hasn't offered it to me, and they own www.mozdev.org. They let me use serverpost.md.o, pretty much freely, and namespace URI's are a part of that use. As for xbl.org, have you visited that site? It has nothing to do with XBL... I don't see anything meaningless in the namespace URI I chose.

What do you mean by event target site naming? I don't understand you there.

As for the event name: you're somewhat missing the point of serverpost. The idea is to keep it simple and use very-well-established technologies and protocols. You're right; forms can do any of that IM or SOAP or wallet stuff. But HTTP is still a very popular method of exchanging information between client and server. CGI supports it, PHP supports it, I believe ASP supports it... why make it harder on the application developer than it has to be? Most of what serverpost does is to make it easy to do what HTML forms already do.)

Posted by: Nigel McFarlane at November 14, 2004 5:13 PM

Your project seems very useful. I have run into a couple of snags trying to use it though.

1. I downloaded the latest source for 0.6 and installed the examples on my local apache server. I then changed the url's to match the files located locally and when I view the page the "Submit" button is not there. Any ideas?

2. Is there a way to change the value of the button to anything other then "Submit"? I didn't see anything in your examples.

3. Have you tried your code in a template? If I can get it working locally I have no problem testing this out for you.

Thanks
Chris

(From Alex: I'll answer your comments by e-mail. :) As always, you can file bugs to serverpost, and I don't mind if they're invalid.)

Posted by: Chris Schmitt at December 14, 2004 9:31 AM