Symfony Social Stats

Recently my good friend Ryan Weaver of KNPLabs released a very interesting page of statistics for the Symfony framework. The page titled “Symfony Trends” shows pretty graphics of some of the non-traditional statistics. Most of the time when we look at framework stats they are things like page load time and pages per second, the usual things that we use to compare frameworks with each other. The page Ryan shared gives interesting stats like:

  • How many developers contribute to different projects
  • Where Symfony contributors live and work
  • Commit count to Symfony code per year

These are all social stats. They show a very important metric, size and involvement of the community. I used to have a talk called “5 Things I Wish They Had Told Me About PHP Before I Started.” The first point was select a framework and one of the points of comparison I gave was size of the community. The size and involvement of the community is a very important metric when considering a framework. Ryan has made it easy to consider the Symfony community.

Cheers!
=C=

Cal Evans
Nerd Herder to the World Wide Herd

Framework Porn

(No, not really porn. Totally SFW) 

Today Taylor Ottwell, creator of the Laravel framework, posted the Framework Code Complexity Comparison. For those not familiar with “Cyclomatic Complexity” here’s the Wikipedia page Cyclomatic Complexity. Briefly, “Cyclomatic Complexity is a software metric (measurement), used to indicate the complexity of a program.”

While Taylor’s post gives you the complete breakdown, here are the average method complexity scores for each framework tested. (Lower is better)

Laravel 1.62
Symfony 1.88
Slim 2.40
Zend 2.76
CakePHP 3.30

Taylor also compares Laravel’s Eloquent ORM to Doctrine. Since I think ORMs are evil, I won’t list those scores here. You can read them on the blog post though.

Cyclomatic Scores are not the end-all, be-all comparison of frameworks. They are however an interesting fact to consider when looking at a framework. Less complex framework code usually means less complex application code.

If you are interested in testing your own project’s Cyclomatic Complexity score, you will need PHP Mess Detector installed and up and running. Check out Leonid Mamchenkov’s recent post Quick and Easy Introduction into PHP Mess Detector (PHPMD)” as it’s the best instructions I’ve seen for getting PHPMD up and running quickly.

You can also use Sebastian Bergmann’s phploc to calculate Cyclomatic Complexity. (It supports PHP 7.1) To do that, use composer to either require it in your project or require it globally and then from your project’s root directory execute:

phploc ./ --exclude vendor/

Voice First

We’ve all heard of “Mobile First”. Most of us are savvy enough to know that that really means “API First” and then “Mobile is the first client.” Have you heard though, about “Voice First?”

Starting with Siri, but greatly accelerated by the Amazon Echo and now the Echo Dot, we are seeing the birth of a new paradigm for interacting with computers, “Voice.” Ok, so talking to your computer has been around for as long as Science Fiction has, and true enough, in the early 90’s, Dragon Speaking tried to make it happen, but failed. Now though, we have the computing power to not only capture voice, we can quickly send it up the line to computers than can process it, and determine what you said.

Given all of this, it’s probably time you figured out what voice programming is and how it fits in with your current applications. To that end, I’ve got two links for you.

“Alexa, When’s the Bus?” by the always brilliant Lorna Jane Mitchell. Lorna walks you through the basics of creating an “Alexa Skill.” Don’t know what that is? Don’t worry, she explains it. Just go read the post.

And then listen to:

#voiceFirst” by my good friend Phil (Winkle) Jackson. Phil’s podcast Future Commerce is excellent, but in this episode, he starts an interview with Brian Roemmele. They talk about how voice interaction will revolutionize everything.

Don’t miss this bus. Start playing with voice and natural language processing APIs sooner rather than later.

Private Packagist

Those of you using Composer in a corporate environment are going to love this. Nils Adermann and Jordi Boggiano, the creators of Compsoer and Packagist.org have just introduced “Private Packagist“.

We are extremely excited to announce our newest product addition to PHP dependency management: Private Packagist. A service designed to help businesses of any size use Composer more effectively and with greater confidence.

This is a hosted (not self-hosted) service that allows you to create private packages. Then you can install them – assuming you have the proper credentials – jsut like any other package hosted on Packagist. As an added bonus, since it caches all of the Open Source packages for you and their associated meta data, it is easy for you to view all of the open source your organization is using as well as the associated licenses. You even have the ability to restrict adding new open source packages until they have been reviewed.

This is a great addition to the Composer ecosystem and one that I am sure many companeis are either looking into already, or will be soon.

Learn more about Private Packagist

Welcome to PHP 7.1!

PHP 7

In case you are living under a rock, the latest version of PHP released last week. PHP developers around the world began rebuilding their development containers with it so they can run their tests. Now it’s your turn. If you haven’t already installed it, you can download it here http://php.net/downloads.php Grab it, get it running in your development environment, and run those unit tests. If all goes well, you can begin planning your staged deployment to production.

If you need a quick start guide to get you going, our good friend Mr Colin O’Dell has just the thing for you “Installing PHP 7.1”. It’ll get you up and going quickly on PHP 7.1.

What’s the big deal about PHP 7.1? I am so glad you asked. Here are the major new features released in PHP 7.1.

Now if you want a quick intro to several of these new features, check out our “RFCs of the Future” playlist on YouTube. In it, I talk about 4 of the new features.

Oh and while you are watching things download & compile, why not take the time to give a shoutout to all the core contributors, and a special thank you to Davey Shafik and Joe Watkins, the PHP 7.1 release managers.

Cheers!
=C=