
NB. Created app def file is as follows

NB. ====================================================================================================
NB. ====  (1/4) name of application =======
NB./*/APP_FOLDER_NAME/00_centigrade_fahrenheit_mutual_converter


NB. ====================================================================================================
NB. ====  (2/4) design of HTML doc  =======
NB./*/HTML_TITLE/temperature converter (centigrade <-> fahrenheit)
NB./*/HTML_REMARK/specify temparature data in the textbox, select conversion direction in the radiobutton and click submit button to convert

NB./*/specify temparature data in the textbox
NB./*/select conversion direction in the radiobutton and click submit button to convert

NB./*/HORIZONTALLINE
NB./*/TEXTBOX/00/VERTICAL/20/centigrade/36.5
NB./*/HORIZONTALLINE
NB./*/TEXTBOX/01/VERTICAL/20/fahrenheit/
NB./*/HORIZONTALLINE
NB./*/RADIOBUTTON/00/HORIZONTAL/conversion direction/centigrade -> fahrenheit+c_to_f/fahrenheit -> centigrade+f_to_c
NB./*/HORIZONTALLINE

NB. ====================================================================================================
NB. ====  (3/4) descrition of J function  =======
NB.define your J function(s) which will be used in YOUR_JOB function

centigrade =: 3 : 0
t1 =. y - 32
t2 =. t1 * 5
t3 =. t2 % 9
)

fahrenheit =: 3 : 0
t1 =. y * 9
t2 =. t1 % 5
t3 =. t2 + 32
)




NB. ====================================================================================================
NB. ====  (4/4) desctiption of your job based on POSTed data as argument of J function =======
YOUR_JOB =: 3 : 0
a_collection =. monitor_entry_ID_values 0 NB.extraction of POSTed data
reply_msg =. 'operation done without error'

try. NB. -----
NB. contents of this textarea will be saved in try. block of YOUR_JOB function
NB.
celsius_value =. ". TEXTBOX_00_VALUE
fahrenheit_value =. ". TEXTBOX_01_VALUE
conversion_direction =. RADIO_00_VALUE
if. conversion_direction -: 'c_to_f' do.
  new_f_value =. fahrenheit celsius_value
  TEXTBOX_01_VALUE =: 7j1": new_f_value
end.
if. conversion_direction -: 'f_to_c' do.
  new_c_value =. centigrade fahrenheit_value
  TEXTBOX_00_VALUE =: 7j1": new_c_value
end.



catch. NB. -----
reply_msg =. 'error occured during the operation'
end. NB. -----
reply_msg
)
NB. end of creation
