News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Speed Up Your App's API Consumption
April 11, 2014 @ 10:51:23

The SitePoint PHP blog has some advice posted today from Jacek Barecki about how you can speed up your use of other APIs with a few performance increasing tips.

In the process of creating a PHP application you may come to a point when keeping it isolated from remote resources or services may become a barrier in its development. To move along with the project you may employ different API services to fetch remote data, connect with user accounts on other websites or transform resources shared by your application. [...] But using APIs in an incorrect way can quickly lead to performance issues and lengthen the execution time of your script. If you're looking for a way to avoid it, consider implementing some of the solutions described in the article.

He recommends four things you can think about doing to help make the most effective use of these services:

  • Make multiple requests at a time
  • Separate API calls from the app main flow
  • Build a smart cache engine
  • Master the API documentation
0 comments voice your opinion now!
api performance recommendation tips usage

Link: http://www.sitepoint.com/speed-apps-api-consumption/

Erika Heidi:
Vagrant Usage Research
January 27, 2014 @ 10:15:07

If you've never heard of the powerful tool and you need automation around creating and configuring multiple virtual machines, you really should check it out. If you're curious as to how it's being used and what kind of things it's used for, check out this new post from Erika Heidi based on some research she recently did (and a survey she received some good feedback to).

From 11 to 14 of January, 720 Vagrant users from different sources (Twitter, IRC and the official Vagrant mailing list) answered a quick form I created to find out how people are using Vagrant. I'm currently in the process of writing a LeanPub book about this tool, and I was really curious especially about the provisioners usage.

She's put together the results in the form of an easy to read infographic with details about:

  • The most popular provisioners
  • The percentage of boxes running with OS
  • The percentage of languages on the boxes
  • The OS most Vagrant users use

...and finally the answer(s) to the question of "why vagrant?" but I'll leave it to you to read the post to find out that one.

0 comments voice your opinion now!
erika heidi vagrant usage research infographic survey

Link: http://www.erikaheidi.com/2014/01/24/vagrant-usage-research/

Kevin Schroeder:
(Basic) Configuring the Magento 2 Dependency Injection Container
December 16, 2013 @ 12:03:22

Kevin Schroeder continues his series of posts looking at using Magento 2 and creating customizations of the application. In this latest post he builds on the previous post about dependency injection and shows how to configure Magento's container.

The purpose of that post was to, perhaps, make you less apprehensive about using DI combined with the DIC in Magento 2. However, in this post I want to go a little deeper into the DIC, implemented via the MagentoObjectManagerObjectManager class, and talk about how to configure it. Configuration for the DIC is done in each module's etc/di.xml file or etc//di.xml. Because you can split DIC configuration based on the area this tells you that the /config/ naming stuff is over; which I applaud.

He focuses more specifically on two of the child nodes that can be defined - "type" and "preference" (you can also have "virtualType" as well). First up is "type" and he gives a simple example class in his "HelloWorld" example that just takes in a message and returns it when asked. He shows it in use and how to set up the "di.xml" configuration for the class, defining the "message" parameter in the configuration instead of in the object fetch (like the first example).

0 comments voice your opinion now!
magento2 dependency injection container configuration usage tutorial

Link: http://www.eschrade.com/page/basic-configuring-the-magento-2-dependency-injection-container/

Kevin Schroeder:
How much memory does Magento use?
December 10, 2013 @ 10:42:23

Kevin Schroeder was asked recently (as a part of a training class) about the amount of memory Magento actually uses during its execution. Magento is a widely-used e-commerce platform built in PHP.

Now, I know what you're supposed to set it at, but I've never measured actual usage. So I gave some bullcrap answer about how it really depends on a bunch of things and that I really shouldn't give a precise answer. But the individual persisted and I was forced to put my tail between my legs and admit that I didn't know. So I promised that I would take a look and here are my results.

He briefly mentions how he tested the memory usage of the code overall by adding an event to several spots in the application and using memory_get_usage. Using the sample Magento data he worked his way through the site and tracked the events/memory usage on the various page of the site including:

  • Main category page
  • Category page with images
  • Simple product page
  • Add to Cart

Each of these has a graph showing the memory usage at each stage. Additionally, he's graphed them all together to compare the overall memory consumption.He finishes off the post with a few summary items and conclusions from his results.

0 comments voice your opinion now!
magento memory usage consumption graph

Link: http://www.eschrade.com/page/how-much-memory-does-magento-use/

Reddit.com:
Why do you use frameworks?
November 08, 2013 @ 12:38:09

On Reddit.com there's a recent post that asks the community as a whole why they use frameworks in their applications...and if "everyone" uses them or not.

I've been programming php for about 1.5 years. I've heard lots about different frameworks and now I've been set a task by a potential employer to redesign some of my site using silex (http://silex.sensiolabs.org/). I've never used a framework before and I guess my question is why do you? Does EVERYONE use them or is it an "us vs them" kind of thing?

Comments to the post point out several different ideas around framework and their usage such as:

  • A framework doesn't have to be an MVC framework
  • There's nothing wrong with not using a framework
  • Frameworks as a toolbox
  • The increase in time-to-market speed they provide
  • Consistency when other developers work with the code
