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

Toptal.com:
Eight Rules for Effective Software Production
May 18, 2017 @ 12:33:27

On the Toptal.com site there's a new post from author Timofey Nevolin sharing hist list of Eight Rules for Effective Software Production to follow to help keep your development process flowing well based on some of his own experience.

During the course of my career, I’ve participated in multiple real life software projects and observed how things are done on all levels: decision making, practices adoption, team building, recruiting, skill distribution, etc. Obviously, different approaches yielded different results. Being an improvement-oriented type of person, I noticed and collected the most effective practices and best practical tricks to help me up in my work.

Learning from observation is a hard and lengthy way to do it. I would be extremely happy to pick this knowledge earlier from books instead. Unfortunately, I found none on the topic. So I decided to share my experience with other seekers of this kind of knowledge. Hopefully, it’ll save them few years of personal research.

His list of eight, targeted mainly at those needing a productivity boost, includes rules such as:

  • Understand the IT Mentality
  • Stop Wasting Time on Formal Time Estimation
  • Understand the Cost of Switching Tasks and Juggling Priorities
  • Use Architecture Reviews as a Way to Improve System Design

He finishes with one of the more important rules to follow: valuing those on the team and respecting them for what they bring to the table.

tagged: effective software production rules opinion development

Link: https://www.toptal.com/it/eight-rules-for-software-production

CloudWays Blog:
Turbocharge Yii Development Through These Best Practices
May 04, 2017 @ 13:39:54

On the CloudWays blog author Saquib Rizwan has written up a post sharing some best practices with Yii2 applications, the third part in a series, to help you "turbocharge" your development using included features.

Yii is a popular PHP development framework that has managed to hold its own in the fierce world of PHP framework. In effect, Yii is still a popular development framework for all categories of PHP projects.

[...] Whichever PHP framework you opt for (I personally prefer Yii2), the success of the project depends entirely upon the quality of the code. In all instances, following the Yii development best practices ensures that your code is of the highest quality and that the overall project confirms to the quality specifications. The following Yii best practices are the result of the experiences of the Yii developers from all over the world.

Included in his list of recommendations are practices like:

  • Follow the Code Standards
  • Optimized Overheads for Yii
  • (Avoiding) Cache Heavy Processes
  • Profile and Test Applications

These and the other items in the list include a brief summary of the practice and, on some, links to other resources for more information or tools to help.

tagged: yii2 framework bestpractices improve development tutorial

Link: https://www.cloudways.com/blog/yii-best-practices/

CloudWays Blog:
Phil Sturgeon Talks About API Development, PHP-FIG, PHP Books And The Future Of PHP
Apr 25, 2017 @ 12:34:44

On the Cloudways blog there's a new post sharing an interview with Phil Sturgeon with some of his thoughts about API development, the PHP-FIG organization, PHP-related books and the future of the language.

Today we are super excited to have Phil Sturgeon with us for this interview. Phil is a cool dude and an experienced API dev. He has a lot of experience in creating API for different platforms. Right now, he is working at WeWork as a Platform Engineer. He has written an excellent book on creating API, “Build APIs You Won’t Hate”. He has worked with popular PHP tools and frameworks including CodeIgniter, FuelPHP, PyroCMS. Phil also contributed to PHP The Right Way and PHP-FIG.

Phil also speaks at PHP conferences and often mentors budding developers. In this Interview he talks about his development experiences, workflows and experience with API development.

In the interview Phil answers questions about:

  • how he got started in PHP development
  • his opinions on PHP 7.x
  • preferred development workflows
  • his (previous) involvement with the PHP-FIG
  • his speaking and the topics he usually covers

Check out the full interview for answers to these and other questions.

tagged: cloudways interview philsturgeon development api phpfig books language

Link: https://www.cloudways.com/blog/phil-sturgeon-php-interview/

CloudWays Blog:
Stefan Priebsch Talks About ThePHP.Cc, His Experience With PHP Development, PHP 7 &
Apr 14, 2017 @ 12:50:39

