- SEE ALSO
wordcounter - an application built using Navegante
Build the application:
$ navegante examples/wordcounter
Use the newly created file wordcounter as a CGI.
This application behaves as a CGI and it counts the words being in the content being browsed. On every request we are using the live feedback option of our application banner to print the number of browsed words. Also, we are keeping track of the total of words being counted, we print this information when the user quits the application. The specific DSL section is:
cginame(./wordcounter) formtitle(Word Counting Tool) proc(wcFunction) desc(wcDesc) init(wcInit) livefeedback(wcLive) quit(wcQuit)
This variable is used to keep count of words in every request.
This function prints the description of the application. This is defined in the DSL by the
This is the function that actually counts the number of words. This is defined in the DSL by the
XXX - _loadit
This is the function that prints the HTML that feeds the banner section for reporting information. This is defined in the DSL by the
This function runs on the beginig of every request and it's used here to reset the word counter. This is defined in the DSL by the
The function that is called when the user follows the link to leave the application. This is defined in the DSL by the
Nuno Carvalho, email@example.com