Use Continuations to Develop Complex Web Applications
By Abhijit Belapurkar2005-04-22
An Example Application
I'll use a simple application to ease you into Web application development using continuations. From a navigational perspective, the interface for this shopping application is fairly simple. Upon accessing the first page of the application, the user is asked to enter the price and item count of the desired purchase. Upon entering this information and selecting Next, the user is taken to the next screen and asked for his category code, which determines whether he will receive a discount on the purchase amount. (Note that in this oversimplified example, it is assumed that the user will provide truthful information.) On this page, the user is asked whether the purchase should be shipped or picked up. If the shipping option is selected, the interface returns a third screen on which the user must enter the type of shipping desired: standard or express with different associated costs. If the user enters the pickup option, or upon completing the shipping option, the last screen is displayed. This screen shows, among other information, the total amount due for the purchase, which is the purchase amount, minus any given category discount, plus any shipping cost.
It is a simple application, but it will provide a good basis for learning about continuations. Before I start on the coding, I'll take a minute to introduce the Apache Cocoon framework, for those who do not already know and love it.
Tutorial Pages:
» A Programming Paradigm to Simplify MVC for the Web
» What is a Continuation, Anyway?
» Problems in Conventional Web development
» The Case for Continuations
» User-Centered Navigation
» You Make the Rules!
» The Continuations Repository
» An Example Application
» Web Continuations in Apache Cocoon
» The Application Sitemap
» The Application Logic
» Understanding the Application Logic
» Resuming the Continuation
» JavaScript vs. the Java language
» Continuations in Java code
» Pros and Cons of Continuations
» Conclusion
» Resources
First published by IBM DeveloperWorks