The CloudWays blog has posted another in its series of interviews with members of the PHP community. In this latest article they talk with Stefan Priebsch of thePHP.cc (a consulting company) and some of his experiences, past and present, in the world of PHP.

Today, We are honoured to have Stefan Priebsch for this interview. He is a cofounder of thePHP.cc, a well known PHP consulting firm. He is also an entrepreneur, university lecturer and a thought leader in modern software application architecture. Stefan specializes in PHP powered enterprise applications and has built an enviable reputation as one of the best trainers in Germany.

Additionally, Stefan speaks regularly at international PHP conferences and wrote a book PHP 7 Explained with Sebastian Bergmann and Arne Blankerts. In this interview, he talks about his career, PHP 7 ebook and the latest developments in the industry.

In the interview Stefan answers questions about the benefits of the PHP 7.x releases, his work at thePHP.cc, his book, what development tools he uses and how he spends his free time. You can read his answers to these questions and more in the full interview.

tagged: cloudways interview stefanpriebsch thephpcc experience php7 book development

Link: https://www.cloudways.com/blog/stefan-priebsch-interview/

SitePoint PHP Blog:
Game Development with ReactJS and PHP: How Compatible Are They?
Mar 29, 2017 @ 11:56:13

The SitePoint PHP blog has a new tutorial posted from Christopher Pitt (known for his "interesting" uses of PHP) covering the combination of ReactJS and PHP in game development. He wants to answer the question of how compatible they are and provide an example to help illustrate.

I started thinking about this the moment I decided to try and build a game using PHP and ReactJS. The trouble is that I knew nothing about the dynamics of multiplayer games, or how to think about and implement player-based economies.

I wasn’t even sure that I knew enough about ReactJS to justify using it. [...] I once watched a talk, by dead_lugosi, where she described building a medieval game in PHP. Margaret inspired me, and that talk was one of the things that lead to me writing a book about JS game development. I became determined to write about my experience. Perhaps others could learn from my mistakes in this case, too.

He hops right in to the code from there, starting with the setup of the backend functionality making use of Aerys for the HTTP/WebSocket handling. He creates a few basic routes then moves on to the frontend using Laravel Mix to pull in the dependencies he needs and perform the steps needed to build things out. He then goes through the process of creating the application frontend and connecting the WebSocket requests to a "GameSocket" endpoint. He finishes up the post with updates the Javascript to add in functionality to send a message to all users connected to the WebSocket.

tagged: reactjs game development combination tutorial aerys laravelmix

Link: https://www.sitepoint.com/game-development-with-reactjs-and-php-how-compatible-are-they/

Jason McCreary:
Accepting Adam's TDD Challenge
Mar 16, 2017 @ 10:43:02

Jason McCreary has a post on his site where he's officially accepted a challenge made by Adam Wathan during the Laracon Online conference and how he went about solving it.

Last week at Laracon Online Adam Wathan gave a talk entitled “Lies you’ve been told about testing”. Following the talk, Adam posted a challenge. Amid Adam’s post, he makes a single claim and presents a challenge.

The challenge was to write a unit test for the three provided class implementations in isolation. The claim is that isolated unit testing is incompatible with Test Driven Development (TDD). He talks about the other phases of TDD outside of the "refactor" step ("red" and "green") and how he would apply those to the steps leading to a complete refactor. He also talks briefly about testing styles and what would need to change to complete the process on both the code and the test side.

tagged: tdd testdriven development refactor challenge resolution

Link: https://jason.pureconcepts.net/2017/02/tdd-isolated-unit-test-challenge-adam-wathan/

Laravel News:
Tips For Building Your First Laravel Package
Feb 23, 2017 @ 09:42:08

On the Laravel News site there's a tutorial posted from Dmitry G. Ivanov giving you some helpful tips on building your first Laravel package.

