Blogs:JaroslavTulach:Practical Design
From APIDesign
(→Practical Design) |
|||
Line 5: | Line 5: | ||
==== Request/Response Pattern Revisited ==== | ==== Request/Response Pattern Revisited ==== | ||
- | [[TheAPIBook]] | + | This little [[Blogs:JaroslavTulach:Practical Design:Request/Response Pattern Revisited|thought about Request/Response]] is a blog insipred by the [[TheAPIBook]]'s explaination how [[APIDesignPatterns:RequestResponse|Request/Response]] pattern can help to solve the need for growing parameters. However, this is not all the pattern can help with as I have found recently in a discussion with [[David Šimonek]]. |
David was just designing new Quick Search API for [[NetBeans]] which was a natural candidate for using the [[APIDesignPatterns:RequestResponse|Request/Response]] pattern. However he needed more. He needed support for incremental computation, as some of the providers may compute too long. He needed a way to process some of the results as soon as possible, as he wanted to show user first five lines of results as quickly as possible. And also he needed a way to support interruption of already computing tasks, because, as soon as user selects a result of search, it is useless to continue computing additional ones. To our surprise we found the [[APIDesignPatterns:RequestResponse|Request/Response]] naturally suited for these tasks as well. | David was just designing new Quick Search API for [[NetBeans]] which was a natural candidate for using the [[APIDesignPatterns:RequestResponse|Request/Response]] pattern. However he needed more. He needed support for incremental computation, as some of the providers may compute too long. He needed a way to process some of the results as soon as possible, as he wanted to show user first five lines of results as quickly as possible. And also he needed a way to support interruption of already computing tasks, because, as soon as user selects a result of search, it is useless to continue computing additional ones. To our surprise we found the [[APIDesignPatterns:RequestResponse|Request/Response]] naturally suited for these tasks as well. |
Revision as of 05:18, 15 July 2008
Jaroslav Tulach's Practical Design
Request/Response Pattern Revisited
This little thought about Request/Response is a blog insipred by the TheAPIBook's explaination how Request/Response pattern can help to solve the need for growing parameters. However, this is not all the pattern can help with as I have found recently in a discussion with David Šimonek.
David was just designing new Quick Search API for NetBeans which was a natural candidate for using the Request/Response pattern. However he needed more. He needed support for incremental computation, as some of the providers may compute too long. He needed a way to process some of the results as soon as possible, as he wanted to show user first five lines of results as quickly as possible. And also he needed a way to support interruption of already computing tasks, because, as soon as user selects a result of search, it is useless to continue computing additional ones. To our surprise we found the Request/Response naturally suited for these tasks as well.
This also shows the difference between TheAPIBook and this website. The book is printed once, sentenced to contain forever what it contained on the day of publication. But our knowledge is evolving, growing. It is perfect to have a place where we can capture and improve what we know about the Request/Response pattern...
--JaroslavTulach 21:02, 25 June 2008 (UTC)