This article tries to give you an overview on how CouchDb can be used to map
data to a data storage and how it is completely different from relational
databases. I try to introduce the basic concepts and show an advanced use
case.
I've only just announced my session at this year's SymfonyCamp, and already I can announce the next one. I will be speaking at this year's installment of the International PHP Conference, one of the biggest conferences in the PHP realms of this world.
To make it short: FrOSCon 2008 was as expected - fantastic. :)
I'll try to summarize the best things during the last weekend in following.
The PHP Usergroup Dortmund arrived on Friday evening at Thomas' place, who invited us for Papaya ;) Cocktails. We had a quite funny evening and stayed at Thomas' and Bastians home to be at FrOSCon early on Saturday morning. Thanks for the cocktails and accommodation, guys!
The start of FrOSCon was absolutely fluent and problem less. We reveived our auditorium through the VIP entrance and got started with our talks immediately. 2008-08-29 04:40:06 | 全文 | 评论(0)
MemcacheD is a very cool piece of software. When i did some optimization of a cluster based webapp lately, i was wondering how Memcache was speading my cache entries over the cluster. So i did some research for monitoring tools. A simple approach to monitoring would be to use Cacti to monitor status values like Cache usage, hits/sec etc. This can be done by a template like this. An alternative was provided by Harun Yayli: His memcache.php which somewhat resembles the APC status page and now is a part of PECL/memcache is easy to setup and works well. It also allows to dive into the data structures but you need to decide for one server first, then click into a "Slab" and then you see the keys. Inspired by this, i wrote a small script that fetches all data from a memcache cluster, gets all keys out of it and then sorts and displays them in a list. Yes it it ugly and yes: the memcacheD is not answering other requests while doing a cachedump. But i fo ......
Your good comments from all over the world about memcache.php is amazing. Thank you all!
I’ve recently received a contribution from Michael Gauthier. I took the liberty to tweak a bit and now memcache.php can flush individual server (no flush all servers yet).
PS: I still receive any feedback from pecl guys about my previous update. I’ll post this to them again. I’ll announce when this version is in pecl/memcache CVS.
To make it short: FrOSCon 2008 was as expected - fantastic. :)
I'll try to summarize the best things during the last weekend in following.
The PHP Usergroup Dortmund arrived on Friday evening at Thomas' place, who invited us for Papaya ;) Cocktails. We had a quite funny evening and stayed at Thomas' and Bastians home to be at FrOSCon early on Saturday morning. Thanks for the cocktails and accommodation, guys!
The start of FrOSCon was absolutely fluent and problem less. We reveived our auditorium through the VIP entrance and got started with our talks immediately. 2008-08-29 03:40:09 | 全文 | 评论(0)
SugarCRM Developers Blog: Enabling IMAP support under OS X Leopard
With the release of Mac OS X 10.5 Leopard last fall, Apple (finally) included a modern version of PHP (currently version 5.2.6 as of this writing). [...] However, the default install of PHP that Apple included didn't include all of the available PHP extensions. Most notable is the IMAP extension, which is used in SugarCRM for the Campaigns and Emails modules. However you can build this extension and have it loaded dynamically, without affecting the rest of the default PHP install.
He shows where to get the packages and libraries you'll need to get the support working. The method involves building a shared module and including it to be loaded in your php.ini. This way it doesn't disrupt any ......
John Mertic's Blog: Enabling IMAP support under OS X Leopard
John Mertic passed along a note about a new post to his blog detailing how to enable IMAP support for PHP on an OS X machine.
With the release of Mac OS X 10.5 Leopard last fall, Apple (finally) included a modern version of PHP (currently version 5.2.6 as of this writing). [...] However, the default install of PHP that Apple included didn't include all of the available PHP extensions. Most notable is the IMAP extension, which is used in SugarCRM for the Campaigns and Emails modules. However you can build this extension and have it loaded dynamically, without affecting the rest of the default PHP install.
He shows where to get the packages and libraries you'll need to get the support working. The method involves building a shared module and including it to be loaded in your php.ini. This way it doesn't disrupt anything the current bui ......
This is the fist time I have heard Rasmus Lerdorf speak and it was entertaining to say the least. Refreshing would another way to describe it, I enjoy hearing real opinions and not holding back — Rasmus doesn’t hold back.
Just a short background, Rasmus Lerdorf is the creator of PHP and still continues as a core developer to the PHP project.
PHP frameworks
In his address he choose to highlight PHP frameworks (Drupal was not spared) and how poor they are at performance. Not only are they slow, but their "jack-of-all-trades" attitude leads developers down the wrong path by not using what is best for the job. He continues on by stating that PHP developers really need to think about performance for not only scalability reasons but for green reasons. If programs were more efficient it would ......
We're getting ready to release Zend Framework 1.6.0. However, one important
Dijit had to be omitted from the release as I was not able to get it working
in time: dijit.Editor.
This dijit is important as it provides an out-of-the-box WYSIWYG editor that
you can use with your forms. Unfortunately, actually using it with forms is
pretty tricky -- Dojo actually ends up storing content outside the
form, which means you need to create a handler that pulls the content into a
hidden element when saving.
I have created an implementation, however, that you can start using
now, and I'm posting it below. It includes both a view helper for displaying
it, as well as a form element for use with Zend_Form.
Anis Ahmad's Blog: Join Problems with Zend_Paginator and Zend_Db_Select objects
Anis Ahmadhad a problem. The Zend_Paginator component of the Zend Framework, while powerful, wasn't quite working right. Bugs popped up when he used a join along with a Zend_Db_Select.
One of the 4 Adapters for Zend_Paginator is DbSelect which uses a Zend_Db_Select instance. Now, the problem occurred if I need to have some calculative data from other tables and use join with the Zend_Db_Select object for them.
He gives an example of a join that he performed with the component, the details of the "behind the scenes" code and why it happened that way. He also offers a solution (before the Zend_Pagination component was patched for it, of course) of changing the count() method it uses slightly to remove an unneeded part of the query.
On the CodeUtopia blog there's a recent post with info on creating a custom event listener in PHPUnit that can help keep you database data completely clean.
When testing code which uses the database, you would usually want to make sure the database stays pristine for each test - All tables should be empty, as any extra data could interfere with the tests. You could probably write an extended Testcase class which automatically does this before each test in setUp and afterwards in tearDown, but it may have some issues. [...] Luckily, PHPUnit has a way to add event listener that react to certain events.
It uses the TestListener interface to make the event handler that (with the help of Doctrine) starts up, makes the tables with data and wipes them o ......
Chris Hartjes' Blog: Reader Feedback: Working with XML In PHP
Chris Hartjes has answered some more questions his readers have asked in a new post to his blog today. This time the focus is on XML handling.
Welcome to the 3rd installment of me answering reader feedback questions. Today we deal with a topic that I deal with every day at my day job - working with XML in PHP.
He talks about SimpleXML (and how well it does its job) and their (his work's) current method of handling the storage of XML in a database. He describes both their current process and his ideal one, how he'd want to interface with their eXist backend.
Lifehacker: Host Your Own Music Playlist with Opentape
With the demise of the muxtape service, a new option has popped up - the ability to run your own version with a PHP application called OpenTape. Lifehacker has posted a guide to getting this software set up and working.
Beloved music playlist hosting service Muxtape's gone offline to "sort out a problem with the RIAA," but if you've got some web server space, you can host, stream, and share your own digital music mixes Muxtape-style with newly-launched PHP web application Opentape.
It's not a direct copy, but it's pretty close (and pretty easy to get up and running). It'd PHP5 only, so if you're still living in the past and only have PHP4, you're out of luck. Their guide shows a sample installation on a Windows machine, but its not much of a stretch to follow along on a unix-based machine. You'll also need the curl extension to ......
DevShed: Paginating Database Records with the Code Igniter PHP Framework
DevShed continues their look at using the CodeIginiter PHP framework to build a sample application in this latest part of their series - a look a paginating the database results from a query.
As you may guess, however, Code Igniter comes bundled with a robust set of core classes, which can be used to perform all sorts of clever tasks, such as working with databases, performing file uploads, validating user-supplied data, and so forth. [...] I'm going to show you how to improve the MySQL-driven application developed in the preceding tutorial, since it'll be provided with the capacity for paging database records, via the pager class included with Code Igniter.