[Catalyst] XSD Validation of Forms

Alejandro Imass alejandro.imass at gmail.com
Tue Aug 11 17:56:29 GMT 2009


Great input and insight, thanks!

My comment was perhaps more oriented to using a common declarative
validation idiom such as an xml schema because with this particular
project, I found myself maintaining FormBuilder YAML files and XSDs.
Then I decided to convert HTML to XML and use the common XSD for both.
Since most decent XML parsers already perform the validation, and they
are usually quite fast, I thought that perhaps something similar to
the FormBuilder plug-in could be built that used an XML approach.

I find your comments on JSON and model-to-DB very interesting but
don't agree with all of it. I think that sane RDBMS modeling is still
not going away for a while.

regarding REST take a look at this project I'm working on and that is
Catalyst-based:

http://www.p2ee.org

Cheers,
Alejandro Imass

On Mon, Aug 10, 2009 at 8:17 AM, John Napiorkowski<jjn1056 at yahoo.com> wrote:
>
>
> --- 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
>> yaml.
>
> 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
>> already
>> 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://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>
>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



More information about the Catalyst mailing list