Web Developer Juice has posted the second part of their series looking at some of the "magic functions" that PHP has to offer - special functions that do automagic things in your scripts and classes. Part one can be found here.In my previous post (PHP Magic Functions), I discussed about __construct, __destruct, __call and __callStatic. Lets explore a few more magic functions...In this latest part of the series they look at three functions:
In a new post to his blog Johannes Schluter suggests an alternative to using prepared statements in PHP applications using a database - creating a handler method that allows for dynamic queries as well as proper escaping of values.Now prepared statements were a nice invention some 30 years ago abut they weren't meant for making things secure and so they do have some shortcomings: One issue is that preparing and executing a query adds a round-trip to the server where it then requires resources. [...] With...
Ralph Schindler has a new post to his blog describing some of the what he's done to understand dependency injection in PHP and includes some illustrations to share that information.Whatever the reason, one of the newest concepts (at least over the past 3 years or so) that has emerged as one of our heated topics of debate is how to manage object dependencies. Interestingly, the argument of how to manage dependencies is generally named by the solution which it's proponents give as the solution: dependency...
Here's what was popular in the PHP community one year ago today:PHPFreak.dk: Review: NetBeans 6.9 Beta for PHP
Test.icial.ly Blog: Why are interfaces widely ignored in the PHP world...
DealTaker Blog: PHP & MongoDB Sitting in a Tree: Part 1
The Register: Exam board deletes C and PHP from CompSci A-levels
Raphael Stolt's Blog: Installing the PHP redis extension on Mac OS X
Phil Sturgeon's Blog: CloudIgniter: Easy hosting for CodeIgniter
PHPClasses.org: Book Review: Expert PHP and MySQL
Top 10 Reasons Why Firefox is still Better than Chrome for Web Development
By Manuel Lemos
Sometime ago many of us, Web developers, have switched from using Firefox to Google Chrome because of important features like speed.
Now that Firefox 4 was launched it addressed some of the issues we had with past versions, thus making it better at least for Web development.
This article explains some of the top reasons why Firefox is still a better browser than Google Chrome to aid in our Web development work.
There's no way around it, we have class dependencies within our other functions, methods, etc. Within the PHP community, the argument isn't whether or not it makes sense. Our argument centers around: what is the best approach? Ralph Schindler - he works for a company called Zend - lays out the history, the arguments, and drops some useful conclusions..
Over the past few years, there are a few concepts and programming patterns that have muscled their way into the hearts and minds of PHP developers from other languages and programming communities. These concepts range from the MVC application architecture as well as various modeling techniques (think ActiveRecord and Data Mapper), to a pure shift in the way we think about application architectures, like aspect-oriented programming (AoP) and event-driven programming. Perhaps it's because PHP has been...
Last week I had the opportunity to talk about User Centered Design and Agile at the annual Italian phpDay that was held in Verona (more on my talk further down). It was my third time at the conference and it was a pleasure to see how much it had grown. It is organised by the GRUSP, the Italian PHP user group that is at the heart of a growing, dedicated and passionate PHP community. Many of the attending developers are part of small companies and most of them had to go through quite a rough patch in the...
With all of the frameworks making their way around the PHP community, it's interesting to see different developers' takes on judging which is the best for their needs. In this new post to his blog Volker Dusch takes the opposite stance - he hates talking about frameworks.I just hate talking about frameworks! But as it seems not many people share that feeling so this is an attempt to write a rather short and linkable post on how i approach a new framework and by what standards i judge it. [...] I'm not...
James Morris has a new post to his blog talking about a way he's found to remove dependencies from parts of your code by using the Observer pattern (specifically with the SplObserver and SplSubject components of PHP's SPL libraries).Working on a symfony app, you usually have a mix of domain objects that are used by symfony actions, interspersed with symfony specific code such as logging and sfContext type stuff. A common bad practice I see is symfony specific code peppered inside of domain objects that...
James Cohen has a quick post about what he calls a "poor man's parallelization" for working with batch jobs. It takes in parameters that tell it which set of jobs to run through when looping.One common problem that I've seen time and time again with batch processing jobs (generally cronjobs) is that when they're written they run quickly. Over time their workload grows until eventually it's unacceptably slow. [...] To create a simple of way of separating the jobs in a consistent way we can use the modulus...
So I've been on the job hunt since November when I got laid off from my previous position.A It's been taking me a while, primarily because after having a number of jobs ain a row', I'm really this time trying to find the aperfect' fit.A A position that I'm going to stay in for the next 5+ years.AA My next career, not just the next job position that sounds interesting enough to work on for a while.
The job hunt has come (essentially) to a close, and I'll share more on that in the future.A But in the...
On the Zend Developer Zone today there's a new post from Keith Casey about some of the design patterns he hates - ones that are misused too often and have become more of a "worst practice" at times than others.To be clear, I think Design Patterns have their place. When used properly, they can make our lives easier and our code better. When they're misused - "If the only tool you have is a hammer.." - then they can become the bane of our existence. Unfortunately, some Design Patterns seem more susceptible...
Rafael Dohms has, in a recent post to his blog, shown how to set up NetBeans to use PHPUnit tests with XDebug. This allows him to run his unit test and track down problems with the handy XDebug extension right from his IDE.Every now and then you run into this weird situation in your code, where something that was supposed to zig is now zagging and it makes no sense whatsoever. For me this ends up happening in my unit tests since i'm not running everything in the browser everytime and since my tests...
On PHPBuilder.com there's a new tutorial posted showing you how to create a user authentication system that uses sessions to handle the logged in user's information.Outside of installation and configuration issues, reader questions pertaining to user authentication and session management almost certainly rank among the most common I receive on an ongoing basis. The logic itself is pretty straightforward; however, even a simple implementation involves a number of small but important details which aren't...
One of the issues Web Developers face is making their application robust to prevent SQL injection attacks. Different approaches exist which help. Sometimes people use large abstraction layers (which, sometimes, don't make anything safe ...) and sometimes people use prepared statements as a way to secure queries. Now prepared statements were a nice invention some 30 years ago abut they weren't ment for making things secure and so they do have some shortcomings: One issue is that preparing and executing a...
Simple MVC Shutdown Manager
Simple CAPTCHA Image Verification
AC full page cache
jQueryUI PHP wrapper
Earlier this year I was invited to speak at the Linuxwochen in Vienna first in May. The Linuxwochen is a conference taking place in different time slots at different cities in austria. Besides Vienna these are Graz, Linz, Krems, and Eisenstadt.
This years Vienna conference was hosted by the FH Technikum Wien, not only providing the accommodation and infrastructure for the conference, but also a very stable and reliable wireless network which is not too common on conferences.
What did I talk about?...
Almost without thinking about it, we use a variety of Design Patterns every day. As much as some make our lives easier and our code better, some haunt us in our dreams, and make us dread the morning.