Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Win32::GUI, tell an event handler to stopby halley (Prior) |
on Jul 05, 2007 at 12:58 UTC ( [id://625043]=note: print w/replies, xml ) | Need Help?? |
Change your architecture from:
to: Your supervisory code (in your "model" of an MVC pattern) needs to act as a guardian against illegal uses of its resources, such as the dbiquery capability. If two requests come in, then handle it safely. (1) don't process the second one, (2) enqueue the second one to happen subsequently, or (3) safely terminate the first one, if appropriate and possible. Don't assume dbiquery can do this for you. Don't weigh down your front-end code with this job, either, because today it's a Win32::GUI, tomorrow it's a CGI::Application, next year it's an AJAX::iPhone or whatever. If the backend has technical limitations, your data model's API should do all the supervisory checking. --
In Section
Seekers of Perl Wisdom
|
|