PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 5261 to 5280 of 6889

Don't Panic

Don't Panic
It's finally happening. The end is near. The server is about to be destroyed by a fleet of Vogon cruisers. Actually, the server is about to be overrun by mouse clicks. It's time to go look at your code and fix the slow bits. The Internet The Internet is full of useful advice on how to speed up your code. There are a lot of slide decks and articles focussed on pushing the last bit of performance out of your code. They mention things like changing every occurrence of print to echo, changing $i++ to ++$i,...

ArgumentRewrap - A Vim plugin to automatically split argument lists

ArgumentRewrap - A Vim plugin to automatically split argument lists
I have been using Vim as my primary PHP development environment for several years by now. Inspired by two blog articles (Coming Home To Vim, Vim Toolbox, 2010 Edition) I recently read I decided to cleanup my Vim configurations and create certain new macros for recurring tasks. One of these macros is the ArgumentRewrap plugin, which instantly saves me a lot of time.

Job hunting 101

Job hunting 101
In this day and age, everyone uses the internet for finding new jobs or to find a new employee, but more and more I sense that it's all turning into one big mess.This blog post is devoted to all those people contacting me because they have the best job position. Most hits I get through my online resume at michelangelovandam.com or my linkedin profile. I'm not complaining about the fact that I got contacted this way, but I just mention some points of concern that might be useful for recruiters to at least...

Zend Developer Zone: Book Report: A Beginner's Guide to Zend Framework

Zend Developer Zone: Book Report: A Beginner's Guide to Zend Framework
On the Zend Developer Zone today there's a new book review from Cal Evans covering a recent release from McGraw/Hill (by Vikram Vaswani, frequently posted on the ZDZ) called Zend Framework, A Beginner's Guide.Vikram has been a long-time contributor to DevZone and is the author of our most popular article series, Zend Framework, A Beginner's Guide. [...] The language is easy to read, the examples are clear and there's even a joke or two in there that will make you groan. In short, I would recommend this...

Till Klampaeckel's Blog: Zend Framework: Writing an IN-Clause with Zend_Db

Till Klampaeckel's Blog: Zend Framework: Writing an IN-Clause with Zend_Db
In a new post to his blog Till Klampaeckel looks at something the Zend Framework's Zend_Db component dosen't seem to support - an "IN" on a fetchAll - and how he worked around it.The IN-clause is only supported when I wrap my statement with Zend_Db_Select, which is something I rarely do. Part of the reason is that I still don't feel comfortable writing my SQL in a DSL which doesn't really do anything besides wrapping a string into an object and IMHO it doesn't add to readability either. And the other...

Ibuildings techPortal: DPCRadio: Under PHP's Hood

Ibuildings techPortal: DPCRadio: Under PHP's Hood
New on the Ibuildings techPortal site the latest episode of their DPCRadio podcast series has been posted (as recorded at the Dutch PHP Conference 2010). This episode is Johannes Schluter's talk "Under PHP's Hood".PHP developers usually don't have to care about the inner workings of PHP and the Zend Engine as it simply works. This presentation will present some of the inner workings, like teaching the truth about references. Additionally it will present basics of PHP's opcode, the internal representation...

WebSpeaks.in: Cross Domain Posting using PHP and JavaScript: ITS POSSIBLE!

WebSpeaks.in: Cross Domain Posting using PHP and JavaScript: ITS POSSIBLE!
Ever been frustrated by the fact that your javascript code can't make JSON requests to sites under other other domains? Well, WebSpeaks.in has some happy news for you in the form of JSONP.Well.....finally i have worked out how to post cross-domain data which is restricted by browser's security policies. What is it?? This will be used for posting AJAX requests via java-script to any web-service or web-page in any DOMAIN and also get back the results from there.JSONP allows you to call a URL outside of the...

Web2project v2.2 Release Notes

Web2project v2.2 Release Notes
As of 19 December 2010, web2project v2.2 is officially live! You can download it from SourceForge now. While in many releases we might focus on cleanup or functionality or developer aspects or similar, this one is a mishmash of a bunch of useful updates on numerous fronts. This isn't all of the updates but a bunch of the important ones: For the Project Managers: We reworked much of the Gantt Chart logic. We've added a few icons to better represent the status of tasks and milestones. To make the overall...

Cal Evans' Blog: Ecommerce in WordPress

Cal Evans' Blog: Ecommerce in WordPress
Following his Day Camp 4 Developers event, Cal Evans needed a way to release the videos and materials from the day long even to those that paid to attend. Obviously, a download link just wouldn't do, so he went looking for something a bit more powerful and WordPress-y.It sounds like such a simple thing; just put them up for download, right? Not really. Let's look at the actual requirements: Shopping cart to allow me to eventually sell the videos, a way to let my existing ticket holders "buy" them for...

Michael Kimsal's Blog: magic __get and __set style?

