Artifact 550906f582c967405cd1c0a864add1b2c13ad7bddebc60a536b3ff52530b63fa:
- File docs/development.md — part of check-in [7ec2de27c9] at 2018-02-02 05:41:43 on branch trunk — Improved documentation. No code changes. (user: drh size: 1602)
Developing Applications Using Wapp
You can use whatever development practices you are comformable with. But if you want some hints for getting started, consider the following:
Compile the "wapptclsh" executable. You do not need a separate interpreter to run Wapp. A standard "tclsh" will work fine. But "wapptclsh" contains the a built-in copy of "wapp.tcl" and it has SQLite compiled in. We find it convenient to use. The sequel will assume you have "wapptclsh" somewhere on your $PATH.
Seed your application using one of the templates scripts in the examples folder of this repository. Verify that you can run the template and that it works.
Make a few simple changes to the code.
Run "wapptclsh yourcode.tcl" to test your changes. Use the --trace option to list each HTTP request URI as it is encountered. Use the --lint option to scan the application code for dodgy constructs that might be a security problem.
Goto 3. Continue looping until your application does what you want.
Move the application script to your server for deployment.
During the loop between steps (3) and (5), there is no web server sitting in between the application and your browser, which means there is no translation or interpretation of traffic. This can help make debugging easier. Also, you can add "puts" commands to the application to get interactive debugging in the shell that ran the "wapptclsh yourcode.tcl" command while the application is running.