␡
- Water Forms: The Task
- Design
- Implementation
- Code Walk-through
- Processing Sequence
- Summary
- References and Useful links
Like this article? We recommend
Processing Sequence
Let us review the entire sequence of events:
- In the IDE, the developer clicks on "Execute" to run the code for the application.
- This defines the necessary objects and methods.
- The last expression in the program, subscription_form returns a page which is displayed in the browser.
- Clicking the "Subscribe" button causes the action of the form, <subscribe fullname email/> to be executed. This calls the subscribe method which in turn causes the code for the subscribe method to be executed.
- Executing the body of the subscribe method does the
following:
- Creates a subscriber
- Inserts it into the list of subscribers
- Creates a receipt page which is returned and displayed in the browser.
We covered a lot of material in a very short article. Basically, we took a design that took 7-9 lines of text to describe and implemented it in about 15 lines of code using only a single language, Water. If you have done web programming, I hope you see the huge simplifications that this approach brings to web development.