Tutorials and Talks Functional Programming in PHP

The new hype in programming is all about functional programming paradigms. Functional languages are used more and more in greater and better applications. Scala, Haskel, etc. are thriving and other, more conservative languages like Java started to adopt some of the functional programming paradigms. However, what only a few people know is that PHP is quite versatile when it comes to functional programming. All the main functional programming concepts can be expressed in PHP. So, if you are new to functional programming, be prepared to have your mind blown, and if you are already familiar with functional programming, be prepared to have great fun with this tutorial.



DTrace PHP Using Oracle Linux 'playground' Pre-Built Packages

We've released DTrace-enabled PHP 5.5.4 RPMs to make testing DTrace on Oracle Linux easier. As a result, the manual PHP install steps listed in Using PHP DTrace on Oracle Linux can be skipped. There are updated Betas of the "UEK3" Linux Kernel 3.8.13-16 and the dtrace-utils tools available too. With these, you now can DTrace PHP applications under Apache or with php-fpm, as well as command line PHP scripts.



Profiling PHP Applications with XHGui

On the Inviqa techPortal today there's a new post from Lorna Mitchell showing you how to profile your PHP applications with the help of the XHGui tool (and XHProf extension). She walks you through the full installation, including other things the tool depends on (like MongoDB and the XHProf extension). She shows how to run the installer, configure a virtual host correctly (using mod_rewrite) and some example screenshots of what the resulting statistics report. This includes things like "wall time" and parts of the application that may be "memory hogs". There's also an example of a handy feature called the "Callgraph" that shows you a visual representation of the performance of the execution of the app.



Symfony2 Components Overview: HttpKernel

In the second post of the Symfony2 components series we are going to talk about the HttpKernel component. If the HttpFoundation component provides the building blocks of the HTTP protocol, the HttpKernel component makes use of them to define an abstract process for converting a Request into a Response.



Creating a Subscription-Based Website with Laravel and Recurly, Part 2

In the first part of this series we created the bare bones of a subscription-based website using Laravel. We also set the site up with roles and granted a pending role to new users. We’re now at the point where we can perform basic registration, login and logout. In this second part, we’ll integrate Recurly to set up our paid membership plans.



Branching Out With Twig

Twig is a template engine for PHP that has all the major features you may need in your projects. It was created by Fabien Potencier, the developer behind the Symfony framework and it's released under the new BSD license, so it's completely free to use. That considered, you should not be surprised by the fact that Twig is the Symfony framework's template engine of choice. Its requirements are so basic that you may think it can run everywhere. In fact, Twig only needs a version of PHP greater than or equal to 5.2.4. If you've ever used Smarty, you'll see a lot of similarities and will be able to start using it very quickly.



Saving a HUGE Bandwidth Cost in WordPress by Automatically Serving Media Contents From copy.com

The title almost says it all. Our mission is to save the bandwidth cost (and ensure better deliverability) by leveraging the power of headless installation of copy.com client in Linux, then integrating it into WordPress. The integration must work seamlessly so that the viewers don’t see a difference and at the same time you don’t have to put any extra effort. Beside saving bandwidth, this also reduces extra load from your web server. There’s another surprise which I will tell you later. For now, keep reading :)



Verbs in Class Names

Mathias Verraes has an interesting post on his site suggesting that using verbs in class names can make for easier to understand and easier to read code - more "natural language." He suggests that class names, in some cases, could be used as "messages" to the developers using them in the OOP. He includes some suggestions (based on the suggestion of nouns from another post) that use verb-names to convey what they're doing. He also talks about three specific cases - specifications, exceptions and interfaces - and includes samples of each using this idea of verb-based class names.



Concurrent HTTP Requests in PHP Using pecl-http

Mohammad Emran Hasan has posted a quick example of using the pecl_http extension to make concurrent HTTP requests. His code shows three example connections to a made up URL on three different endpoints. With the HttpRequestPool functionality, all three can be requested at once and tracked to extract the response body.



Creating a Twitter API Proxy in PHP

Thanks to the new Twitter API v1.1, it is now impossible to query the API using pure JavaScript code! So, in this quick tutorial you will see how to use PHP to do Application-only authentication and forward the API result of the required resource to JavaScript, plus caching API results to prevent rate-limit errors.



Introduction to Redbean

