[Catalyst] XSD Validation of Forms
jjn1056 at yahoo.com
Mon Aug 10 12:17:04 GMT 2009
--- On Thu, 8/6/09, Alejandro Imass <alejandro.imass at gmail.com> wrote:
> From: Alejandro Imass <alejandro.imass at gmail.com>
> Subject: [Catalyst] XSD Validation of Forms
> To: "The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
> Date: Thursday, August 6, 2009, 12:15 PM
> I did something cool these days for a
> client and was thinking that
> perhaps might be a cool plugin for Catalyst.
> I created a B2B app for a client that has both HTML and XML
> API. So I
> decided to convert the HTML/XHTML requests to XML, the same
> XML format
> as the XML API and validate both with the same XSD.
> Laziness, of
> course, of having to maintain an HTML field validation
> scheme PLUS an
> XSD validation scheme using LibXML. Hope you're following
> me here...
> So, it occurred to me that perhaps XSD validations can be
> perhaps more
> useful and powerful than Formbuilder's declarative
> validation oin
I did an xforms based project a few years ago and enjoyed working with the system but unfortunately true xforms support has lagged in all the browsers. There are plugins but nothing native. I think most people have settled on a 'best 80%' of features via ajax style libs. submitting forms via json is a somewhat similar approach, although not as clean as the xforms approach, but at least it works.
I do think the best approach is going to end up being similar to the way we deploy and use DBIx::Class, where we generally first model in Perl and then deploy to the target database engine. In other words you model your user interface expectations and then render the type you want. I this this is going to be more flexible than systems that validate the other way around.
> Does anyone here think this might be interesting? Maybe it
> exists, but the whole thing came out so cool, that I
> thought it might
> be useful for the Catalyst / Perl world in general.
Although Perl has pretty good XML support, with multiple parsers, both DOM and SAX based, there doesn't seem to be strong excitement around it. I don't think most of the developers around here like XML based configuration files (think they are too verbose) and you don't see a lot of love for XSLT or similar. Again, I think it's about pragmatism, where JSON approaches get you most of the way for less effort. Also the XML camps seem to be somewhat offish to the Perl community. Maybe it's just me but seems like all the examples are Python or Java. There's a certain amount of academia driving XML, or big enterprises, and both groups tend to treat the Perl programming language as something left over rather than something to be excited about.
Axkit is a web development system that's totally XML driven, you might want to take a look. Also part of your interest might fit well with the various REST projects going on. I think if you're approach is that XML is the transport rather than the framework you'd get more interest.
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://email@example.com/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst