Development Blog With Code Updates : Developercast.com

December 31, 2010

Mike Lively’s Blog: Pear Channel set up for Phake

Filed under: Development — @ 2:30 pm

Mike Lively has a new post about a PEAR channel he’s set up for his Phake mocking tool on his digitalsandwich.com domain.

For those that may not have caught my first post on the subject, Phake is a mock framework that I announced a couple of days ago in Introducing Phake Mocking Framework. It was recommended in the comments that I get it on a pear channel somewhere, which is something I have wanted to do but hadn’t had a reason to do until this week. Well, now there is an official Digital Sandwich Pear Channel that is hosting Phake.

Discover the channel with the PEAR installer and run the install with the path provided. He notes that the release is alpha because of the lack of documentation but, despite this, the API is stable. Also, you’ll need to be using PHP 5.2+ to use the tool.

PHPBuilder.com: Profiling PHP Code with Xdebug and KCacheGrind

Filed under: Development — @ 1:09 pm

New on PHPBuilder.com today there’s a tutorial on profiling your applications with the help of XDebug and the KCacheGrind tools.

[Eventually you'll want to seek out and resolve any bottlenecks.] Which brings us to the question of how to even go about determining which parts of an application could conceivably be optimized. One common approach involves using a profiler such as Xdebug, which can analyze your code and produce performance reports. These reports can then be reviewed within a profiling visualization tool such as KCacheGrind. In this article I’ll show you how to use Xdebug and KCacheGrind to begin profiling and analyzing your PHP-driven Web applications.

He starts you from the beginning – installing both XDebug and KCacheGrind (unix-based, if you’re on Windows try WinCacheGrind). He gives an example of a profile report based on a Zend Framework application and an example call graph output (as well as how some caching can help things quite a bit).

Leniel Macaferi’s Blog: Installing PHP on Mac OS X Snow Leopard 10.6.5

Filed under: Development — @ 11:57 am

On his blog today Leniel Macaferi has a new post showing how to install PHP on OSX 10.6.5, really enabling the PHP that’s already installed.

I hit a pretty good tutorial to enable PHP on Mac at About.com written by Angela Bradley that gets to the point: How to Install PHP on a Mac. Along the way I had to solve only one minor thing described in the caveat section at the end of this post. You see that the title of this post has the word installing (well I thought I had to install it ‘” that was my first reaction), but in fact it could be the word enabling because PHP is an integral part of Mac OS X Snow Leopard and we just need to enable it as you’ll see soon.

He talks about enabling the web server, enabling PHP and testing the installation with a phpinfo. There’s screenshots included so you can be sure you’re in the right places.

Site News: Popular Posts for the Week of 12.31.2010

Filed under: Development — @ 8:04 am

Popular posts from PHPDeveloper.org for the past week:

December 30, 2010

Sjoerd Massen’s Blog: Passing the PHP 5.3 ZCE exam

Filed under: Development — @ 3:54 pm

Another community member has passed the PHP 5.3 Zend Certified Engineer exam (Sjoerd Massen) and has blogged about his experiences both before and during the exam.

Today I passed the exam to become a PHP 5.3 ZCE. Like everyone else I had to sign the non-disclosure contract so I can’t go into detail about the questions that were asked, I can however tell my impressions of the exam and how prepared for it.

His preparations included going over some of the older sample tests and some additional study time on streams. He also mentions the PhpRiot iPhone/iPad application that helped him prepare as well as a few of the training courses he bought for certain topics. His overall impression of the exam was that it was more difficult, with plenty of open questions made for you to fill in an answer.

Zend Developer Zone: Using the Stack Exchange API with PHP (part 1)

Filed under: Development — @ 2:04 pm

On the Zend Developer Zone today the first part of a series from Vikram Vaswani has been posted. This new set of articles will look at how to use the Stack Exchange API from your PHP applications.

The thing about Stack Overflow, though, is that it has a geeky secret of its own. Like many Web 2.0 applications, it exposes its data to the public via the Stack Exchange Web service API, making it possible to develop customized applications that run on top of the base service. This API allows access to a number of important functions, including searching for questions, retrieving answers and comments, accessing user profiles, and working with tags and badges. It’s also pretty easy to integrate this API into a PHP application – and this two-part article will show you how!

In part one he introduces you to some of the conventions and tips you’ll need to know when reading through the article. He shows how to get and parse a sample response (with json_decode). He also uses the proposed StackPHP PEAR package to make requests for general question information, specific details, tags, comments and search results.

Shameer’s Blog: PHP 5.3 : Practical look into Lambda functions and closures

Filed under: Development — @ 12:11 pm

For those out there still coming to grips with some of what PHP 5.3 has to offer, I’d suggest checking out this new article from Shameer about using lambdas and closures along with some examples putting them into action.

PHP 5.3 packaged the power of functional programming by adding support for lambda functions and closures. You will be familiar with them in javascript. In this article we will have a look into these features and its usages.

He starts with explanations of what they are with simple code examples showing their use – a lambda assigned to a variable and closures with the “use” keyword. He shows how they can be used in application prototyping, making handy callback functions and includes a practical example of finding the factorial of a number using a lambda.

Reddit.com: What are the most popular (or best) methods to translate a PHP-built website?

Filed under: Development — @ 11:42 am

In this new post from Reddit.com a question is asked about website translations and the opinions on best practices for it.

I’m just curious what the best practices are for translating your website into another language, to present foreign readers with text in their home lingua — well, particularly if there are PHP-specific methods to do so. I’ve stumbled across the pages for GNU gettext and that seems interesting, but I’m curious what people think of it.

Suggestions include manual translation via a human, use a text substitution method two swap out content versions based on language, using language files (and some opinions from others on which of these approaches might work best).

Kenny Katzgrau’s Blog: Enable Site-Wide Profiling With CodeIgniter

Filed under: Development — @ 10:07 am

On his blog today Kenny Katzgrau talks about a handy feature of the CodeIgniter framework – profiling – and how you can implement it site-wide rather than just on a controller by controller basis.

In your controller before you load a view, CodeIgniter will give you information regarding how fast the page loaded, how many SQL queries executed, the content of each query, and the running time of each query. This is incredibly useful when you are trying to debug your application, or simply see how quickly things are loading. There’s only one problem: To enable profiling, that line of code above must be present. What if you want to profile several pages, or even your whole web application?

He turned to another built-in feature of the framework, the controller hooks it allows, to set up a simple post-controller execution that gets a new CodeIgniter instance and enables the profiling configuration item. This is a much better option than having to put the line in each and every controller and method he might want profiled.

Wil Sinclair’s Blog: Process Patterns

Filed under: Development — @ 9:34 am

On the Zend Developer Zone today there’s a new post mentioning something from Wil Sinclair about something he calls “process patterns” in software development.

From Wil’s post:

I need a word for several engineers working on the same project that isn’t ‘team’. Why? Because most engineers working on the same project aren’t working together as a team. This is why I believe in process patterns. Note: I didn’t say that I believe in processes, because I don’t. [...] You name a methodology, and I don’t believe in it. But I do believe that there are some process patterns that can dramatically improve team productivity.

These patterns are things that are common to several of the processes common to software development – like backlogs, test driven development, etc – but don’t have to be considered as something that only comes with XP or Scrum and shouldn’t be used outside them. There’s even a whole other site dedicated to defining these patterns and where the ideas came from. Oh, and don’t forget to add Wil‘s new word to your vocabulary – “hackle”, two or more engineers working together on one project (not necessarily as a team).

Next Page »

Powered by WordPress