Re: Storing condition in bitfield?
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Wed, 15 Feb 2006 14:27:07 GMT
"R. Rajesh Jeba Anbiah" <ng4rrjanbiah@xxxxxxxxxxxxxx> wrote in message news:1139997976.832280.242840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I don't think, it's the right way to map the form fields and their
constraints with XML or string. IMHO, it's better to store the state
and validation function to a small integer or so.
Yes, it'd be best if we could store full length high-definition 2 hour movies into a single bit... but we can't!
At best, we could store the function in a medium-to-large integer (e.g. the number of the Turing Machine which performs the task desired), but then you've got the performance overhead of decrypting the integer into runnable PHP code, or of directly interpreting the integer somehow.
As I mentioned earlier, I'm interested in building a generic
framework for handling form inputs.
I wanted to replace the current way of validating form inputs like:
if (isNotEmail($form->field('email'))
throw error
if (isNotEmpty($form->field('url') and
isNotEmpty($form->field('url'))
throw error
I instead wanted to save/associate the state or functions with the
form fileds. Putting strings and XML will be of overhead, I think.
You might be optimizing prematurely. Are you sure that RAM or memory is more valuable than developer time?
- Oliver
.
- Follow-Ups:
- Re: Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Re: Storing condition in bitfield?
- References:
- Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Re: Storing condition in bitfield?
- From: Oliver Wong
- Re: Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Re: Storing condition in bitfield?
- From: Joe Seigh
- Re: Storing condition in bitfield?
- From: Oliver Wong
- Re: Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Re: Storing condition in bitfield?
- From: Oliver Wong
- Re: Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Re: Storing condition in bitfield?
- From: Oliver Wong
- Re: Storing condition in bitfield?
- From: R. Rajesh Jeba Anbiah
- Storing condition in bitfield?
- Prev by Date: Re: audio streaming,chating,ftp between linux server and windows client in a network
- Next by Date: Re: Basic stuff, how to retrieve a web page using C Socket???
- Previous by thread: Re: Storing condition in bitfield?
- Next by thread: Re: Storing condition in bitfield?
- Index(es):
Relevant Pages
|