The IBM-Informix WebBlade

bubblesradiographerServers

Dec 4, 2013 (3 years and 11 months ago)

90 views


Atlanta 2005


Web Datablade

The IBM
-
Informix WebBlade

The Most Productive tool in the IBM
-
Informix
portfolio ?


Atlanta 2005


Web Datablade


Paul Watson



Unemployed



Using Informix since the beginning of time



V7 since it was released


first UK installation



V9 since 9.10






Atlanta 2005


Web Datablade


Can you write HTML ?



Can you write SQL ?




Atlanta 2005


Web Datablade


The End


Atlanta 2005


Web Datablade

Agenda


Example Sites



How it Works



Installation



How you use it


Atlanta 2005


Web Datablade


Atlanta 2005


Web Datablade


Atlanta 2005


Web Datablade


Atlanta 2005


Web Datablade


Atlanta 2005


Web Datablade


Atlanta 2005


Web Datablade

Movie File


Atlanta 2005


Web Datablade

How it Works




Supported Platforms



All IDS V9 platforms




Supported Web Servers



Apache V1 and V2


Netscape


Microsoft IIS


Atlanta 2005


Web Datablade

Architecture



Atlanta 2005


Web Datablade

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


Atlanta 2005


Web Datablade

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_explode



AuthType Basic



AuthName "admin"



require valid
-
user


</Location
>



Copy library to correct location



Restart apache




Atlanta 2005


Web Datablade

Setup [Informix]



Run webconfig



webconfig

addmap

p /private/databases/boris/admin

n
ddw

u



This will update the configuration file, MI_WEBCONFIG





Atlanta 2005


Web Datablade

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



Atlanta 2005


Web Datablade

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>



Atlanta 2005


Web Datablade

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>



Atlanta 2005


Web Datablade

Web Setup





Atlanta 2005


Web Datablade

Web Setup (cont.)





Atlanta 2005


Web Datablade

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]



Atlanta 2005


Web Datablade

Webpwencrypt





Use to generrate new passwords for entry into the MI_WECONFIG
file



webpwencrypt <database> <user> <key>


Atlanta 2005


Web Datablade

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



Atlanta 2005


Web Datablade

Web Page Structure


Html



SQL statements



Tags



Processing Blocks





Atlanta 2005


Web Datablade

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






Atlanta 2005


Web Datablade

Web Page Structure


SQL



<?MISQL sql=“select tabname from systables;”>


$1


</?MISQL>



<?MISQL sql=“execute function sp_whoami();”>


$1


</?MISQL>









Atlanta 2005


Web Datablade

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>










Atlanta 2005


Web Datablade

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>










Atlanta 2005


Web Datablade

Forms






Get and Post actions



Pseudo Code


If ACTION = POST



Process Form



If ACTION = GET



Display form



Atlanta 2005


Web Datablade

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>


Atlanta 2005


Web Datablade

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


Atlanta 2005


Web Datablade

Session Variables


Magic Variable $session



<?MIVAR name=session.myvar>Set this variable<?/MIVAR>



<?MIVAR name=session.mynum>20<?/MIVAR>





Atlanta 2005


Web Datablade

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


Atlanta 2005


Web Datablade

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


Atlanta 2005


Web Datablade

Deferred Variables

<body>


Coming from $HTTP_REFERER IP [$REMOTE_ADDR] <br>


Current Server is $HTTP_HOST <br>


Cached Variable $myvar <br>

</body>



Atlanta 2005


Web Datablade

Data Director: Site Manager


Atlanta 2005


Web Datablade

Data Director: Site Manager (cont.)


Atlanta 2005


Web Datablade

Data Director: Site Manager (cont.)


Atlanta 2005


Web Datablade

Data Director: Site Manager (cont.)


Atlanta 2005


Web Datablade

Data Director: Application Page Editor


Atlanta 2005


Web Datablade

Problems



64 bit Apache 2


doesn’t work



Doesn’t work on W2K or XP


Atlanta 2005


Web Datablade

Questions ?