Thanks to a nice patch from Kevin Valdek rest_in_place now comes in three flavours:
Prototype, jQuery and mootools.
He also was so kind to improve the included testapp a little.
Please check out the changes at http://github.com/janv/rest_in_place/tree/master and on the project page.
Convenience vs. validity
Regarding the project page.
In itself it’s kinda pointless since it contains nothing more than the readme which you can also see in all its glory over at github. But it’s invaluable for feedback through the comments. Wincent Colaiuta posted a remark about the standards compliance of the custom attributes RIP uses, which I have to admit is kinda valid:
Haven’t looked at the code yet, but I like the idea very much.
The only problem is those non-standard attributes that you’re jamming into the divs and spans are not valid HTML (well, I admit, I only checked them with an XHTML validator; I don’t actually know if they’d be considered valid for any particular other version of HTML or XHTML).
For me that’s a bit of a show-stopper, as I don’t want my pages spitting out validation errors if anyone feeds them into a validator.
Other than that, looks like a great idea though.
However it also kinda isn’t.
I replied:
I understand your concern but let’s be honest for a minute ;)
These additional attributes might be undefined in XHTML but are syntactically correct and will just be ignored by browsers. They provide a very convenient and concise way of specifying how to edit the fields. They pose no actual harm to a user’s browsing experience. Neither directly (in the form of malfunctions) nor indirectly (like what the widespread use of really ill-formed HTML did to web development in the past).
As a computer scientist I understand the desire for absolute correctness. But as an actual application developer, my users are my target audience, not fellow nerds who like feed my pages into validators (no offense). A little pragmatism can’t hurt once in a while if you want to get things done.
Is this a case of correctness for the sake of correctness? Or were it little steps like this what led us to the browser wars and IE6? Should REST in Place give up convenience for the sake of correctness? How do others deal with inofficial attributes. I know a lot of people and a lot of situations where they saved developers a lot of time and headache.
Continue reading