470 likes | 499 Vues
IBM Informix Genero Web Client. <<Speaker Name Here>> <<For questions about this presentation contact Speaker Name speaker@us.ibm.com>>. Agenda. Web Technologies – An Overview IBM Genero Web Client Basic Configuration of Genero Web Client Advanced Configuration of Genero Web Client.
E N D
IBM Informix GeneroWeb Client <<Speaker Name Here>> <<For questions about this presentation contact Speaker Name speaker@us.ibm.com>>
Agenda • Web Technologies – An Overview • IBM Genero Web Client • Basic Configuration of Genero Web Client • Advanced Configuration of Genero Web Client
Module Objectives Identify the Web technologies used by the GWC HTML XHTML CSS XML XSLT JavaScript
HTML / XHTML HTML – HyperText Markup Language XHTML – eXtended HyperText Markup Language Stricter and cleaner version of HTML Set of markup symbols / codes inserted in a file intended for display on a World Wide Web browser page Markup tells Web browser how to display text and images to the user
HTML example <HTML> <HEAD> <TITLE>My Page</TITLE> </HEAD> <BODY> <H1>My Page</H1> <P>Welcome to my page!</P> <P>There should be more here, but I don't know what yet.</P> <!-- Signature and Date --> <ADDRESS>Made 5 April 2004 by myself.</ADDRESS> </BODY> </HTML>
Cascading Style Sheets (CSS) Controls the appearance of a Web page Gives control over the appearance to the page creator Styles defined in CSS take precedence over Default browser settings User settings
CSS example <HTML> <HEAD> <TITLE>My Page</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="samplecss.css" TITLE="Default"> </HEAD> <BODY> <H1>My Page</H1> <P>Welcome to my page!</P> <P>There should be more here, but I don't know what yet.</P> <!-- Signature and Date --> <ADDRESS>Made 5 April 2004 by myself.</ADDRESS> </BODY> </HTML> body { padding-left: 3em; font-family: Arial; color: purple; background-color: yellow } h1 { font-family: Ravie} samplecss.css
XML eXtensible Markup Language Simple, flexible text format Human readable Easily analyzed and processed Open standard Increasingly important in exchange of data on the Web Tools Genero Studio XML editors Any text editor MS IE5 or later
XML example XML is content wrapped in XML tags: This example has four elements – sender, receiver, heading, body – wrapped in a note element. To be useful, need software that can: Send the note Receive the note Display the note <note> <to>Bob</to> <from>Sue</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
XML Markup language Designed to be self-descriptive Describes and organizes content Does not do anything XML tags not predefined in XML Tags must be defined XML uses one of the following to describe the data XML Schema Document Type Definition (DTD) XML used for GAS configuration file Application configuration files
XSL and XSLT XSL – eXtensible Stylesheet Language XML-based stylesheet language XSLT – XSL transformations Used to translate Genero presentation styles to the GWC
JavaScript Interpreted programming or script language. Used in Web site development to perform various tasks. Examples of use: Automatically change a formatted date on a web page. Cause a linked-to page to appear in a pop-up window. Cause text or image to change during a mouse rollover.
References Web technology standards set by the World Wide Web Consortium http://www.w3.org Free tutorials offered http://www.w3schools.com
Agenda • Web Technologies – An Overview • IBM Genero Web Client • Basic Configuration of Genero Web Client • Advanced Configuration of Genero Web Client
One Source Variety of Clients Application written using Genero Business Development Language? Deliver to a variety of clients: ASCII client – Genero BDL Form Windows client – Genero Desktop Client (GDC) X11 client – Genero Desktop Client (GDC) HTML client – Genero Web Client (GWC)
GWC Features Deliver Genero BDL applications as Web applications: Automatically renders existing screens Supports your legacy applications* Supports field-level functions and statements: BEFORE FIELD and AFTER FIELD Supports customization of UI using standard Web technologies. Themes support the variety of Web browsers / interfaces: Silverlight theme AJAX theme iPhone theme Basic theme * see GWC limitations
Why use the GWC? Application displays in a browser. Nothing installed on client. No modifications to the compiled application files required. You can control how the application is rendered by the GWC: outside of the BDL application source code. Integrate into a Web site. Render appropriately for the device being used.
Limitations Limitations vary by theme General GWC limitations No MDI window support No support for RIP widgets No dockable toolbars / menus No Genero Report Viewer Limited support for local actions Limited support (by theme) Support of Web components – AJAX only Table column resizing – Silverlight only Hide / show table columns – Silverlight only Complete listing in GAS User Guide ALWAYS … Review the features and limitations table in the GAS User Guide for up-to-date details
Software Components of a GWC solution User Agent Web server (optional for development) Genero Application Server (dispatcher + VMProxy) Standalone No Web server (for development only) ISAPI extension For IIS Web servers FastCGI extension For any Web server that supports a FastCGI extension Java dispatcher For any Java server supporting servlets DVM server
Architecture for Development Standalone GAS (httpdispatch process) Connect by providing machine name and port number*: http://localhost:6394/demos.html http://localhost:6394/wa/r/gwc-demo * Port number defined in the GAS configuration file
Architecture for Deployment Web server MUST be included for Deployment / production Components Web Server GAS Dispatchers VMProxies DVMs Database Server
How it Works End-user enters URI for a specific application. Web server routes request to GAS dispatcher. GAS dispatcher starts VMProxy to handle request Each session requesting an application results in a proxy Proxy type depends on request gwcproxy, gdcproxy, gwsproxy Tracks session and proxy information in a persistent session table Can restart at proper spot if dispatcher is killed / restarted VMProxy launches DVM DVM interacts with database server
Agenda • Web Technologies – An Overview • IBM Genero Web Client • Basic Configuration of Genero Web Client • Advanced Configuration of Genero Web Client
Starting the GAS Standalone GAS Windows: Genero Application Server (standalone) within the Start menu Linux: httpdispatch command Web server extension (ISAPI or FastCGI or J2EE) Configuration may be required, see documentation Started by Web server as needed
Validating the GAS startup Access the demos page http://localhost:6394/demos.html Click Run them on the Web
The GAS configuration file Default $FGLASDIR/etc/as.xcf FGLASDIR - Env. Variable Typically the directory “gas” in GENERODIR env. variable Tip: Make a copy and edit Specify which configuration file to use when starting an application server Defines resources, components, ports, and application information.
GAS Configuration File Sections Define resources for use elsewhere in configuration and template files Set variables for use by applications that share common components Identify port where GAS listens for requests Set port range for GAS to select from when starting DVMs Specify which machines can access monitor Specify logging options for the GAS log files Specify options for file transfer Specify parameters for Kerberos authentication Define applications and application groups for GWC applications Define applications and application groups for GWS applications RESOURCE LIST COMPONENT LIST INTERFACE TO CONNECTOR INTERFACE TO DVM MONITOR LOG FILE TRANSFER AUTHENTICATION APPLICATION LIST SERVICE LIST
GWC Application Configuration – First Steps In GAS configuration file: Configure LOG options for potential troubleshooting needs Create a GROUP that identifies a directory to hold external application configuration files. If standalone, restart the GAS. Create an external application configuration file for each application: appname.xcf Enter application URL in browser: http://localhost:6394/wa/r/groupname/appname
LOG element Specifies Where messages are logged (OUTPUT element) Format of log messages (FORMAT element) Type of information logged (CATEGORIES_FILTER element) Maximum size of a single log file (RAW_DATA element) Multiple LOG elements means multiple log files can be created for a single GAS Each VMProxy has its own log file <LOG> <OUTPUT Type="DAILYFILE“/> <FORMAT Type="TEXT">time event-type event-params</FORMAT> <CATEGORIES_FILTER>GAS ACCESS PROCESS DEPRECATED ERROR WARNING</CATEGORIES_FILTER> <RAW_DATA MaxLength="-1" /></LOG>
Define GROUP Within APPLICATION_LIST element GROUP defined by Id – Group Name; used within application URL Path – Directory containing external application configuration files <APPLICATION_LIST> ... <!-- Sample Group Entries --> <GROUP Id="tut-demo">$(res.path.as.demo)/tut/app</GROUP> <GROUP Id="mygroup">/home/myapps/config</GROUP> ... <APPLICATION_LIST>
External Application Configuration Files Application specified by file name. One application per file Application inherits (default) configuration of parent. Simplest configuration file provides PATH element only. <APPLICATION Parent="defaultgwc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/2.32/cfextwa.xsd"> <EXECUTION> <PATH>$(res.path.demo.app)/card/src</PATH> <MODULE>card.42r</MODULE> </EXECUTION> </APPLICATION> <APPLICATION Parent="defaultgwc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/2.32/cfextwa.xsd"> <EXECUTION> <PATH>$(res.path.demo.app)/card/src</PATH> </EXECUTION> </APPLICATION> card.xcf
View Application in a Browser (Standalone) Enter the URL that provides the GAS with the information needed to find the application configuration file: http://localhost:6394/wa/r/mygroup/card Machine name or IP address Application name, or name of.xcf application configuration file Group name defined in GAS configuration file. Maps to directory holding external application configuration files. Port number where GAS is listening for requests. Defined in GAS configuration file.
View Application in a Browser (Web server) Enter the URL that provides the GAS with the information needed to find the application configuration file: http://webserver/gas/wa/r/mygroup/card Group name defined in GAS configuration file. Maps to directory holding external application configuration files. Machine name or IP address of Web server Application name, or name of.xcf application configuration file
Monitoring the GAS Access determined by MONITOR element in GAS configuration file. GAS Monitor displays information on the GAS dispatcher and active applications. Provided as an XML document via the URL: http://localhost:6394/monitor
Agenda • Web Technologies – An Overview • IBM Genero Web Client • Basic Configuration of Genero Web Client • Advanced Configuration of Genero Web Client
Application inheritance Applications inherit configuration from a parent application Abstract applications can be created with the sole purpose of being a parent to another application Abstract="TRUE" <APPLICATION Parent="defaultgwc"> ... </APPLICATION>
What is a RESOURCE? Type of variable that can be used in configuration and template files. Resources are defined once … … then used elsewhere in configuration or template files <!-- Default log resources --> <RESOURCE Id="res.log.output.type" Source="INTERNAL">DAILYFILE</RESOURCE> <RESOURCE Id="res.log.format" Source="INTERNAL">time event-type event-params</RESOURCE> <RESOURCE Id="res.log.categories_filter" Source="INTERNAL">GAS ACCESS PROCESS DEPRECATED ERROR WARNING</RESOURCE> <RESOURCE Id="res.log.raw_data.maxlength" Source="INTERNAL">-1</RESOURCE> <LOG> <OUTPUT Type="$(res.log.output.type)"/> <FORMAT Type="TEXT">$(res.log.format)</FORMAT> <CATEGORIES_FILTER>$(res.log.categories_filter)</CATEGORIES_FILTER> <RAW_DATA MaxLength="$(res.log.raw_data.maxlength)”/> </LOG>
Setting Resources Three sections within RESOURCE_LIST element PLATFORM_INDEPENDENT WNT UNX Source INTERNAL Value entered between tags. ENVIRON Environment variable entered between tags. Value is current setting of environment variable.
Component List Components are sets of preset variables to be used by applications that share common configurations. Components relevant to the GWC: Web Application Execution Component Web Application Timeout Component Web Application Picture Component Web Application Rendering Component Web Application Theme Component
Web Application Execution Component <WEB_APPLICATION_EXECUTION_COMPONENT Id="compId" [ AllowUrlParameters="allowParam" ] > [ <ENVIRONMENT_VARIABLE Id="envId" > env </ENVIRONMENT_VARIABLE> [...] ] [ <PATH> path </PATH> ] [ <DVM> dvm </DVM> ] [ <MODULE> module </MODULE> ] [ <AUTHENTICATION> authtype </AUTHENTICATION> ] [ <PARAMETERS> parameterSettings </PARAMETERS> ] [ <ACCESS_CONTROL> accessSettings </ACCESS_CONTROL> ] </WEB_APPLICATION_EXECUTION_COMPONENT>
Set Environment Variables GAS inherits environment at startup. Can override with setting in EXECUTION element of GAS configuration file. Can override on an application level within the application configuration. <APPLICATION Parent="defaultgwc"> <EXECUTION> <ENVIRONMENT_VARIABLE Id="INFORMIXSERVER“>stores_db</ENVIRONMENT_VARIABLE> <ENVIRONMENT_VARIABLE Id="INFORMIXDIR">/db/ifx</ENVIRONMENT_VARIABLE> <ENVIRONMENT_VARIABLE Id="LD_LIBRARY_PATH">$(res.ldlibrarypath)</ENVIRONMENT_VARIABLE> <PATH>/home/myuser/src</PATH> <MODULE>appname.42r</MODULE> </EXECUTION> </APPLICATION> Note: End tags may extend off slide for readability
Web Application Timeout Component <!--Timeout component for WA applications --> <WEB_APPLICATION_TIMEOUT_COMPONENT Id="cpn.wa.timeout"> <USER_AGENT>300</USER_AGENT> <REQUEST_RESULT>60</REQUEST_RESULT> <DVM_AVAILABLE>10</DVM_AVAILABLE> <DVM_PINGTIMEOUT>300</DVM_PINGTIMEOUT> </WEB_APPLICATION_TIMEOUT_COMPONENT> USER_AGENT – Identify user inactivity: Has the browser been closed? REQUEST_RESULT – Let the user know that the request is taking longer than expected. DVM_AVAILABLE – Allow time for DVM to start up. DVM_PINGTIMEOUT – Let DVM know that no user activity but still alive.
Web Application Picture Component <WEB_APPLICATION_PICTURE_COMPONENT Id="resID"> <PATH Id="pathID" Type="pathType">Path</PATH> </WEB_APPLICATION_PICTURE_COMPONENT> Path Id – Identifies WHAT is located in this directory: IMAGE RESOURCE Type – Identifies whether a Web server path or an Application server path: WEBSERVER APPSERVER
Specifying Image Locations WEB_APPLICATION_PICTURE_COMPONENT element specifies directory from which images are served: Id attribute – unique identifier for a picture component PATHelement specifies where to look for an image or resource: Id attribute – what is located in the path (Image or Resource) TYPE attribute – APPSERVER or WEBSERVER <!-- A GAS multilocation Picture Component --> <WEB_APPLICATION_PICTURE_COMPONENT Id="cpn.gwc.ajax.html.picture"> <PATH Id="Resource" Type="WEBSERVER">$(connector.uri)/fjs</PATH> <PATH Id="Image" Type="APPSERVER" ExtensionFilter=".png;.gif">$(res.path.pic);$(application.path)</PATH> <PATH Id="SetAjax" Type="APPSERVER" ExtensionFilter=".png;.js;.css" DVMFallbackAllowed="FALSE">$(res.path.tpl.ajax);$(res.path.tpl.common) </PATH> </WEB_APPLICATION_PICTURE_COMPONENT> Note: End tags may extend off slide for readability
Web Application Theme Component For each theme, identifies associated template and snippet files. AJAX, Basic, and iPhone themes: XHTML for template and snippets XSL for StyleList Silverlight theme: XAML for templates and snippets HTML for bootstrap
IBM Informix GeneroWeb Client Information Management Technology Ecosystems