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

Laravel News:
How to Create A Most Popular List with Laravel and Google Analytics
Sep 02, 2016 @ 14:40:16

On the Laravel News site there's a new post showing you how to make use of the Google Analytics API in your Laravel application to find trending content in your site (most accessed pages).

Here on Laravel News, I wanted to generate a list of the most popular posts for the past seven days and display the results from most popular to least popular. To solve this problem I thought of two solutions. The first is to build my own tracking system so I could keep a count and then use it for ordering. However, that could generate a huge amount of data and it seemed like a solution that an analytics tracking service could handle.

As I was fumbling through the Google Analytics API I found a Laravel Analytics package by Spatie.be that allows you to easily retrieve data from your Google Analytics account and it seemed like the best way to solve this problem. Let’s look at how I used it to generate a list of popular posts here on Laravel News.

They then walk you through the installation (via Composer) and configuration of the library. This includes linking to more information about setting up the credentials for the connection. They then show how to use it to fetch the most popular pages and what the response looks like as a collection. Finally they show you how to create a wrapper class you can easily reuse anywhere in your application to fetch and display this "trending" information". The post ends showing you how to create a "View Composer" that only fires when the view is being rendered, not on every request.

tagged: laravel googleanalytics trending popular page results tutorial package

Link: https://laravel-news.com/2016/09/most-popular-list-laravel-google-analytics/

Jack Skinner:
PHP Version Roundup - PHP Install Statistics for 2015
Dec 09, 2015 @ 16:43:49

Jack Skinner has posted his latest "roundup" results of the most popularly installed versions of PHP across the web. In the post he looks through the percentage of installations for each version and how many are "secure" (currently supported and in a popular/stable linux distribution).

Last year, Anthony Ferrara posted an excellent round up of PHP versions in the wild, specifically focusing on the volume of un-patched versions running production websites. Even as an estimate it was an eyeopening moment for many people.

Using data from w3techs and, while the raw data isn't posted, what's there is good enough for an estimation. He talks some about the definition of "secure" in the context of the results and lists the current versions of several popular linux distributions and the versions they support. His results are then grouped by minor release and created some graphs for the results to help with visualization. The remainder of the post shares these results for PHP versions 5.6, 5.5, 5.4, 5.3 and yes even 5.2/5.1. The results end with overall numbers/graphs of the most widely installed versions and what percentage of those are considered "secure". With PHP 7 just released the results are a little discouraging but it is good to see things trending the right way since last year's results.

tagged: version roundup install popular language secure linux supported w3techs

Link: https://developerjack.com/blog/2015/12/09/php-version-roundup/

Kinsta Blog:
The Definitive PHP 7.0 & HHVM Benchmark
Dec 09, 2015 @ 15:07:44

On the Kinsta blog Mark Gavalda has shared their latest PHP 7 versus HHVM benchmarks now that the first official stable release of PHP 7 has been unleashed for public consumption. They opted for testing with a large variety of tools and software rather than simple benchmarking scripts to give a more "real world" look at the difference between the two.

To see how much of an improvement we can expect from this new PHP interpreter we put the public release version of PHP 7.0 to test and compared a couple of popular software suites’ performance using PHP 5.6.16, PHP 7.0 and HHVM 3.10.1 on a bare metal server (so virtualization doesn’t interfere with the results). Tested software includes WordPress 4.3.1, Drupal 8, Magento 2.0 CE, OctoberCMS build 309, PyroCMS v3 beta2, and Flarum v0.1.0-beta.4.

The basic tl;dr of the post is that HHVM still performs better for all of the software tested but PHP 7 is not too far off on some of them. They share the specifications of the machine (bare metal) they used for testing and get into the results for each of the seven pieces of software tested. Their results are in transactions per second and both graphed and numeric results are shown. Unfortunately, though, the Flarum software had to be kept on a "pending" list as it doesn't run on either PHP 7 or HHVM properly.

tagged: hhvm php7 benchmark popular software wordpress drupal magento octobercms pyrocms flarum

Link: https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/

SitePoint PHP Blog:
Popular Users per Language and Region with Silex and Github
Jun 18, 2015 @ 16:53:49

The SitePoint PHP blog has a new tutorial posted showing you how to use the data the GitHub API provides to find popular users, per language, in an area. His sample example is a simple Silex framework based application and uses the KNPLabs GitHub library to interface with the API.

The data you can get through the GitHub API V3 is mostly what you can see on the GitHub web interface, except you can use the data in your application to come to interesting conclusions. That is what we are going to do in this article. [...] Now, what if there was a web service in which we could specify a location and a language (e.g. PHP) and get a sorted list of contributors to open-source? [...] In our web service, we will have one endpoint (i.e. action, URL) that shows the most popular ten creators. The most popular creators are the people in a location who have the largest number of stargazers. For this, we will retrieve each person’s repositories and add up the number of times each one has been starred.

He steps you through getting a Homestead Improved VM up and running (via Vagrant) and a basic Silex application up and running inside. He then pulls in the KNPLabs GitHub library via Composer and sets up a new client in the default route (and grabs the public user data for a user). He then shows how to change it up and use the Search API and some special queries to locate users by a given location. He adds another class, a "StarGazerCalculator", that's given the users returned, filters out the forks in the list and calculates the total "stargazer" count for the user. He does the same with the "top creators" list and sets it up as a service provider, fetches the data and returns the results as a JSON document.

tagged: popular user language region github api silex tutorial

Link: http://www.sitepoint.com/popular-users-per-language-region-silex-github/

Peter Aba:
phpmetrics of popular php projects
Sep 15, 2014 @ 15:11:01

Peter Aba has put together a a set of visualizations around the popularity of various PHP projects using the phpmetrics tool. He decided to run it against several projects he knows of and share the results.

