PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 101 to 120 of 304

Matthew Weier O'Phinney's Blog: Dependency Injection: An analogy

Matthew Weier O'Phinney's Blog: Dependency Injection: An analogy
For those still grappling with the concept of dependency injection, Matthew Weier O'Phinney has posted an analogy that could help make the concept a bit more clear.I've been working on a proposal for including service locators and dependency injection containers in Zend Framework 2.0, and one issue I've had is trying to explain the basic concept to developers unfamiliar with the concepts -- or with pre-conceptions that diverge from the use cases I'm proposing.Using his wife as a sample sounding board, he...

Lorna Mitchell's Blog: Getting Dates from Week Numbers in PHP

Lorna Mitchell's Blog: Getting Dates from Week Numbers in PHP
Lorna Mitchell has a quick handy post to his blog today showing how you can grab the date (a timestamp) from the week number of the year.Recently I've been building a little project that pulls data from Google Analytics and shows your web statistics in a simple form. One thing I wanted to do was show the data for a quarter, but graphing by day is too chaotic and graphing by month only gives three points, so I wanted to graph by week. This was fine but the data returned by Analytics only gives me the week...

Kevin Schroeder's Blog: Integrating Zend_View with WordPress

Kevin Schroeder's Blog: Integrating Zend_View with WordPress
Kevin Schroeder has a recent post to his blog showing how he integrated Zend_View into a WordPress install for his blog. It was as a part of a plugin he uses on some of his internal pages.I just read a blog post about integrating Zend Framework and WordPress and figured I'd add some commentary of my own, since I've done something similar. In my ESchrade plugin I use Zend_View to render some of my admin pages, though there is no reason why you couldn't use it elsewhere, as long as the plugin has already...

Volker Dusch's Blog: Mandatory "Template Engines (Twig) vs Plain Old PHP" Post

Volker Dusch's Blog: Mandatory "Template Engines (Twig) vs Plain Old PHP" Post
Volker Dusch has posted what he calls his mandatory templating post comparing the benefits of using plain PHP for templates versus the Twig.If you read some of my previous posts you know me as a "clean code" guy. I like readable, understandable and maintainable code. The same goes for templates. I need to be able to parse very quickly what is happening.. at least i want to.He argues that, because the syntax of something like Twig is so much simpler and more readable, it's a better solution in the long...

"Drupal not good for government websites"

"Drupal not good for government websites"
Recently in an article (Dutch) in Dutch publication "Webwereld", Drupal advocate and developer BAr Kessels stated that while Drupal is an awesome CMS, it is not a good fit for government websites and other big projects. An interesting statement for someone from the Drupal camp to make. While BAr has some valid points, his statements are a bit too generic for my liking.

Gonzalo Ayuso's Blog: Howto Send/Read SMSs using a GSM modem, AT+ commands and PHP

Gonzalo Ayuso's Blog: Howto Send/Read SMSs using a GSM modem, AT+ commands and PHP
Gonzalo Ayuso has a new post to his blog today showing how you can send and read SMS messages with PHP through a GSM modem. The AT+ commands they use can be sent via a serial (or serial-to-usb) interface directly from your application to a local device. He includes both code and some sample AT commands to get the ball rolling.GSM modems are similar than normal modems. They've got a SIM card and we can do the same things we can do with a mobile phone, but using AT and AT+ commands programmatically. That's...

Community News: Latest PECL Releases for 03.22.2011

Community News: Latest PECL Releases for 03.22.2011
Latest PECL Releases: win32service 0.1.0 gupnp 1.0.0 chdb 1.0.1

phix-0.11 and ComponentManager-1.0 Released

phix-0.11 and ComponentManager-1.0 Released
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. phix is a generic command-line tool that I recently released with support for creating and managing several types of PHP components. phix was always intended to be a framework-agnostic...

DataObjects links.ini and Archiving database data - an ideas of march post..

DataObjects links.ini and Archiving database data - an ideas of march post..
Article originally from rooJSolutions blogTrying to keep up with the Ideas of March - and get a few more posts out.DB_DataObject is the workhorse behind most of my project work. It saves a huge amount of development time, and makes code considerably simpler to understand, modify and maintain. Recently I've added a few new features to this granddaddy of ORM's, and solved a perpetural data management problem at the same time.AutoJoinsLast month saw the commit of the autoJoin method to pear's svn server,...

Dependency Injection: An analogy

I've been working on a proposal for including service locators and dependency injection containers in Zend Framework 2.0, and one issue I've had is trying to explain the basic concept to developers unfamiliar with the concepts -- or with pre-conceptions that diverge from the use cases I'm proposing. In talking with my wife about it a week or two ago, I realized that I needed an analogy she could understand; I was basically using her as my rubber duck. And it turned out to be a great idea, as it gave...