Laravel is a powerful and modern framework. It has tons of different features, which make our work faster and easier. But you can’t push everything into the single box. At one time or another, we’ve all been in need of something not implemented in the framework out of the box.

[...] A package can be a solution. Write your code once and use it in any number of projects. Maybe you found a bug, or want to make some changes? Do it just once in your package code and then pull required changes in all of your projects. Sounds good?

The article then breaks down the information into a few different categories:

  • The First Step (checking Packagist for something pre-existing)
  • Development
  • Testing
  • Documentation
  • Release

He ends the post by pointing out that there's several other things to consider when creating your package but they're a bit more in-depth than a short post like this could tackle.

tagged: laravel package tips development documentation testing release tutorial

Link: https://laravel-news.com/first-laravel-package-tips

Freek Van der Herten:
Packages that make developing Laravel apps easier
Feb 13, 2017 @ 09:46:12

Freek Van der Herten has a new post to his site sharing what he considers some of the most helpful Laravel package to help with your debugging.

In this post I’d like to share some of the packages that make developing a Laravel app easier.

His list of packages includes a wide range of testing tools like:

For each item on his list he includes a screenshot of it in action (either of a terminal or a UI) and a brief explanation of how it can help.

tagged: framework help debugging package laravel development

Link: https://murze.be/2017/02/packages-make-developing-laravel-apps-easier/

Robert Basic:
Current Vim setup for PHP development
Feb 10, 2017 @ 11:46:10

For those out there always interested in how other developers have their development environment, Robert Basic has some info on his own setup that might interest you. In this new post to his site he shares his configuration using the Vim editor when writing PHP code.

I made some changes to my Vim setup for PHP development recently, so it’s time to write it all down. I’m more than sure that I’ll break it soon and won’t be able to remember all the things I did to have the current setup.

Some new plugins popped up on my radar, I tweaked some older plugins and I even wrote one for PHPStan!

He starts with the improvements in tag support he's found recently using the Gutentags plugin. He also covers other tools and functionality like:

  • Jump to definition
  • (Getting the ) current PHP class and method
  • PHP namespaces
  • Linting
  • A promising completion engine for PHP
  • PHPStan in Vim
  • Debugging

He finishes up the post with a few other helpful supporting plugins for indenting, searching and argument swapping.

tagged: vim editor setup development plugin programming

Link: https://robertbasic.com/blog/current-vim-setup-for-php-development/

Master Zend Framework:
How To Do RAD Prototyping and Development With The ReflectionBasedAbstractFac
Feb 09, 2017 @ 20:55:47

The Master Zend Framework site has posted a new tutorial showing you how to [use the ReflectionBasedAbstractFactory for prototyping](How To Do RAD Prototyping and Development With The ReflectionBasedAbstractFactory) and development in a Zend Framework 2 application.

Rapid application development isn't normally associated with Zend Framework. That's considered Laravel's domain. But thanks to the ReflectionBasedAbstractFactory, prototyping and rapid application development is now just as easy in Zend Framework as it is in Laravel. In today's tutorial, I'm going to show you how.

When using Zend ServiceManager, it's quite common to create a factory class for any class which require constructor dependencies. While tedious, it ensures we both follow development best practices and that the code we create is fully testable.

However, if we're not careful, it can lead to an enormous amount of factories — perhaps where we have one factory for every class. Needless to say, that can seriously hurt development. There needs to be a better way. And there is!

The ReflectionBasedAbstractFactory is included in the 3.2.0 release of Zend ServiceManager and makes use of the Reflection API to do some automagic, handy things. The article starts with some reasons why you might use it and a brief look at how it works. It also points out that, despite how it makes things easier on the developer it's "not for production" and instead relying on the other configuration handlers to help out.

tagged: zendframework2 rapid development prototype reflectionbasedabstractfactory tutorial

Link: http://www.masterzendframework.com/rad-prototyping-and-development-with-reflectionbasedabstractfactory/