Michael Kimsal's Blog: magic __get and __set style?
In this recent post to his blog Michael Kimsal asked about the usefulness of the __get and __set magic methods and the sort of code he usually sees along with it.For a long time I've held that __get and __set in PHP were not all that hot - mostly because it's solely error handling. There's no way to deal invoke __get or __set behaviour for properties that are defined on a class. [...] For those who insist on using __get/__set, I *typically* see this [messyy] sort of style code. The effect is to cram a...

Box UK Labs: Dependency Injection and Reflection library

Box UK Labs: Dependency Injection and Reflection library
On the Box UK Labs site there's an interesting dependency injection tool that uses Reflection to get some of the work done.Dependency injection is a well known concept, and there are currently a plethora of DI containers available from one of the interweb's many pipes. These include Symfony and Crafty, while the Zend Framework also has its own DI container. So why another? One of my personal goals as a developer is to make things so simple, even I can understand them. But most of the DI containers I've...

MySQL Transaction Gotchas & Good Parts

MySQL Transaction Gotchas & Good Parts
In my previous post, aoMySQL Transactions & Why You Can't Emulate Them in PHPa we discussed why transactions are useful and how a few simple SQL commands can make your application more robust. But few things are that easy in the life of a web developera Statements you can't ROLLBACK Unfortunately, ROLLBACK isn't a global undo for every database action. If you make a fundamental change to the schema, any existing transactions will be COMMIT-ed and the alteration will run within it's own single...

Domain Distribution by City

Domain Distribution by City
As part of my on-going domain informatics coverage, I am now publishing some additional information that IA've been able to gather in the last few days. I am making available two additional geographic chats that breakdown the domain distribution by top world cities. The first chart a preview of which can been below (click to see full, browse-able/zoomable version) shows the Top 150 cities, by domain distribution. These cities represent a total 91.3% of some 102 million domains that could be resolved to...

Using the Symfony2 console

Using the Symfony2 console
It is always almost the same story: "As a customer I want to import data from the the superseded system in to the newly build environment". So whats the deal? Building the new system based on the database structure to make the import as easy as possible? No, way to many drawbacks and since we have our lessons learned we know that flexibility matters and we'd rather go for a better fitting database design. Web-services for the reScue As for the flexibility decoupling is the magic word. A web-service might...

Color for the Holidays

Color for the Holidays
If part of your job involves debugging or monitoring PHP apps, you'll most likely have used tail to check for errors in a log file. While practical, it can become tedious to identify certain types of errors or warnings. If, on average, you spend 15 minutes per day searching for problems, those minutes add up to about 91 hours per yeara-atime you could have spent doing more interesting work! This article will look at implementing ptail, a PHP version of tail -f. We'll introduce the libevent PECL...

A (simple) PHPCR browser

A (simple) PHPCR browser
I resurrected another piece of software I did a few (too many) months ago in the "proof of concept" phase of Jackalope, a content repository browser. I wrote that back then, when we were experimenting with the jackrabbit-davex-client library and integrated that into PHP with Zend's Java Bridge. I did it with our homegrown PHP framework Okapi and YUI (2.6, IIRC). Here's a screeenshot: What you mainly can do is browse your repo and see all the nodes and properties and edit some of them. The great thing...

PHP North West Sessions: Robert Mortimer's "Let Your Toolchain Set You Free"

PHP North West Sessions: Robert Mortimer's "Let Your Toolchain Set You Free"
On the PHP North West site today there's a new video posted of a session at the PHP North West 2010 conference - Robert Mortimer's talk "Let your toolchain set you free".A quick romp though installing a full php development tool chain. Starting at A for Apache and ending at X for X-debug including U for unit testing and S for source control.You can watch the video and check out the source he uses in the talk. For more great sessions, check out the latest news on the PHPNW site.

StackExchange.com: What features would you like to have in PHP?

StackExchange.com: What features would you like to have in PHP?
Over the weekend Stanislav Malyshev asked a question on the StackExchange.com Programmers section as an open request to all of those working with PHP - what features would you like to have in PHP?Since it's the holiday season now and everybody's making wishes, I wonder - which language features you would wish PHP would have added? I am interested in some practical suggestions/wishes for the language.By practical he meant something that's possible, something that doesn't make PHP "not PHP", a change that...

Book Report: A Beginner's Guide to Zend Framework

Book Report: A Beginner's Guide to Zend Framework
I'm spending this holiday season trying to plow through some of the books that have been stacking up lately. There are just too many good books out there. Today's book is by Vikram Viswani, a name regular readers will recognize instantly. Click on in and let's take a look at his latest work.

Bence Eros' Blog: Life without static in PHP

Bence Eros' Blog: Life without static in PHP
In this new post to his blog Bence Eros shares some of the frustrations and issues he's had when dealing with static methods and properties in his applications and how, with a bit of re-engineering, you might be able to have "life without static".The problem with static members in PHP is the poor initialisation capabilities. The initial value of a static property can only be a literal or a named constant. [...] The same problem exists for non-static properties too, but the constructor is a dedicated...

Latest PHP Tweets