I know little about the new features in PHP 5.3 (shame on me) so the talks by Scott MacVicar and Sebastian Bergmann should be well worth taking in. Stuart Herbert's talk on PHP frameworks is sure to be interesting and no doubt will create plenty of audience discussion. There is lots more with talks about security, cloud computing and a term I had never heard before, database sharding.
My small contribution to the event is to put together a couple of demo applications for the Zero stand. Given my main thing is language interop I thought to start with some PHP/Java Bridge examples. The BIRT stuff I rambled about the other day fits nicely and produces some glossy charts just perfect for a demo [:o)
Thanks to Rob we also have a demo using Apache POI (the project name is a story in itself). POI is interesting because it provides a cross platform library for reading and writing Microsoft Office file formats. POI is really easy to use, just grab the download from the POI web site and extract the three JAR files. In Zero they need to go into the lib directory.
<?php
java_import("org.apache.poi.hslf.HSLFSlideShow");
java_import("org.apache.poi.hslf.usermodel.SlideShow");
$fs = new Java("java.io.FileInputStream", "/test.ppt");
$hsss = new HSLFSlideShow($fs);
$ss = new SlideShow($hsss);
foreach ($ss->getSlides() as $slide) {
echo $slide->getTitle();
}
?>
The code simply iterates through the titles of each PowerPoint slide. All very straightforward and just the tip of the iceberg for what POI can do.
0 comments:
Post a Comment