Blog fight round two

Blog fight round two
Thanks PAdraic So I hope you've enjoyed our blog fight between me and PAdraic Brady. I sense a lack of a sense if humour in his last post his blanket claims that regex html validation sucks were obviously unjustified. Anyway I was waiting for a cool XSS hole in htmlReg from him, it never came he did raise a valid point about a aoclickjackinga threat so I decided to update htmlReg/CSSReg to enable a site to disable all CSS positioning. Thanks very much PAdraic for reporting this issue! Disable...

Rob Allen's' Blog: A Zend Framwork compound form element for dates

Rob Allen's' Blog: A Zend Framwork compound form element for dates
In a new post to his blog today Rob Allen shows you how to create compound form element handling in a Zend Framework application thanks to some custom work with Zend_Form and Zend_View extensions.A little bit of googling found this site http://codecaine.co.za/posts/compound-elements-with-zend-form which has not unfortunately disappeared, so the code in this article owes a lot of the author of that article. It turns out to be remarkably simple to create a single Zend Form element that is rendered as...

Phil Sturgeon's Blog: Video: Set up a REST API with CodeIgniter

Phil Sturgeon's Blog: Video: Set up a REST API with CodeIgniter
Phil Sturgeon has posted a new screencast to his blog today showing you how to set up a REST controller with CodeIgniter, covering some of of the things you'll need to get up and running.I wrote up an article on NetTuts last year "Working with RESTful Services in CodeIgniter" hoping that would cover the majority of questions but with new features like API Keys, Limiting and Logging being added I thought a quick run-through was in order. This video covers the basic implementation, HTTP Basic/Digest...

QaFoo.com Blog: Howto write a Rule for PHPMD

QaFoo.com Blog: Howto write a Rule for PHPMD
On the QaFoo blog today Manuel Pichler has written up a guide to help you write a custom rule to use with the PHP Mess Detector (PHPMD) as extended from some of the current rules (it's always easier to start from examples).Let us start with some architecture basics behind PHPMD. All rules in PHPMD must at least implement the PHP_PMD_Rule interface. You can also extend the abstract rule base class PHP_PMD_AbstractRule which already provides an implementation of all required infrastructure methods and...

Stuart Herbert's Blog: Introducing phix

Stuart Herbert's Blog: Introducing phix
In a new post to his blog Stuart Herbert has introduced phix, a packaging tools that can be used to manage and install different components in a framework-agnostic sort of way.phix is a small command-line tool for PHP applications. I created it to fix (pun intended) the problem of how to easily automate the tasks involved in creating and (especially) maintaining components. These tasks aren't built into phix; they are commands that ship with the phix distribution. You can create your own commands to run...

Community News: Latest PEAR Releases for 03.21.2011

Community News: Latest PEAR Releases for 03.21.2011
Latest PEAR Releases: PHP_CodeSniffer 1.3.0 Image_Transform 0.9.4 File_Util 1.0.0 File_CSV 1.0.0 File 1.4.0 XML_GRDDL 0.2.0 Validate_IR 0.1.0

Howto write a Rule for PHPMD

Howto write a Rule for PHPMD
This blog post will give you a detailed introduction into the development of custom PHPMD rules. PHPMD is static code analysis tool that helps to improve the quality of PHP software projects. Therefore it processes the project's source code and searches for known error patterns, design flaws, overcomplicated expressions and unused/dead code. You would like to use like PHPMD to improve the quality of your project, but you are missing a features in the current release, then you should read this post....

Calculate the impact of your posts

Calculate the impact of your posts
Today on HN there was a thread on how to get the Facebook share counts for a URL. Turns out that with Facebook, just like with most social web services this is quite easy. And actually I've been doing this since 2007 to calculate news item relevance on Maemo News. Of course the social web landscape has changed quite a bit since the 2007 launch of our "social news" service, and many of the original relevancy sources have fallen into misuse. So now, in preparation of the new Planet MeeGo aggregator, I...

Introducing phix

Introducing phix
In my Beyond Frameworks talk, I explained how a component-based architecture can help answer some of the important (i.e. expensive!) questions you might face when creating long-lived apps that rely on a PHP framework. In this series of blog posts, I'm going to look at how to go about creating and working with components. phix is a small command-line tool for PHP applications. I created it to fix (pun intended) the problem of how to easily automate the tasks involved in creating and (especially)...

Ideas of March

Ideas of March
One of the things I love about Twitter is it enables me to stay in contact with the PHP community, and in particular the group of speaker I have come to know through PHP conferences. My friend Chris Shiflett tweeted about the aoIdeas of Marcha calling for a revival of the blog as a form [...]