Friday August 24, 2007
jMaki, PHP and GlassFish - again using Caucho Quercus
jMaki is a light-weight framework for build Web 2.0 applications. It provides support for multiple languages - Java (1, 2, 3, 4, 5, 6) , PHP, Ruby (1, 2), Phobos (1). The numbers in parentheses indicate the entries that I've created showing jMaki support for that language. As evident, I've not created a single entry for PHP yet. This entry is going to change that :)
This entry shows how to deploy a jMaki-enabled PHP web application in GlassFish. It builds upon an earlier entry that showed how to deploy a simple PHP application in GlassFish.
jmaki-php-0.9.7.2\jmaki-php"
in the current directory.jmaki-php-0.9.7.2\jmaki-php\core" and invoke "ant".
This creates "dist\jmaki-core.zip".jmaki-core.zip" under the "web"
directory of the project created in the link followed from first step.http://localhost:8080/hellophp/jmaki-core/index.php".
index.php" in the IDE, the page contains
the following code fragments:<?php addWidget("hello"); ?>
<?php addWidget( array( "name" => "hello2",
"args" => "{name: 'Duke'}")
); ?><link
type='text/css'
rel='stylesheet'
href='http://localhost:8080:8080/hellophp/jmaki-core/resources/hello/component.css'></link>
<script type='text/javascript'
src='http://localhost:8080:8080/hellophp/jmaki-core/resources/hello/component.js'></script>
<script type='text/javascript'>
jmaki.addWidget({uuid:"hello_2",
name:"hello",
widgetDir:"http://localhost:8080:8080/hellophp/jmaki/resources/hello",
script:"http://localhost:8080:8080/hellophp/jmaki/resources/hello/component.js"});
</script>
and
<link type='text/css'
rel='stylesheet'
href='http://localhost:8080:8080/hellophp/jmaki-core/resources/hello2/component.css'></link>
<script type='text/javascript'
src='http://localhost:8080:8080/hellophp/jmaki-core/resources/hello2/component.js'></script>
<div id="hello2_3"
class="hello2"></div>
<script type='text/javascript'>
jmaki.addWidget({uuid:"hello2_3",
name:"hello2",
widgetDir:"http://localhost:8080:8080/hellophp/jmaki-core/resources/hello2",
args: {name: 'Duke'},
script:"http://localhost:8080:8080/hellophp/jmaki-core/resources/hello2/component.js"});
</script>localhost:8080:8080".
This issue is followed
here.jmaki-php-0.9.7.2\jmaki-php\samples\loadtable" and
invoke "ant". This creates "dist\jmaki-loadtable-php-0.9.7.2.zip".web"
directory of your project. http://localhost:8080/hellophp/web/jmaki-loadtable/index.php".
<?php
addWidget('dojo.table', null, null, null, "tabledata.json");
?>None of the samples that use XMLHttpProxy (rssData, cl-mashup and mapit) will work because I could not find XSLT extension for Quercus. This issue is followed here. Other users have asked similar question with no clear answer.
Technorati: jmaki php glassfish web2.0 caucho quercus
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
|
Today's Page Hits: 2517
Total # blog entries: 1002
Posted by Arun Gupta's Blog on September 08, 2007 at 07:08 PM PDT #