0 comments voice your opinion now!
framework community opinion usage

Link: http://www.reddit.com/r/PHP/comments/1q3gzg/why_do_you_use_frameworks/

Adam Culp:
PHP usage statistics
May 24, 2013 @ 11:41:16

Adam Culp has posted his own look at some of the PHP usage statistics that are out there and how they can be interpreted.

Every once in awhile I stumble across someone who is trying to find their way and decide what they will do in their career. As the organizer of a PHP user group I see many new developers passing through. Of course I always speak of how strong PHP is in the web markets, and encourage new web developers to pursue PHP as a tool in their box of goodies. Because as a web developer it would be a career limiting move to not have any knowledge of PHP. Here is why...

He shares a few different sources including w3tech's overall and PHP-specific information (PHP5 specific here) and the current results of the TIOBE index showing language popularity. For each he talks some about what the results mean (and don't mean) and how, if you're a "professional developer" you should, at the least, know PHP - the most dominant language in the web space.

0 comments voice your opinion now!
usage statistics language w3techs tiobe popularity

Link: http://www.geekyboy.com/archives/672

Thomas Buck:
Tom's PHP Commandments - Take heed
April 17, 2013 @ 12:23:20

Thomas Buck has put together what he calls "Tom's PHP Commandments" (nine of them) that developers should follow when developing applications with the language. Among his suggestions are things like:

  • ALWAYS do the simplest thing that will work
  • NEVER trust anything that comes from the user
  • NEVER use include for controlling logic
  • NEVER create a file of useful functions, even if it's called helpers.php

There's also been some discussion about this list over on Reddit - you can comment on it over there if you agree/disagree with some of his points.

0 comments voice your opinion now!
commandments language usage list

Link: http://biasedphp.com/php-commandments

Dayle Rees:
Composer primer
April 15, 2013 @ 12:55:09

For those that might have heard about the Composer package management system for PHP but haven't had the time to get into it, you should definitely check out this great primer from Dayle Rees.

Composer is something special in the world of PHP. It has changed the way we handle application dependencies, and quelled the tears of many PHP developers. You see, in the olden days, when you wanted to build an application that relied on third party dependencies you would have to install them with PEAR or PECL. These two dependency managers both have a very limited set of outdated dependencies and have been a thorn in the side of PHP developers for a long time. [...] Enter composer, king of the package managers.

He jumps right in and gets into the configuration (the composer.json file) and using it to describe the package. He shows how to set up "required" resources complete with version number information. There's a bit about setting up autoloading and classmaps too. He then moves on to getting the tool installed and using the composer.json definition to load in needed packages (and development ones if needed).

0 comments voice your opinion now!
composer package manager primer configuration usage

Link: http://daylerees.com/composer-primer

Daniel Cousineau:
Using Symfony Console From Scratch
April 05, 2013 @ 12:46:43

Daniel Cousineau has posted a guide to using the Symfony Console component as a part of your application. It introduces you to some of the basics of using the component and has plenty of sample code to get you started.

CLI applications are extremely useful for many, if not most web projects. The Symfony framework even goes so far as to include an extensible CLI console used for everything from running cache cleanup/warmup tasks, to user account management. Many CLI scripts for web projects consist of just a static .php file which works fine but grow unweildy over time. Thankfully, the aforementioned Symfony Console component is released as a decoupled standalone that can be installed and setup easily and provide us with structure and organization (and some powerful features).

He walks you through the installation of the component via Composer and includes the code to make a simple CLI script using it. He shows how to make new commands (like his "TestCommand") and how to attach it to the application. He talks about output and input handling with arguments and options. He also shows an integration with an existing application with a base command class that helps to set up and configure the command objects that inherit it.

0 comments voice your opinion now!
symfony console tutorial introduction install usage

Link: http://dcousineau.com/blog/2013/03/28/using-symfony-console-from-scratch/

W3 Techs:
PHP version 5.3 is now the most used version, just ahead of 5.2
March 22, 2013 @ 09:10:22

According to this new report on the W3 Techs site, the usage of PHP 5.2 has been passed up by the numbers for the usage of PHP 5.3 (finally).

PHP 5.3 has been released in June 2009, so it took a while to gain that level of popularity. End of support for PHP 5.2 has been declared in December 2010, but is was still the most popular version until now. Version 5.3 will enter the end-of-life cycle in March 2013. Version 5.4, used by only 3.0%, is now considered state-of-the-art.

The numbers have been consistently trending towards intersection with the usage of PHP 5.4 picking up, but no where near the 5.3 and 5.2 numbers. They also point out that PHP version adoption has a history of being slow. Contributing factors to this could be the overall impression of the language and how much "room for improvement" it seems to have.

It's not difficult to predict that PHP as a language will continue to dominate web development in the near future. What will be more exciting is to watch what new versions of PHP will look like.
0 comments voice your opinion now!
version adoption php53 php52 statistics usage



Community Events











Don't see your event here?
Let us know!


component hhvm introduction package composer application hack overview code language unittest podcast facebook install release performance security framework symfony2 opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework