Search the web
Sign In
New User? Sign Up
xrules · XRules & DynamicDOM
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Using Xrules, schema and XML to maintain CRUD for an application   Message List  
Reply | Forward Message #69 of 74 |
RE: [xrules] Re: Using Xrules, schema and XML to maintain CRUD for an application

I agree with Dave’s comment that XRules is suitable for the .NET platform because there is only a .NET implementation right now. However, in terms of speed, I would argue that XRules is faster than Schematron. I haven’t done any testing, but I’m basing my opinion on the following:

 

  1. Schematron also loads the whole XML document into memory (that’s necessary to implement XSLT transformations, which are used behind the scenes)
  2. XRules doesn’t do any XSLT transformations and therefore escapes these resource-intensive operations. On the other hand, Schematron performs two XSLT transformations for each validation.
  3. XRules provides syntax to easily select the nodes and context in which XPath expressions work, while in Schamtron all expressions are global. Therefore, you’ll notice that XRules expressions are consistently smaller and easier to write and read than Scheamtron expressions. And, expectedly, simpler expressions run faster.

 

And, other than performance, XRules provides many features that are impossible to implement in Schematron due to it’s dependency on XSLT. Obviously, dynamic validation and dynamic node updates are the most obvious, but also XRules Properties, simpler expressions, and more built-in rules.

 

Regards,

Waleed

 

 

 

 

-----Original Message-----
From: xrules@yahoogroups.com [mailto:xrules@yahoogroups.com] On Behalf Of David Carver
Sent: Sunday, March 25, 2007 7:01 AM
To: xrules@yahoogroups.com
Subject: Re: [xrules] Re: Using Xrules, schema and XML to maintain CRUD for an application

 

Ravi wrote:
> Waleed,
>
> Thanks for your response..
>
> Our backend parameter data is exposed as XML documents for other
> groups to build a CRUD application. These groups use thick or thin
> clients. So, we have multiple front ends for the one backend.
> My goal is to encapsualte all data validation rules in one place,
> not
> have them spread all over.
>
> Examples of business rules i am talking about here are:
> 1. Product type:
> 2. prouct days
>
> -Valid values for prodcut type are A, B, C
> -Valid values for prodcut days are 01, 04, 10, 07
> -Cross validate type and days. If type =A, days must be less than
> 10. If type = B, days must be greater than 02.
>
> If I can encapsulate these types of rules in a structured document
> (such as xrules doc), then all my front end developers can build
> their applications(using the xml data doc and xrules doc) to
> capture data from users and will send the xml data doc back to the
> backend.
>
> With this approach, If I want to add any new parameters, it will be
> very dynamic. If I want to change a rule, its easier to implement. I
> just have to release a new xrules doc every time there is a new
> release of the software.
>
XRules would be my first choice for a Windows platform, with small data
sets. Reason I say small data sets is that it loads items into a DOM,
which means it's in memory to do the validation.

An alternative that you could explore as well, would be ISO Schematron.
Which isn't tied to .NET. XRules does have the advanatge in being able
to dynamically update the DOM with new values, where as Schematron is
only doing validations and no dynamic updates.

One other advantage for Schematron is that you can use XPath 2.0.
XRules would need to be updated to use the SAXON .NET framework in order
to get access to the XPath 2.0 support.

Just some things to think about.

Dave



Mon Mar 26, 2007 6:56 am

waleed_ka
Offline Offline
Send Email Send Email

Forward
Message #69 of 74 |
Expand Messages Author Sort by Date

Hello all.. I am fairly new to xrules. seems like an interesting concept and may solve the problem I am trying to resolve. I am trying to design a web based...
Ravi
rckv
Offline Send Email
Mar 22, 2007
2:59 am

Ravi, I'm not sure I fully understand your proposed approach. XRules is suitable for encoding and executing business rules on XML documents. Are you doing CRUD...
Waleed K. Abdulla
waleed_ka
Offline Send Email
Mar 23, 2007
9:45 am

Waleed, Thanks for your response.. Our backend parameter data is exposed as XML documents for other groups to build a CRUD application. These groups use thick...
Ravi
rckv
Offline Send Email
Mar 25, 2007
8:13 am

Ravi, This is a good use case. Sure, you can encapsulate your validations in an XRules document and use it on the client to validate the XML data. All you need...
Waleed K. Abdulla
waleed_ka
Offline Send Email
Mar 25, 2007
10:32 am

... XRules would be my first choice for a Windows platform, with small data sets. Reason I say small data sets is that it loads items into a DOM, which means...
David Carver
d_a_carver
Offline Send Email
Mar 25, 2007
2:08 pm

I agree with Dave's comment that XRules is suitable for the .NET platform because there is only a .NET implementation right now. However, in terms of speed, I...
Waleed K. Abdulla
waleed_ka
Offline Send Email
Mar 26, 2007
6:57 am

... Yep, agree with all of these. However, how XSLT is implemented varies from implementation to implementation. Plus, unless you implement SAXON .NET, there...
David Carver
d_a_carver
Offline Send Email
Mar 26, 2007
11:47 am

Thank you Waleed and David for your valueble comments. I am going to start with making it work with .net. Obiviously my other challenge is being able to...
Ravi
rckv
Offline Send Email
Mar 27, 2007
1:48 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help