I came across a new tool called phpmetrics. It can be used for, what a surprise, calculating and displaying metrics for php. I fell in love with this cute little tool in an instance and decided to run it on some php projects that I consider important. I’m aware of the fact that the list is currently far from complete, but it’s probably still worth a look. I especially love the “maintenability” (sic!) reports, I find those big red spots just as disgusting as I find ugly code the same.

He's broken it up into a few different sections with lots of different projects under each:

  • Frameworks
  • CMS
  • E-commerce
  • Development tools

There's also an "Other" (and "Backfire") category that contains the results for the results of phpmetrics itself. He also includes a few issues he ran across during the processing of the metrics, some with the phpmetrics tool itself and some with the libraries themselves.

tagged: metrics popular projects phpmetrics results visualization

Link: https://peteraba.com/blog/phpmetrics-of-popular-projects/

SitePoint PHP Blog:
Best PHP IDE in 2014 - Survey Results
Mar 24, 2014 @ 18:15:42

The results are in and the SitePoint PHP blog has officially announced the most popular PHP IDE based on the answers to their survey. The overall winner is PHPStorm (from JetBrains) but several others weigh in on their editor of choice too.

This article will focus on the IDE results alone. We’ll analyze the PHP community in general in a future piece after the data has been cleaned to a greater extent. Please note that these are preliminary results, and not much detailed filtering has taken place yet. The data will still be processed and additionally verified. The ballpark is in the correct ranges, but cannot be deemed precise (might be off by a couple dozen in every category – not enough to influence the end result), hence only percentage values will be displayed in the charts. For exact figures, see the raw data.

The results show PHPStorm coming in at first place in both the business and personal votes with Sublime Text and Netbeans pulling in behind for 2nd and 3rd. The post also shares comments from some of the votes, people adding some of their own thoughts and reasons for their choice of editor/IDE. Other tools that were mentioned include Vi, TextMate, Eclipse/PDT and Dreamweaver.

tagged: survey results popular ide editor tool phpstorm sublimetext netbeans

Link: http://www.sitepoint.com/best-php-ide-2014-survey-results/

Phil Sturgeon:
The "Framework" is Dead, Long live the Framework
Jan 14, 2014 @ 17:16:22

Phil Sturgeon has stirred the pot once more with a new post to his site suggesting that the "framework" is dead, but the framework still lives on (the difference being one is a structured whole, the other is made up of packages).

There have been a few posts over the last few months saying that the age of the framework is dead, and that Composer is the true savior, and other similar messages. This is half-true, but lots of people have been using the word "framework" differently over the years and I wanted to really work out a good definition of what a "framework" was in relation to PHP development, and in relation to these discussions.

His suggestions, sparked by a conversation on Twitter, suggest that frameworks should only provide the architecture of the application, a "set of lines to color inside". He goes back in time and looks at PHP frameworks past (like CodeIgniter and Kohana) and compares them to some of the popular ones of today like Zend Framework 2, FuelPHP, Laravel and Aura. He also talks about the good and bad of traditional frameworks, how they can be harmful to beginners in PHP and how much more difficult it's getting to be to say "That framework is popular" because of the changing definitions.

tagged: framework opinion component popular architecture

Link: http://philsturgeon.co.uk/blog/2014/01/the-framework-is-dead-long-live-the-framework

9Lessons.info:
Login with Instagram OAuth using PHP
May 23, 2012 @ 13:46:46

On the 9Lessons blog there's a recent tutorial showing you how to log into Instagram via OAuth with the help of their Instagram class.

The very quick registration gives you many users to your web project, we already published login with Facebook, Twitter and Google Plus now time to think about very popular photo sharing portal Instagram. This post explains you how to login with instagram Oauth API and importing user data. Create an instagram account and take a quick look at this demo thanks!

The tutorial walks you through the process of setting up an application in the Instagram service, configuring the scripts with the API key/secret and callback as well as the code for a simple login page. They've also included code to grab the user's information and "popular media" from the web service and pull that information into a local MySQL database.

tagged: instagram oauth class tutorial popular media mysql

Link:

Dzone.com:
Open source PHP projects of 2011
Dec 29, 2011 @ 14:21:07

On Dzone.com today Giorgio Sironi has posted what he considers to be some of the most popular Open Source PHP projects of 2011 including Symfony2, Doctrine and HipHop.

This non-scientific analysis of the popular and exciting PHP projects starts from researches on active projects on SourceForge and GitHub; the latter is where most of the collaboration and involvement of PHP developers is today. I've also crowdsourced the question on Twitter to catch projects I wasn't aware of, and I hope to do the same with you.

Other projects included in his list are:

  • Symfony2 Components
  • Moodle
  • Composer and Packagist
  • Drupal, Joomla, Wordpress

Have a project you think he missed? Let him know!

tagged: opensource project year popular review

Link:

DZone.com:
Social Comparison of PHP Frameworks
Dec 23, 2011 @ 15:56:32

In this post to DZone.com today, John Esposito points out a site that compares popular PHP frameworks socially, a collaborative resource to keep track of things like framework features, popularity and their last update.

There's this wiki-ish comparison of PHP frameworks from socialcompare.com -- presently incomplete, but already containing quite a few frameworks and interesting details of each. You can add comparison criteria (rows; folksonomically) or update existing criteria -- which currently include, among other details, ORM specifics, cache storage, template system, and testing libraries.

Frameworks currently covered include Zend Framework, CakePHP, Fat-Free, Symfony, Yii and Kohana. As it stands now, Yii is the most popular framework with 8 votes and Symfony and Zend Framework are tied for second with 5 points each.

tagged: socially compare framework wiki vote popular

Link:


Trending Topics: