Rothariger Posted August 2, 2005 Posted August 2, 2005 hello, i am making an web application for the university, and in some places, there makes somethings in the DB, then i would like to leave the page like "suspended" and when the job is all done, then i raise an event, and render the data to the page... it is this possible??? thanks!!! Quote
utilitaire Posted August 3, 2005 Posted August 3, 2005 hello, i am making an web application for the university, and in some places, there makes somethings in the DB, then i would like to leave the page like "suspended" and when the job is all done, then i raise an event, and render the data to the page... it is this possible??? thanks!!! Its not really possible. Web application are not made for asynchronous operations. It is possible to send a request to a database server, but it's not supposed to be used in a web application. The reason is that a web application is suppose to execute a page quickly, render the result to the client, and then free the memory. Suppose you have 200 request at the same time, you absolutely cannot hold the execution for seconds(minuts) since it would cause a memory leak. If you wonder if it is theoriclally possible, the answer is yes. Set the script time out to illimited time, and store all the SQL code inside a stored procedure. Even if the stored procedure takes 5 minutes to execute, IIS will still be waiting for the result in a synchronous operation. But if I was you teacher, I would tell you this is a REALLY REALLY REALLY bad practice and that you should forget about it. :) Quote
Rothariger Posted August 4, 2005 Author Posted August 4, 2005 ok, thank you very much utilitaire... it was good explained..!!! may be with the .net 2.0, callback... but thats doesnt matter now... thanks once again..!!! Quote
pas30339 Posted August 4, 2005 Posted August 4, 2005 Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form. You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML". Here's some reference material: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp http://www.adaptivepath.com/publications/essays/archives/000385.php And to see it in action check out Google's "suggest" feature. http://www.google.com/webhp?complete=1&hl=en The suggestions are provided via an asychronous call to a server. Quote
Rothariger Posted August 4, 2005 Author Posted August 4, 2005 Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form. You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML". Here's some reference material: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp http://www.adaptivepath.com/publications/essays/archives/000385.php And to see it in action check out Google's "suggest" feature. http://www.google.com/webhp?complete=1&hl=en The suggestions are provided via an asychronous call to a server. yes, i have seen javascript rpc, but its a little difficult... but im in practice!!! thanks a lot!!! Quote
bri189a Posted August 5, 2005 Posted August 5, 2005 Don't suspend the page. That's bad design. make an asynchronous call to the DB and when the data returns populate your form. You can send asychronous calls to the server. The ability has been around for years but only recently has it caught on. Some people call the technology AJAX :"Asynchronous JavaScript and XML". Here's some reference material: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/lifewithoutrefresh.asp http://www.adaptivepath.com/publications/essays/archives/000385.php And to see it in action check out Google's "suggest" feature. http://www.google.com/webhp?complete=1&hl=en The suggestions are provided via an asychronous call to a server. Thanks so much for the knowledge sharing...I knew about using hidden frames to do something similiar but I didn't know about this XML version...no one in our group had even heard of that technique...wonder why it's been kept so quiet? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.