When it comes to RAD and prototyping, there are lots of tools available to help get projects up-and-running quickly. From quick-starts to micro-frameworks, from build tools such as Composer to one-click installers and of course ORMs – there are all sorts of ways to speed up development time. I'm going to look at Redbean, an ORM with a difference, which is ideal for prototyping. The new hype in programming is all about functional programming paradigms. Functional languages are used more and more in greater and better applications. Scala, Haskel, etc. are thriving and other, more conservative languages like Java started to adopt some of the functional programming paradigms. However, what only a few people know is that PHP is quite versatile when it comes to functional programming. All the main functional programming concepts can be expressed in PHP. So, if you are new to functional programming, be prepared to have your mind blown, and if you are already familiar with functional programming, be prepared to have great fun with this tutorial.We've released DTrace-enabled PHP 5.5.4 RPMs to make testing DTrace on Oracle Linux easier. As a result, the manual PHP install steps listed in Using PHP DTrace on Oracle Linux can be skipped. There are updated Betas of the "UEK3" Linux Kernel 3.8.13-16 and the dtrace-utils tools available too. With these, you now can DTrace PHP applications under Apache or with php-fpm, as well as command line PHP scripts.On the Inviqa techPortal today there's a new post from Lorna Mitchell showing you how to profile your PHP applications with the help of the XHGui tool (and XHProf extension). She walks you through the full installation, including other things the tool depends on (like MongoDB and the XHProf extension). She shows how to run the installer, configure a virtual host correctly (using mod_rewrite) and some example screenshots of what the resulting statistics report. This includes things like "wall time" and parts of the application that may be "memory hogs". There's also an example of a handy feature called the "Callgraph" that shows you a visual representation of the performance of the execution of the app.In the second post of the Symfony2 components series we are going to talk about the HttpKernel component. If the HttpFoundation component provides the building blocks of the HTTP protocol, the HttpKernel component makes use of them to define an abstract process for converting a Request into a Response.In the first part of this series we created the bare bones of a subscription-based website using Laravel. We also set the site up with roles and granted a pending role to new users. We’re now at the point where we can perform basic registration, login and logout. In this second part, we’ll integrate Recurly to set up our paid membership plans.Twig is a template engine for PHP that has all the major features you may need in your projects. It was created by Fabien Potencier, the developer behind the Symfony framework and it's released under the new BSD license, so it's completely free to use. That considered, you should not be surprised by the fact that Twig is the Symfony framework's template engine of choice. Its requirements are so basic that you may think it can run everywhere. In fact, Twig only needs a version of PHP greater than or equal to 5.2.4. If you've ever used Smarty, you'll see a lot of similarities and will be able to start using it very quickly.The title almost says it all. Our mission is to save the bandwidth cost (and ensure better deliverability) by leveraging the power of headless installation of copy.com client in Linux, then integrating it into WordPress. The integration must work seamlessly so that the viewers don’t see a difference and at the same time you don’t have to put any extra effort. Beside saving bandwidth, this also reduces extra load from your web server. There’s another surprise which I will tell you later. For now, keep reading :)Mathias Verraes has an interesting post on his site suggesting that using verbs in class names can make for easier to understand and easier to read code - more "natural language." He suggests that class names, in some cases, could be used as "messages" to the developers using them in the OOP. He includes some suggestions (based on the suggestion of nouns from another post) that use verb-names to convey what they're doing. He also talks about three specific cases - specifications, exceptions and interfaces - and includes samples of each using this idea of verb-based class names.Mohammad Emran Hasan has posted a quick example of using the pecl_http extension to make concurrent HTTP requests. His code shows three example connections to a made up URL on three different endpoints. With the HttpRequestPool functionality, all three can be requested at once and tracked to extract the response body.Thanks to the new Twitter API v1.1, it is now impossible to query the API using pure JavaScript code! So, in this quick tutorial you will see how to use PHP to do Application-only authentication and forward the API result of the required resource to JavaScript, plus caching API results to prevent rate-limit errors.When it comes to RAD and prototyping, there are lots of tools available to help get projects up-and-running quickly. From quick-starts to micro-frameworks, from build tools such as Composer to one-click installers and of course ORMs – there are all sorts of ways to speed up development time. I'm going to look at Redbean, an ORM with a difference, which is ideal for prototyping.