Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Grudzień, 2010

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

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

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.

Source: http://www.phpdeveloper.org/news/15660

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

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

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

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.

Source: http://www.phpdeveloper.org/news/15659

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

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

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

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.

Source: http://www.phpdeveloper.org/news/15658

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

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

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

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).

Source: http://www.phpdeveloper.org/news/15657

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

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

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

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.

Source: http://www.phpdeveloper.org/news/15656

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Wil Sinclair’s Blog: Process Patterns

Wil Sinclair’s Blog: Process Patterns

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).

Source: http://www.phpdeveloper.org/news/15655

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Blast from the Past – One Year Ago in PHP

Site News: Blast from the Past – One Year Ago in PHPHere’s what was popular in the PHP community one year ago today:

Source: http://www.phpdeveloper.org/news/15654

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

php|architect Blog: The NoSQL Hype Curve is Bending

php|architect Blog: The NoSQL Hype Curve is Bending

On the php|architect blog today Bill Karwin has shared his thoughts on NoSQL and how, despite the popularity of it during 2010, the hype curve is bending and companies are realizing it’s less of the “silver bullet” they expected.

The technology hype of 2010 was clearly NoSQL, which proved to be more of a brand-name than a technical term. Today in his tech blog, Bozho set out his view that NoSQL is probably not a good choice for startups that don’t know yet where their database and application bottlenecks are.

Bill agrees, noting that the adoption of NoSQL technologies caused some major meltdowns when all things weren’t properly considered. He points out that “a little knowledge is dangerous – the more little, the more dangerous” and developers should seriously consider the impact a NoSQL environment should have before jumping in head first.

Source: http://www.phpdeveloper.org/news/15653

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Reddit.com: Less obvious PHP tricks?

Reddit.com: Less obvious PHP tricks?

On Reddit.com there’s a recent post with a question about some of the lesser known PHP tricks that other developers might have picked up out there. The post has pulled in quite a few suggestions including:

  • Using predefined interfaces
  • The streams API
  • Defining constant defaults
  • The speed differences in reading parts of arrays
  • Boolean attribution

There’s also a full discussion on closures/lambdas that no “features” post on PHP would be complete without. Have some tips to share? Add yours to the post too!

Source: http://www.phpdeveloper.org/news/15652

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

DZone.com: Reuse your closures with functors

DZone.com: Reuse your closures with functors

On DZone.com there’s a new tutorial from Giorgio Sironi about reusing closures with the help of functors (a special kind of object instancing done in PHP with the help of __invoke).

I like PHP closures and their superset, anomyous functions, as they implement the Command pattern very well when used correctly. However I feel that sometimes they are: difficult to reuse and difficult to force contracts on. [...] What if we wanted instead, a closure which we can instance even more than one time (maybe with different variables), and that we could type hint?

He shows how to make this possible with a functor created using the __invoke magic method of PHP to handle the request to an object like a function. He includes some sample code to show it in action – a basic callback (SquareCallback) and how it compares to calling a normal closure. It also shows something a bit more technical, an “AdderCallback” class that can be defined as a type hint on a function.

Source: http://www.phpdeveloper.org/news/15651

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>