260 likes | 408 Views
WSU Web Development. Environment Overview. Design consideations. Testing. Debugging. Overview. User T01 Session. Browser. W e b d i s p a t c h e r. Natural Server session. C I C S W E B. T C P. T C P. User T02 Session. Browser. Natural Server session.
E N D
WSU Web Development Environment Overview Design consideations Testing Debugging
Overview User T01 Session Browser W e b d i s p a t c h e r Natural Server session C I C S W E B T C P T C P User T02 Session Browser Natural Server session Browser User T03 Session Browser Natural Server session User Tnn Session Browser Open Edition DCE interface
Overview CICS webserver Web dispatcher Web browser client Web Parse Natural Module data Web Send Exec. Templates DB Web Utils.
Overview Overview 1 #IRESP (I4) 1 #OCCURNO (I4) 1 #RESULT (A253) 1 #KEY (A50) CALLNAT 'WEBPARSE' #IRESP #KEY #RESULT #OCCURNO
Overview 1 #DATA-AREA 2 #RESP1 3 #R1A (A15) INIT <'HTTP/1.0 200 OK'> 3 #R1Z (A2) INIT <H'0D25'> 2 #HDR1 3 #H1A (A24) INIT <'CONTENT-TYPE: TEXT/HTML'> 3 #H1Y (A2) INIT <H'0D25'> 3 #H1Z (A2) INIT <H'0D25'> 2 #MESS 3 #M1A (A45) INIT <'<TITLE>TESTATE1</TITLE><H1>TESTATE1:</H1><P>'> 3 #M1C (A250) 2 #END-DATA-AREA (A1) CALL 'UTPWBSND' #IRESP #ILEN #DATA-AREA
Overview 1 #P4 (A128) INIT< '<body text="#000000" bgcolor="#E78CC6" ' - 'link="#0000EE" vlink="#551A8B" alink="#FF0000">'> 1 #P7 (A37) INIT< '<p> This is text to display. <br><cen'> 1 #P8 (A04) INIT<'ter>'> 1 #P9 (A128) INIT< 'Enter Natural Pgm Name and Cl'> . . . . COMPRESS #P7 INTO #PARM LEAVING NO SPACE CALLNAT 'WEBGEN' #IRESP #PARM COMPRESS #P8 INTO #PARM LEAVING NO SPACE CALLNAT 'WEBGEN' #IRESP #PARM COMPRESS #P9 INTO #PARM LEAVING NO SPACE CALLNAT 'WEBGEN' #IRESP #PARM COMPRESS #P11 INTO #PARM LEAVING NO SPACE CALLNAT 'WEBGEN' #IRESP #PARM CALL 'UTPWBSND' #IRESP
Overview 1 #TEMPLATE (A8) INIT<'GENERIC1'> 1 #CMD (A1) INIT<'A'> 1 #SLEN (I4) 1 #WSTRUCT 2 #P0 (A4) INIT<'&P0='> 2 #WORK (A253) END-DEFINE COMPRESS #PVALUE '#$@' INTO #WORK LEAVING NO SPACE EXAMINE #WORK FOR '#$@' GIVING POSITION IN #SLEN IF #SLEN = 0 #SLEN = 253 ELSE SUBTRACT 1 FROM #SLEN ADD 4 TO #SLEN CALL 'UTPWBTPL' #PRESP #CMD #TEMPLATE #P0 #SLEN
Utilities:some examples Sag editor usage… write, display, skip, at top, at end, etc. USR modules: SYSBUS, and Environment variables (E.G. UDB). Caching to TSQ instead of GDAs or AIVs. Query DCE groups and user-ids. Validate passwords.
WSU Web developmentDesign considerations State or Stateless Reload, Back, and Forward buttons Multi-platform application Variables Images Templates
WSU Web developmentDesign considerations Campus standards Security Limits Availability Error Messages
WSU Web developmentDesign considerations State or Stateless services? Keeping state: Types of variables to remember state. Hidden? AIV? Other? Keep browser and server in sync.? Back/forward, submit... Keeping data… exceeding DATSIZE or CICS going SOS. Timeout after how many minutes? Garbage collection after abends.
Natural Buffer Pool Natural thread PPTE5990 SREN5000 ICAC2212 ESIZE Source Pfkey def Stack Globals USIZE AIVs (+var) Compiled obj “run” obj. FSIZE DDM Adabas buffers DATSIZE LDA GDA Constants Cache (cics TSQ) Individual to each session. 15 minute “idle” lifespan ID should contain Business funct and variable name. Can be many large allocations.
WSU Web developmentDesign considerations Browser Caching… Each does things its own way, and may be configured by the user to non-standard settings. What do you do? Here is an example of the problem: Refresh cach: 1) At start of session 2) Always 3) Never 4) Automatic Menu o Display o Update o Select DISPLAY Loan Amt.: $10 Date: 10/31/01 Name: Roger UPDATE Loan Amt.: $10 Date: 10/31/01 Name: Roger Add upd disp Add upd disp Add upd disp Host’s state data can differ from browser cache depending on which type of “button” is clicked… back,forward, submit, or href=
WSU Web developmentDesign considerations Browser caching HTTP can affect browser caching in a limited way, with #pragma=nocach or caching directives. The problem is each browser works differently. Some solutions: 1) In the server, check the browser type and version and issue a warning for old browsers, or tell the user to change the setting to “always refresh”. 2) Put a MAXLIFE=0 into the HTTP header, which tells the browser that the cach is old immediately and to get a new copy from the server always.
WSU Web developmentDesign considerations Multi-Platform applications: Navigation and communication; where to keep Variables (how do you share application data?) Images and templates (central, local, or both). Maintaining URL’s (relative/full… test vs prod.) Synchronization of lifecycle (move to prod.)
WSU Web developmentTesting Security definitions URL cautions Adabas database access Planning for production
Security Defining groups, users, ACLs on development/test platform cell. Be sure all types of security are in place (SSL, DCE, RACF, etc.)
URL cautions When moving templates (or programs with hard-coded html) into the next phase of the lifecycle. Be certain the URL is correct. This can be easily missed, until the module in production points to devl/test and someone decides to modify it for the next phase of the project. Try not to reference images from other platforms. Transfer times, availability, and lifecycle sync may be questionable.
ADABAS access Similar issue to the URLs mentioned previously. Be sure the programs are compiled with the proper view(s). If the view points to devl/test it may not show up as a problem for a day or two, since the production data is periodically copied to test/devl. Use UDB and views with dbid=0 of possible. * This is no longer an issue at WSU, but may be for other shops.
Synchronizing lifecycle components (esp. multi-platform). Images User + group Ids/permissions Templates Profiles Programs (Natural + Non-Natural) File modifications (new fields) Command file definitions
WSU Web developmentDebugging CICS trace messages Application trace messages Dispatcher messages Natural Environment settings Dumps & Variables
WSU Web developmentDebuggingCICS trace messages CICS has a trace entry for each request. Here is an example: 082401 06:24:17.54 0094 WWBC ALIAS TRAN START 082401 07:52:30.13 0132 WTXN WEB ATTACH TRAN START 082401 07:52:34.53 0132 WTXN ANALYZER ENTRY 082401 07:52:34.53 0132 WTXN /ppte5990/wwba/hepps HTTP/1.1??Accept: application 082401 07:52:34.53 0132 WTXN ANALYZER EXIT This tells you if you successfully started your program or not. This trace can be seen in the job $ADCICSW under DDNAME mandtrac. Each entry has a date and time stamp to help you locate your request.
WSU Web developmentDebuggingApplication trace messages CICS has a report for each thread, where the output from WRITE and DISPLAY statements go. These are in job $ADCICSW under the DDNAME MNnn (where nn is the thread number). The web dispatcher also writes to this report. Here is an example: Page 1 08/24/01 07: entering PPTE5060 MORE 08/24/01 07:53:17 WEBMAIN: MN00 Transaction NEW5060 Complete
WSU Web developmentDebuggingDispatcher messages The CICS dispatcher finds and initiates the proper module, according to the URL specified. If an error occurs during location, initialization, or execution of the requested module that is outside if its jurisdiction, the dispatcher will catch the error and report it back to the web browser. The message should contain the program name, line number and error number where the error occurred.
WSU Web developmentDebuggingEnvironment variables Use SYSBUS, SYSEDVAR to see the same things you normally would see if you used BUS or EDIT VARIABLES. These (WSU) utilities put the output of these utilities into the editor buffer. Once you have loaded data into the editor buffer you can use (WSU) utility URL SYSEDT1 to put the contents of the editor buffer to your webpage.
WSU Web developmentDebuggingDumps and Variables If you still cannot determine what is happening in your code, we can trace the web transaction with the CICS CEDF facility, or we can switch the dump dataset and format a dump (if you created one). These are our least favorite ways to debug your application, but are available if you have exhausted the preceding techniques.