blog’s amazing Rotating Header Image

Posts under ‘PHP’

A desktop application with Adobe AIR for scanning documents on Mac OS X

Even though we’re specialized in web development, we like new challenges.
One of our client asked if we could build a desktop application for sales agents. Agents need to scan images, also add several information using a form and submit the data when Internet connection is available. Even though it sounds easy, it can be a [...]

HipHop for PHP – the buzz summary you should really read

HipHop for PHP from Facebook hit the streets several days ago resulting in dozens of posts about the technology. Let’s see what the PHP community says:

Marco Tabini enlists the HipHop features and encourages using it
the echolibre blog talks about possible security/buffer overflow implications, and mentions similar available solutions
Ilia Alshanetsky provides an excellent and thorough overview: [...]

Five Tips To Make Good Object-Oriented Code Better – Brandon Savage

Brandon Savage has some great tips regarding coding OOP:

“Use Objects. Lots of Objects”
“Use Interfaces To Make APIs Predictable”
Use Dependency Injection”
“Composition Over Inheritance”
“Create Loosely Coupled Classes”

As you can see it’s absolutely not rocket science nor these are new invetions: these rules simply help to avoid typical OOP pitfalls and keep your applications well structured.

“Micro” Optimizations That Matter

Brandon Savage compiled a good summary of application performance tips. Definitely not the difference between using single and double quotes in your code: these are easy to implement and effective (=”micro”) methods to improve responsiveness of your code, like:

Eliminate Any Sort Of Logged Errors
Enable Output Buffering For Everything
Make Use Of A Content-Delivery Network
Determine What Data [...]

Watch out for your CRON jobs

Running CRON jobs is not an easy task if you want to do it perfectly: fortunately we’re doing it similarly as it’s recommended by the Percona guys:
- prevent running multiple copies using file locks
- watch for errors
- store historical run times (use logging)
Further details and code sample in Watch out for your CRON jobs at [...]

PHP memory_limit calculator for image resizing

Do you have some image resizing PHP code out in the wild? You’d better prepare yourself: your code may break anytime if you don’t pay attention to the memory limit settings of PHP. (God, it could already did!)
Take care of the plenty megapixel images and avoid trouble now!
How many memory do you really need? Find [...]

Smarty support in NetBeans || die()?

It seems that Sun is serious about providing PHP support in the NetBeans, a 10-years-old Java IDE.
However, besides many of the cool features already included there’s a showstopping shortage for many PHP devheads: NetBeans does not support the all-time favourite Smarty template library, which provides the foundations for zillions of web sites out in the [...]