Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1660

Re: Validating form inputs?

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.help
Subject Re: Validating form inputs?
Date 2012-03-22 10:34 -0700
Organization Canadian Mind Products
Message-ID <e4omm7h97f5h2hub3beha45rd9o9vnji6h@4ax.com> (permalink)
References <ed7f31e9-8a19-46c7-9a7c-ad8aabfb9599@x10g2000pbi.googlegroups.com> <cdthm7h8ouvn55aoeah597mjjse0j7mrkh@4ax.com> <eodim79a4ms63j0nsbhk4bf7472hr96oqg@4ax.com> <C1rar.3066$qw7.1550@newsfe08.iad>

Show all headers | View raw


On Wed, 21 Mar 2012 17:41:05 -0300, Arved Sandstrom
<asandstrom3minus1@eastlink.ca> wrote, quoted or indirectly quoted
someone who said :

>One of the tensions in OOP is where to put algorithmic code, or use-case
>type of code, or controller type of code. The DDD (domain-driven design)
>folks would have it that domain objects have to be rich, with
>practically all behaviours finding a home in methods of one domain
>object or another. In this picture the classes in the
>service/application layer are supposed to be seriously lightweight, with
>little or no business logic.

Back in 1979  I devised a language called Abundance, a superset of
Forth. It was intended primarily for validation of data entry.

It had 50+ built in data types.  In the declaration you did such
things as specify
1. a range low..high for numeric and date and the language dealt with
ensuring that bound was honoured, including displaying that info on
status line whenever the user keyed that field.
2. whether lower, upper, accents, symbols etc were permitted in a
string.  If no accents, keying transformed accented letters to
unaccented one, lower to upper etc.
3. It knew what a province/state, legal postal code, phone number,
currency, area code etc  looked like for Canada, USA, Sweden, India It
had tables that had to be updated every few months.

Procedural validation was done is the form of assertions.  If an
assertion failed, the program "jaunted" back in time to a previously
saved state and let the user have another go at it without losing
keying.  The user could jaunt back even further if the problem was not
with the suspected "culprit" field.

I moved the data display, validation and keying rules from apps to the
language (or what we would now call the standard classes).
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
It is almost impossible to keep things in synch manually. Instead: 
-Keep each fact in only one central database (not necessarily SQL),
and access it as needed. Since there is only one copy of each fact, 
there is nothing to get out of synch.
-Use some automated tool so that if you change a fact is one place,
it automatically updates the others.
-Write a sanity checker you run periodically to ensure all is consistent. 
This is the strategy compilers use.
-Document the procedures needed to keep all in synch if you change 
something and rigidly and mechanically follow them.

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Validating form inputs? Davej <galt_57@hotmail.com> - 2012-03-20 11:16 -0700
  Re: Validating form inputs? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-20 12:08 -0700
    Re: Validating form inputs? Lew <lewbloch@gmail.com> - 2012-03-20 12:50 -0700
      Re: Validating form inputs? markspace <-@.> - 2012-03-21 09:24 -0700
      Re: Validating form inputs? Davej <galt_57@hotmail.com> - 2012-03-21 12:02 -0700
        Re: Validating form inputs? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-21 12:59 -0700
        Re: Validating form inputs? Lew <lewbloch@gmail.com> - 2012-03-21 13:37 -0700
    Re: Validating form inputs? Davej <galt_57@hotmail.com> - 2012-03-20 12:56 -0700
      Re: Validating form inputs? Lew <lewbloch@gmail.com> - 2012-03-20 13:58 -0700
      Re: Validating form inputs? markspace <-@.> - 2012-03-21 09:30 -0700
  Re: Validating form inputs? Roedy Green <see_website@mindprod.com.invalid> - 2012-03-20 14:28 -0700
    Re: Validating form inputs? Gene Wirchenko <genew@ocis.net> - 2012-03-20 19:16 -0700
      Re: Validating form inputs? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-21 17:41 -0300
        Re: Validating form inputs? Gene Wirchenko <genew@ocis.net> - 2012-03-21 14:46 -0700
          Re: Validating form inputs? Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-21 19:54 -0300
        Re: Validating form inputs? Roedy Green <see_website@mindprod.com.invalid> - 2012-03-22 10:34 -0700
      Re: Validating form inputs? Lew <lewbloch@gmail.com> - 2012-03-21 14:56 -0700
        Re: Validating form inputs? Gene Wirchenko <genew@ocis.net> - 2012-03-21 19:09 -0700
          Re: Validating form inputs? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-22 08:36 -0700
            Re: Validating form inputs? Gene Wirchenko <genew@ocis.net> - 2012-03-22 09:40 -0700

csiph-web