centre{source}
INTERACTIVE AGENCY
Posts Aboutphp
Choosing the Right Tool for the Job
At CentreSource, we have a motto that “outcomes always outweigh the output.” Through this, we try to focus on meeting the individual goals of our clients, versus focusing on the process of how they get done. One goal we often hear is that our clients would like an easy way to update the website themselves. By using a Content Management System (CMS), we enable our clients to accomplish this — without having to install anything on their computers, or know too much about how websites work.
Over the history of CentreSource, we’ve worked hard to choose the perfect CMS to be able to meet the individual needs of each client and project that comes our way. There was always a balance that had to be struck — it couldn’t be too cookie-cutter, or else we wouldn’t be able to do everything that the client was asking. Conversely, it wouldn’t be cost efficient if we had to custom build a CMS for our clients each time. By focusing on the outcome (the client’s goal of an easy-to-update website), we decided that the best single CMS option was not a single option at all, but instead a “toolbox” approach that would allow us to use the appropriate tool for each unique job.
Symfony Faux Form Serialization
Recently, I ran into an issue when building a Symfony plugin for Slideshow renderings. When I added the support for multiple libraries, in this case Google Slideshow2 and JQuery Cycle, they had drastically different configuration options. JQuery Cycle allows you to use a list of effects, such as blindX and blindY. These effects are great, and I want the end user to be able to easily select between them. Google Slideshow2 allows the adding of thumbnails and traversing controls. Neither of these settings apply to the other, and this is only two slideshow renderers. What happens when I add another one? Five more? I could create multiple tables for each renderer, such as google_slideshow2_options and jquery_cycle_options. I could also just provide a textarea for key-value pairs (effect=blindX timeout=500) that the user typed in. I did not like either of these options, as the former struck me as over-architecting, and the latter as unusable.
Doctrine 1.0 BETA1 Released
Great news! The first version of the Doctrine 1.0 branch has been released as BETA1. The project is on schedule to release Doctrine 1.0 on September 1st 2008.
Today I am happy to announce the release of Doctrine 1.0-BETA1. This marks the true start for the 1st generation Doctrine stable lifecycle. As you may already know, Doctrine 1.0 has been slated to be released on September 1st 2008 for quite some time now. We still have a few more pre-1.0 releases to go until 1.0. The roadmap for now is BETA1, RC1, RC2 and then 1.0 STABLE. You can see the roadmap in trac if you’re interested in keeping up with the Doctrine schedule. More information on 1.0 and what other things to expect on September 1st will be given soon. Make some noise!
Doctrine officially supported by symfony
A few weeks ago on the symfony blog, Fabien announced that as of symfony 1.1, Doctrine is officially supported. The documentation will slowly be updated and converted from Propel to Doctrine. Right now, the My First Project tutorial and a new Getting started with Doctrine + symfony 1.1 tutorial have been published on the symfony-project website. More documentation coming soon and tutorials for using Doctrine with symfony coming soon.
Apple xServe: dscl, dsimport and web services aka fun!
So, recently here at CentreSource we’ve been working on a project which is using the brand spanking new xServe from Apple. First, let me say the server is pretty slick, but like any other software it has issues. The reason we went with the xServe was because we needed the ability to have web applications which have central authentication and calendaring data. Open Directory, CalDAV, PHP, Apache, and MySQL are just ready to go with xServe, so it made sense!Our usage is that we have these web applications on the net which will use the PHP LDAP Functions to authenticate our users on Open Directory from our PHP web applications, we also communicate to Open Directory whenever adding or changing users passwords to keep things up-to-date. To accomplish this I have written a small web service which lives on the xServe and runs under Apache and PHP. This code talks to Open Directory via the dscl and dsimport command line utilities provided by Apple. I use dsimport for adding the initial working records, and I then use dscl to change passwords. So essentially this web service is just a web service wrapped around those two commands.
How to use Doctrine with Zend Framework
I have been waiting on this for a while. Finally, someone has put together an article detailing how to use Doctrine with the Zend Framework. The article was linked from the Doctrine website, but you can also go directly to the original article here.
Send Growl notifications in PHP
This has to be one of the coolest and simplest things in PHP.
http://www.sitecrafting.com/blog/php-growl/
// Setup $growl = new Growl();
$growl->setAddress(’127.0.0.1′);
$growl->addNotification(”Test”);
$growl->register();
// Send Notification
$growl->notify(”Test”, “Test Alert”, “The body of the test alert!”);
This simple class allows you to send OS X growl notifications to any valid network address. Pretty cool. Within a few minutes, Jared and I were Growling at each other in PHP.
Doctrine Cheat Sheet
Check out the new Doctrine Cheat Sheet that was released today on the PHP Doctrine website.
I have put together a cheat sheet for all the day to day usage syntaxes of Doctrine. The cheat sheet can be found here. This is the first draft of the document so any comments and feedback would be very useful.
The cheat sheet document can be found here http://www.phpdoctrine.org/blog/doctrine-cheat-sheet
My First Doctrine Project Tutorial
Over at the Doctrine PHP ORM website they have just released a tutorial on how to get started using Doctrine in under 5 minutes!!!
“I have put together a short and sweet tutorial on how to get started using Doctrine in under 5 minutes. A few weeks ago, we announced the sandbox package which allows you to get started using Doctrine with a zero configuration sandbox environment. The tutorial is built using this sandbox package and shows you how Doctrine can be easily implemented and used in your web applications.”
The tutorial can be found here
Using Doctrine in CodeIgniter
I have been taking a peak around CodeIgniter tonight and I put together a little tutorial on how to integrate Doctrine with your CodeIgniter applications. It was fairly simple and took me about 15 minutes to figure out a nice and clean implementation. The wiki page can be found here.
