Data validation dialect
[1/4] from: gerardcote:gm:ail at: 18-Dec-2009 0:39
Hi,
I'm now ready to begin to experiment some minimal GUI testing and data
validation for a small project of my own.
I already looked at an interesting proposed way to dynamically create
and validate input screens - in a way that permits some reuse of
initial declarations.
(see Graham's work at
http://en.wikibooks.org/wiki/REBOL_Programming/Language_Features/Parse/Screen_Validation)
But for the most cumbersome and repetitive part, that is data
validation I didn't find any dialect DSL using REBOL to simplify the
complete specs definition part of the task.
However even if I plan to begin writing one myself, I would like if
any of you already did some work in this domain.
Also found some work in old rebol forces magazine about a data
generator dialect (from Joel Neely) that could be of some help
(http://www.rebolforces.com/zine/rzine-1-02/)
In the mean time, I found some links related to the subject of data
validation using DSL (dialects) that I would like to share with those
of you
that have some interest relating to the subject :
Why current validation methods often fail (security issues) - where
and how to do it properly
==================================================================
http://research.corsaire.com/whitepapers/060116-a-modular-approach-to-data-validation.pdf
Some more thoughts :
================
http://c2.com/cgi/wiki?SeparateDomainFromPresentation
Properties- model
=============
http://parasol.cs.tamu.edu/~jarvi/papers/gpce08.pdf
Issues related to User-interfaces (related to the Olivanova method)
========================
http://www.upgrade-cepis.org/issues/2003/1/up4-1Molina.pdf
A form data validation DSL using Ajax and JS
=================================
http://ojay.othermedia.org/articles/forms.html
Regards,
Gerard
[2/4] from: compkarori:gm:ail at: 18-Dec-2009 0:51
Gerard
I'm sure that script can be readily modified to include ranges of
values for the field validation.
On Fri, Dec 18, 2009 at 6:39 PM, G=E9rard C=F4t=E9 <gerardcote-gmail.com> wrote:
> Hi,
> I'm now ready to begin to experiment some minimal GUI testing and data
<<quoted lines omitted: 19>>
> and how to do it properly
> =========================
==========================
============
> http://research.corsaire.com/whitepapers/060116-a-modular-approach-to-data-validation.pdf
> Some more thoughts :
<<quoted lines omitted: 8>>
> A form data validation DSL using Ajax and JS
> =========================
====
> http://ojay.othermedia.org/articles/forms.html
>
> Regards,
> Gerard
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
--
Graham Chiu
http://www.synapsedirect.com
Synapse - the use from anywhere EMR.
[3/4] from: gerardcote:gma:il at: 23-Dec-2009 22:14
Hi Graham,
This is what I will begin with but my true goal is to have both an
implementation and a dialect for describing what the data validation
rules specs are, be it localized in the app itself or in an external
shared data object or centralized dictionary. Kind of minimalist
general business rule encoding - like is done by databases systems and
centralized data-centric objects in a true multi-tier app - eventually
I'd like to have such a system running ... since I gradually want to
move the business rules from the presentation layer (GUI) to a common
data layer, which is somewaht easier to share across a distributed
app, via services, for example.
For the moment, I'm trying to figure out most of the common ways in
use that describe form (and field) data specs and validation rules and
what is better done at the UI level. Sometimes but not always, this
kind of validation is driven by the data type and the domain of values
each type permits.
So I want to collect some of those ways that are in actual use, just
to see if there is some general logic that can be applied through my
own "data validation definition dialect" design.
Here is my first summary : (sure there are others and would be glad it
anoybody would enrich/correct this first draft)
(My only past experience in this domain comes from the design of
VB input forms, thus
validating at the field and at the form levels. Everything else
comes from recent readings.
So many misconceptions/missing info are more than probable).
At the field level we generally find those relevant attributes,
independently of the GUI system, I think :
----------------------------------------------------------------------------------------------------------------------------------------------------------
- Mandatory/optional
- Protected/writable
- Visible/hidden
- Size, position, color, etc...
- Behavior (local event management and simple validation rules - most
related to datatype,
i.e. Numeric! - discrete or continuous : min.
max, interval(s), inclusion or exclusion related boundary conditions
expressed by means of functions, etc...;
String! : pattern recognition, uppercase,
phone number, valid date, ...)
At the form level we have to take into account for :
------------------------------------------------------------------------
- Behavior (Global event management and dependencies between some or
all of the fields - expressed by more elaborate validation/derivation
rules)
Then there are also what are called the other more general business
rules - generally taken into acount at the object/database level
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Behavior/dependencies related to the business way of doing things (policies)
Just asked myself about what "formal or natural - dialect" language
could be used for defining the specs of these validation/business
rules AND WHERE TO PUT /when to use THEM ?
====================================================================================================================================
Began some research and found many alternatives already in use :
1- saw an article about the OCL part of UML that is used playing this
role for objects classes constraints (wikipedia)
2- saw in one of my old books a reference to BNF stating that by 1984
it was the formal tool to be used for string pattern recognition (Here
we have parse coupled with PEGs)
3- OASIS ia another formal description language used as the basis for
the OlivaNova OO-Method and the Just-UI
(See URLs : www.care-t.com/index.asp
www.ercim.org/publication/Ercim_News/enw57/pastor.html
www.dsic.upv.es/~einsfran/papers/06-CAISE97.PDF
portal.acm.org/citation.cfm?id=964442.964522
www.dsic.upv.es/grupos/oom/oasis.html - this last one the OSAIS
3.0 spec is available in Spanish only)
4- Finally in the prolific Java/Ruby World there are descriptive
testing tools (Fit, JBehave and RSpec) that are more of the By example
kind -
They describe the same thing the xUnit family members are able to
test but using a behavior related vocabulary
The refs about the tools related to BDD from Dan North and David
Chelimsky -
(URL dannorth.net/introducing-bdd)
See also Agiledox/TestDox tools
(URL agiledox.sourceforge.net/)
5- Then another view desserves a good mention about describing and
implementing business rules in REBOL itself -
(URL: computer-programming-languages.suite101.com/article.cfm/how_to_createa_rebol_dialect#ixzz0KnhL2yyi&C)
Why didn't I think about it before ? probably because I want to get a
descriptive approach and I wil have to create some dialect to do so.
6 Also found this about the new VB 9.0 Query mode - Will try to get my
hands for creating a similar one for REBOL when ready to do so
(URL : tinyurl.com/z8z82)
[4/4] from: gerardcote::gmail at: 24-Dec-2009 11:19
Hi Graham,
I'm revising the doc written by Henrik for his VDI Extensions, and he
already created a Validate add-on to the VID dialect for helping with
face validation.
See his user manual for more info.
Great documentation work Henrik.
As I was particularly interested by the Style creation under VID/View,
I've read your doc about this aspect and while not easy to grasp every
detail when not already familiar with the VID/View internals, it's
very comprehensible and will be useful for anyone interested by this
level of expertise, like me.
Really Top Notch addition to the other View/VID documentation. There
was a real need for this doc.
Hope to be able to do something real with it but for the moment, I
have to help you more with the testing of all these existing new
styles and functionalities you added to VID. After a long search about
automated GUI testing, using Ruby, this was of no help to me since I
don't know how to simulate an event for View to accept it as if it was
really done by the user. I can get the contents of a real event
datatype! but can't interpret those and so can't create one myself,
ignoring what to send to View as an event ... ans how to insert it
into the event queue.
May be later I will be better at understanding all of these concepts.
For now I'll limit myself at describing the behaviors of my tests (a
bit like what is done with Rspec and JBehave) but theese specs will
not be executables! They'll serve only for reference doc.
But first I have to read more of your doc to better know what are the
new tools you added for developers.
And no Maxim, I didn't forget you and GLayout. I'll test it in
parallel if this is not too much for me, or in alternance.
That's a lot to read, experiment with and understand but this is what
I want - learning REBOL to be able to use it in a decent manner !!!
Thanks to all past, actual and future contributors. Newcomers need you
and in their name I thank you all again.
Enjoy this great OFF time of the year - if you are eligible to do so !
--
G=E9rard C=F4t=E9
Qu=E9bec, Canada
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted