Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Win32::GUI, tell an event handler to stop

by halley (Prior)
on Jul 05, 2007 at 12:58 UTC ( [id://625043]=note: print w/replies, xml ) Need Help??


in reply to Win32::GUI, tell an event handler to stop

Change your architecture from:
guicode --(event)--> dbiquery
to:
guicode --(event)--> supervisor supervisor --> dbiquery
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.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://625043]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found