• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
best practice(s) for validating properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

best practice(s) for validating properties


  • Subject: best practice(s) for validating properties
  • From: Tom Woteki <email@hidden>
  • Date: Thu, 4 Sep 2003 14:45:04 -0400

Hi:

I'm looking for a better (see below) approach to validating properties than the default provided by the EO framework. I've checked the archives (and may have missed something) and read the treatments in the various books on WO (old and newer) but haven't found what I'm looking for. Perhaps someone here can point the way.

Specifically I'm interested in developing a better approach to handling the model-based (e.g. nulls disallowed, string lengths) or formatter-based validation exceptions that are trapped by the framework before my EO's validateMyAttribute methods are called. By better I mean an approach that is object oriented avoiding cascading if statements in validationFailedWithException to detect specifically why validation failed. I know that this method provides all the info I need to pinpoint the exception but the code get pretty ugly pretty fast (checking key paths, checking exception messages) and the default exception messages are not particularly user friendly.

Can someone point the way?

Thanks very much,
Tom
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: best practice(s) for validating properties.. and the answer is...
      • From: Tom Woteki <email@hidden>
  • Prev by Date: Re: validateForInsert
  • Next by Date: trying to isolate bug involving URL caching
  • Previous by thread: Re: validateForInsert
  • Next by thread: Re: best practice(s) for validating properties.. and the answer is...
  • Index(es):
    • Date
    • Thread