Upload
chinue
View
100
Download
0
Embed Size (px)
DESCRIPTION
The IBM-Informix WebBlade. The Most Productive tool in the IBM-Informix portfolio ?. Paul Watson Unemployed Using Informix since the beginning of time V7 since it was released – first UK installation V9 since 9.10. Can you write HTML ? Can you write SQL ?. The End. Agenda. Example Sites - PowerPoint PPT Presentation
Citation preview
Web Datablade Atlanta 2005
The IBM-Informix WebBlade
The Most Productive tool in the IBM-Informix portfolio ?
Web Datablade Atlanta 2005
• Paul Watson
– Unemployed
– Using Informix since the beginning of time
– V7 since it was released – first UK installation
– V9 since 9.10
Web Datablade Atlanta 2005
• Can you write HTML ?
• Can you write SQL ?
Web Datablade Atlanta 2005
• The End
Web Datablade Atlanta 2005
Agenda
• Example Sites
• How it Works
• Installation
• How you use it
Web Datablade Atlanta 2005
Web Datablade Atlanta 2005
Web Datablade Atlanta 2005
Web Datablade Atlanta 2005
Web Datablade Atlanta 2005
Web Datablade Atlanta 2005
Movie File
Web Datablade Atlanta 2005
How it Works
• Supported Platforms
– All IDS V9 platforms
• Supported Web Servers
– Apache V1 and V2– Netscape– Microsoft IIS
Web Datablade Atlanta 2005
Architecture
Web Datablade Atlanta 2005
Installation
• Untar the file
• Run install script
– Answer the difficult questions
• What web server are you using
• What is INFORMIXDIR
• Where is the configuration file MI_WEBCONFIG
• Provide a username
• Where is the smart blobspace
Web Datablade Atlanta 2005
Setup [Apache]
• If Apache has not been built with DSO then rebuild apache for an easy life
• Edit httpd.conf– LoadModule informix_module libexec/explode.so
<Location /private/databases/boris/admin >SetHandler informix_explodeAuthType BasicAuthName "admin"require valid-user
</Location>
• Copy library to correct location
• Restart apache
Web Datablade Atlanta 2005
Setup [Informix]
• Run webconfig
webconfig –addmap –p /private/databases/boris/admin –n ddw –u
• This will update the configuration file, MI_WEBCONFIG
Web Datablade Atlanta 2005
Test Setup
• Run webconfig – verify
• If all the questions have been answered correctly then it just works
• Checking: /games/3
: database=boris
: user=wboris
: password=<encrypted>
: config_name=ddw
Connect : Success
Config : 15 variables found
Schema : ddw (source_table=wbPages, content_column=object, id_column=ID)
AppPages: 318
Web Datablade Atlanta 2005
MI_WEBCONFIG FILE
• Used to configure the library
<global>
debug_file /var/oninit/webdriver.log
debug_level 2
anchorvar WEB_HOME/
config_user admin
config_password c1b82752477fe6c62370eceb896687e
</global>
<setvar>
INFORMIXDIR /home/informix
INFORMIXSERVER oninit_net
DBDATE=DMY4
</setvar>
Web Datablade Atlanta 2005
MI_WEBCONFIG FILE (cont).
<map path=/private/databases/wbe/admin>
database wbe
user wwbe
password c4e582c979d323b07742efe3fd8684c3
password_key 38d8e369
config_name admin
config_security on
</map>
<map path=/wbe>
database wbe
user wwbe
password c4e582c979d323b07742efe3fd8684c3
password_key 38d8e369
Config_name ddw
</map>
Web Datablade Atlanta 2005
Web Setup
Web Datablade Atlanta 2005
Web Setup (cont.)
Web Datablade Atlanta 2005
Webconfig
Use to configure and test the installation
-addmap -p <url Prefix> -n <config name> -d <database -u <user> [-s <server>]
-convert -p <url Prefix> -n <config name> -f <old-config filename>
-verify [-p <url Prefix>]
-secure [-iis]
Web Datablade Atlanta 2005
Webpwencrypt
Use to generrate new passwords for entry into the MI_WECONFIG file
webpwencrypt <database> <user> <key>
Web Datablade Atlanta 2005
Application Development
• Can you write SQL? Have you got a HTML manual?
• If you are sad and lonely, write the code by hand.
• Use Data Director for Web
– Site Manager
– Application Page Editor
Web Datablade Atlanta 2005
Web Page Structure
• Html
• SQL statements
• Tags
• Processing Blocks
Web Datablade Atlanta 2005
Web Page Structure
• Html
– Hello World
Insert into webpages(name, path, extension, object)Values(‘hello’, “/”, ‘html’,‘hello world’)
Access via
http://local/test/hello.html
Web Datablade Atlanta 2005
Web Page Structure
• SQL
<?MISQL sql=“select tabname from systables;”>$1
</?MISQL>
<?MISQL sql=“execute function sp_whoami();”>$1
</?MISQL>
Web Datablade Atlanta 2005
Web Page Structure
• Tags
insert into wbtags(name,object)values(whoami, ‘<?MISQL sql=“execute function
sp_whoami();”>$1</?MISQL>’);
Use in the html
<body><?whoami></body>
Web Datablade Atlanta 2005
Web Page Structure
• Processing Blocks
IF THEN
FOR Loops
WHILE Loops
FOREACH Loops
MIBLOCKs
<?MIBLOCK cond”$(=,var,1)”><b>Var is $1 </b>
<?MIELSE><b>Var should be $1 </b>
<?MIBLOCK>
Web Datablade Atlanta 2005
Forms
• Get and Post actions
• Pseudo Code– If ACTION = POST
• Process Form
– If ACTION = GET• Display form
Web Datablade Atlanta 2005
Forms
<?MIBLOCK cond=“$(EQ,$action,GET)”<FORM>
<input name=action type=hidden>POST</input><input name=MIval type=hidden>$MIval</input>
<input name=var>0</input>
<?submit></FORM>
<?/MIBLOCK>
<?MIBLOCK cond=“$(EQ,$action,POST)”><?MISQL sql=“insert into table
values($var);”><?/MISQL><?/MIBLOCK>
Web Datablade Atlanta 2005
Session Management
• Session Type– Url or cookie or auto
• Session Home– WEB_HOME
• http://localhost/mysite/?MIval=mypage.html
• Session location– File system location for temporary files
• Session Duration– How long is a session valid
Web Datablade Atlanta 2005
Session Variables
• Magic Variable $session
– <?MIVAR name=session.myvar>Set this variable<?/MIVAR>
– <?MIVAR name=session.mynum>20<?/MIVAR>
Web Datablade Atlanta 2005
Caching
• Two levels
– Tags
Allows tags to be evaluated once and the expand by all referring pages
– Page Level
Caches entire page on disk
Cache administration pages
Web Datablade Atlanta 2005
Deferred Variables
• If the page is cached a mechanism is required to allow some elements to be evaluated at runtime
– For example, HTTP_HOST, HTTP_REFERER
• Configured via the Web admin pages
Web Datablade Atlanta 2005
Deferred Variables
<body>
Coming from $HTTP_REFERER IP [$REMOTE_ADDR] <br>
Current Server is $HTTP_HOST <br>
Cached Variable $myvar <br>
</body>
Web Datablade Atlanta 2005
Data Director: Site Manager
Web Datablade Atlanta 2005
Data Director: Site Manager (cont.)
Web Datablade Atlanta 2005
Data Director: Site Manager (cont.)
Web Datablade Atlanta 2005
Data Director: Site Manager (cont.)
Web Datablade Atlanta 2005
Data Director: Application Page Editor
Web Datablade Atlanta 2005
Problems
• 64 bit Apache 2 – doesn’t work
• Doesn’t work on W2K or XP
Web Datablade Atlanta 2005
Questions ?