|
Sponsored Link
|
As many of my readers know, I have a keen dislike for regular expression based html sanitisation. Regular expressions simply do not understand html's nested nature and the numerous possible html/CSS standards it must abide by. The result is that far too many developers try to program this understanding (and unfortunately their lack of comprehensive understanding) into home grown sanitisers using as little code and tests as possible.A It's a horrendous and reprehensible practice that has created a large...
I've been working with OAuth, as a provider and consumer, and there isn't a lot of documentation around it for PHP at the moment so I'm sharing my experience in this series of articles. This relates to the stable OAuth 1.0a spec, however OAuth2 has already started to be adopted (and differs greatly). This article uses the pecl_oauth extension and builds on Rasmus' OAuth Provider post.
OAuth Pages and Endpoints
OAuth has a little more baggage with it than just passing a username and password to an API....
I am a podcast junkie, maybe that is why I keep starting them. I listen to a lot of podcasts covering a variety of topics. One of them recently posted an episode I enjoyed so much, I thought I would share it with you. Click on inside, I've got the details and links.
On the Web Builder Zone (a part of DZone.com) there's a recent post from Giorgio Sironi reviewing the Mockery library, a mock object framework created by Padraic Brady.Mockery is a mock object framework (more properly Test Double framework) from @padraicb, independent from testing frameworks like PHPUnit. It can be used to quickly prepare Mocks, Stubs and other Test Doubles to use inside your unit tests. I've tried Mockery via a PEAR installation and I must say its expressive power is higher than that of...
On the Query7.com blog today Logan shows you how to create a simple wiki with the help of the Kohana framework, a HMVC PHP5 framework that includes several tools (including UTF-8 suport and a cascading filesystem) to make a developer's life easier.In this tutorial you will learn how to create a simple wiki using the PHP framework Kohana version 3.1. Several years ago Siddharta Govindaraj created a screencast demonstrating how to create a wiki using Django, this is essentially the Kohana version of that....
Webshell
is a console-based, JavaScripty web client utility that is great for
consuming, debugging and interacting with APIs.
I use Firefox as my primary browser.
The main reason I've been faithful to Mozilla is my set of add-ons. I use
Firebug regularly, and I'm not sure
what I'd do without
JSONovich.
Last year, as I built Gimme Bar's
internal API, I found myself using Curl,
extensively, and occasionally
Poster,
to test and debug my code.
These two tools have allowed me to interact with HTTP, but not...
Gonzalo Ayuso has a new post to his blog today looking at a method you can use for real-time monitoring of your PHP applications with a combination of websockets and Node.js. The trick is to handle the PHP errors and send them over to a Node.js server for processing.The inspection of the error logs is a common way to detect errors and bugs. We also can show errors on-screen within our developement server, or we even can use great tools like firePHP to show our PHP errors and warnings inside our firebug...
In a new post to his blog Chris Roane looks at a method for some advanced form validation using both server-side and client-side validation (with the help of jQuery).Last year I wrote an article in how to implement basic validation for a form with PHP. I decided to re-look at this and improve what I did in that article. This time we are going to make a more advanced PHP form that is more responsive and effective. This PHP sample code has many advantages over the previous article. Not only that, but for...
In a new post to the Liip blog Benoît Pointet talks about his experience with Silex, the micro-framework from Fabien Potencier and the Symfony crowd.In a recent project, my team needed a micro backend for a small educational simulation game which was mostly client-side code. [...] There were so little backend tasks involved that the primary discussion lead to a 'no framework' approach. But after a great presentation by Igor Wiedler at Liip Zurich, we decided to use the Silex PHP micro-framework for our...
On his blog today Jani Hartikainen looks at how you can use the SPL exception types to allow for better overall error handling in your application. Things like BadMethodCallException and OutOfBoundsException make the errors much more descriptive.Since PHP 5, there has been a bundle of built-in exceptions - the "SPL exceptions" - in PHP. However, the documentation for these classes is quite lacking in examples, and it can be difficult to understand when you should be using them. The short answer is...
Latest PEAR Releases:
HTTP_Request2 2.0.0RC1
Net_DNS2 1.1.1
The Zend Framework team announces the immediate availability of Zend Framework
1.11.6, our sixth maintenance release in the 1.11 series, and a simultaneous
release of 1.10.9, a security fix release.
1.11.6 includes more than 60 bug fixes and may be downloaded from the
Zend Framework site .
According to Chris Aitchison, you're not a "software engineer" if you write code an develop applications - you're a "software gardener":The engineering metaphor has had its time in the sun, and maybe it even used to be accurate, but now it really only serves to help non-technical people have unrealistic expectations about how software gets built.The post describes software development as gardens instead of feats of engineering. It talks about the organic nature of development, how no matter the course...
Paul Jones has a new post today looking at the disconnect in the term "quality" that there seems to be between the ones developing the code and the ones paying for the end result.Recently, I was pondering why it is that programmers and employers have different attitudes toward the quality of the projects they collaborate on. The people who do the work are usually the ones who care more about quality. Why? [...] The people who are paying for the work care much less about quality. Why?He touches on some of...
This is part of a mini-series about typical refactorings when using DI containers. Read part one.
(c) Jil A. Brown
Introduce ParameterWhen configuring objects you will stumble upon occurrences of duplicated configuration. As configuration duplication is as bad as code duplication, making refactorings and maintenance time-intense and error-prone, we try to avoid them. Occurrences I had, started from defining the same hosts over and over for different services and quasi hard-coded upload prefixes for...
Kevin van Zonneveld has a new post to his blog revising an older post talking about session management with PHP and how limit the resources needed by them. In this post he points out another method - holding the sessions in RAM rather than on disk.sing 2007 article Create turbocharged storage using tmpfs, we can defeat some of this over-engineering and take a simpler approach to speeding up sessions in PHP. We'll store them decentralized in memory by mounting RAM onto the existing /var/lib/php5 session...
Fresh off his talk about Gimme Bar at the PHP Community Conference, Sean Coates has written two posts on his blog about his experiences with CouchDB and MongoDB while building Gimme Bar. Click on inside, I've got linksa€¦no browniesa€¦but I've got links. They are just as good, right?
Continuing on from his first Symfony2 is getting easier post, Fabien Potencier has two new posts in the series looking at other aspects of the framework that have improved to make developers' lives easier.In part 2 he talks about a patch that's been applied to help with errors in the autoloading process and throw an exception if something's' not found.Part 3 talks about an update to help make the pathing shorter on the Doctrine configuration files and the ability to move it to a centralized mapping file...
On PHPRiot.com there's a new tutorial showing you how to use the Google Translate service to translate the text of your website into any language they support. They interface with it using a cURL connection and JSON messaging.Google Translate is a service from Google that you can use to translate text or HTML from one language to another. One of the great features of this service is that they now offer an API to let you programmatically translate text. In this article I will show you how to interact with...
In a recent project, my team needed a micro backend for a small educational simulation game which was mostly client-side code. The backend responsibilities was to start a game, persist its state and synchronize players along the various phases of the game.
There were so little backend tasks involved that the primary discussion lead to a 'no framework' approach. But after a great presentation by Igor Wiedler at Liip Zurich, we decided to use the Silex PHP micro-framework for our minimal backend needs.
In...
|
|