A demo of SOAPjr using PHP/Symfony and ExtJS is now available at http://dev.communitybookshelf.org/
This demo showcases these custom components:
- Backend:
- Frontend
A demo of SOAPjr using PHP/Symfony and ExtJS is now available at http://dev.communitybookshelf.org/
This demo showcases these custom components:
Many might consider even the thought of running PHP inside of a Java Virtual Machine to be anathema. Others will wonder why bother (apart from the novelty). However running PHP in Java has one crucal benefit: it future-proofs your code.
Quercus is a nifty utility that will allow you to run PHP code in clouds such as Google App Engine1. This means your Drupal and Wordpress sites can now be distributed across a highly avaliable and scalable cloud infrustructure.
Now if we can only get an MVC framework like Kohana or Symfony to work on top of this system..
Tags: cloud computing, drupal, high availability, java, php, php in the cloud, wordpress
I wrote this method the other day that takes a simple PHP object, inspects it’s properties and “prunes” empty ones. I wrote this method in order to compress JSON objects by removing null properties before sending them down the wire, a big problem when using base objects or models.
If you find this useful or a have a suggestion, feel free to let me know!
private function getStripped($obj) {
$objVars = get_object_vars($obj);
if(count($objVars) > 0) {
foreach($objVars as $propName => $propVal) {
if(gettype($propVal) == "object") {
$cObj = $this->getStripped($propVal);
if($cObj == null) {
unset($obj->$propName);
} else {
$obj->$propName = $cObj;
}
} else {
if(empty($propVal)) {
unset($obj->$propName);
}
}
}
} else {
return null;
}
return $obj;
}
Tags: json, optimization, php, recursive
StumbleUpon
Twitter
Flickr
Delicious
Friendfeed
LinkedIn
MySpace
Digg
Google Reader
Picasaweb
Slashdot
Blogger
Facebook ProfileCreated by Philip Norton
Arclite theme by digitalnature | powered by WordPress