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

Tomas Votruba:
How we Migrated from Nette to Symfony in 3 Weeks - Part 1
Feb 25, 2019 @ 15:58:27

Tomas Votruba has a post to his site sharing some background on a migration he recently helped perform migrating an application from Nette to Symfony.

On the break of January/February 2019, we migrated whole Entrydo project from Nette to Symfony. It was API backend with no templates, but still, it wasn't as easy as I expected.

Many coffees and beers were drunk during this migration. 0 programmers were too frustrated to give up. Yet, you'd laugh if you knew what took us the most time.

He starts with some of the reasoning why they wanted to make the move and walks through the steps they took to get there:

  • getting ready
  • making a commitment
  • automated migrations > manual changes

He also talks about some "WTF moments" they had along the way where code that should have worked wasn't (and the simple issue that caused them).

tagged: migration nette symfony process background api

Link: https://www.tomasvotruba.cz/blog/2019/02/21/how-we-migrated-from-nette-to-symfony-in-3-weeks-part-1/

MyBuilder Tech Blog:
Managing Background Processes within Symfony
Dec 02, 2016 @ 17:19:47

Edd Mann has written up a tutorial for the MyBuilder.com Tech blog about managing background processes in a Symfony application with the help of Supervisor.

When a web application reaches a sufficiently large size, it can become infeasible to perform all actions required within a single web request/response life-cycle. You may find yourself wishing to for example - batch up and send queued emails at particular intervals, or process payments asynchronous to the point in-time the user made the initial request. In this post I would like to discuss our changing use of background processes (both time-dependent and continuous) due to increasing throughput demands.

He starts out with the first approach most applications take when needing to run automated, asynchronous processes - cron. Using it and a custom bundle they created for it, Edd shows how to directly integrate the cron timing of commands into the class attributes. However, after a while the system grew and it needed something a bit more powerful than cron, something that could correctly handle long running processes. Ultimately they decided on Supervisor, a processes manager and control system that makes managing these processes simpler. He talks about the transition they made from cron over to Supervisor (safely) and how they integrated the signaling functionality Supervisor allows into their application.

tagged: symfony background process manage cron supervisor tutorial bundle

Link: http://tech.mybuilder.com/managing-background-processes-within-symfony/

Laravel News:
Behind the app: Chrome Weather Extension
Sep 18, 2015 @ 17:38:18

The Laravel News site has a post talking about a Chrome extension to fetch the weather, created by Tim Leland, that's powered by a Laravel-based backend application.

Tim Leland has created a new Chrome Extension for getting not only the current weather, but today’s outlook, and a 5-day forecast. The extension automatically calculates your location and viewing the current temperature is as simple glancing at the menu bar. The temperature is always visible and when you click the button it loads the modal window as shown above. It’s simple and intuitive.

The Extension itself uses a Laravel backend and I wanted to find out more how it works.

The rest of the post shares the Q&A with Tim all about the extension. He answers questions about:

  • why he created the extension
  • how it works with the backend to pull the latest weather
  • where Laravel fits into the process

You can find the extension over in the Chrome store and get it installed.

tagged: laravel chrome extension weather interview background

Link: https://laravel-news.com/2015/09/behind-the-app-chrome-weather-extension/

Amasty.com:
PHP 7 and script languages future: insights from lead Zend.com developer
Jul 13, 2015 @ 16:21:02

The Amasty.com site has posted an article featuring an interview with Dmitry Stogov about his background and the next major release of PHP - PHP 7.

PHP is used on 81.9% of websites all over the world and has celebrated its 20th birthday some time ago. We talked to the PHP 7 lead developer and Zend Technologies Chief Performance Engineer – Dmitry Stogov. He spoke about the newest trends in PHP development and the world of script languages.

He answers questions about:

  • How and why he started coding
  • Why he chose PHP and ended up at Zend
  • The work he's contributed to PHP and more specifically PHP7

This includes the work done on the PHPNG performance improvements for the language that was integrated into the main codebase. He talks about some of the testing and development hurdles they had to overcome and what the most important features are to an end user. They also talk some about the future of PHP, it's overall perception in programming communities and some of the features he finds best in modern PHP development. They end the post asking Dmitry about some of his own interests and any advice he can give to more junior developers.

tagged: dmitrystogoy interview php7 phpng performance background features language

Link: https://blog.amasty.com/php-7-and-script-languages-future-insights-from-lead-zend-com-developer/

Brandon Savage:
Consuming RabbitMQ messages with PHP
May 31, 2013 @ 14:15:47

Brandon Savage continues his look at using RabbitMQ and PHP together to queue up requests today in this latest post. In this new part of the series, he focuses on the last piece of the puzzle - consuming the requests in the queue. (Parts one and two)

Once you’ve created a RabbitMQ producer, it’s fairly easy to create a consumer. In fact, the only difference is in exactly what commands you’re using. The connection, envelope, channel and queue declarations are the same. While in RabbitMQ you publish to the exchange, you actually do consume a specific queue. As a result, the commands for consuming are part of the AMQPQueue class.

He shows you how to set up the code to sit in the background and wait for a queue request and how to fetch them in a non-blocking way. He finishes off the post with a look at handling success and error conditions (based on the status of message consumption, not the result of the processing).

tagged: rabbitmq tutorial consume amqp library success failure nonblocking background

Link: http://www.brandonsavage.net/consuming-rabbitmq-messages-with-php

Wan Qi Chen:
Background jobs with php and resque (Series)
Oct 10, 2012 @ 15:13:11

Wan Qi Chen has started a new series that looks at using PHP port of the resque (a Ruby based tool) to do background processing for parts of his PHP applications - PHP-Resque. So far, there's three parts to the series (with one more on the way):

  • Part one introduces the idea behind working with a background queue, the general workflow a process would follow and some of the benefits/drawbacks of using them.
  • In part two he gets more into the actual queue system and discusses the concept of a "job".
  • The third part gets more into the implementation and helps you get the PHP-Resque, predis extension and the process control extension installed.

The fourth part of the series (pending) will get into the actual code to implement this system you've job installed.

tagged: background queue phpresque tutorial series

Link:

PHPClasses.org Blog:
Throttling Background Tasks: Unusual Site Speedup Techniques: Part 2
Oct 26, 2010 @ 14:17:55

On the PHPClasses.org blog Manuel Lemos has posted part two of his look at techniques to help speed up your site - a few things that you maybe hadn't thought of before.

In the previous article I talked about one important factor that often seriously affects the user perception of the speed of a site, which is the presence of content from external sites that slows down the load of pages, such as advertising and widgets. In that article I presented a technique that I am using to make external content not affect the user perception of the site speed. In this article I am addressing another factor that may also affect the user perception of site speed, but this time is related to aspects of the server side environment.

In this article he looks at things like other server-side background processes, throttling their CPU usage, throttling PHP's CPU usage and the use of a monitoring class to help you and your applications (and sysadmins) stay on top of what's happening with the server.

tagged: background task throttle site speed tutorial

Link:

Steponas Kazakevicius' Blog:
Interruptable file download
Sep 13, 2010 @ 15:06:32

Steponas Kazakevicius has written up a new tutorial about file downloading and, more specifically, making an download tool that can handle interruptions in mid-stream (elegantly).

Have you ever been to a website that offers downloads of stuff? And while you are waiting for the download, there are lots of ads around? Sure you have. I have too. The last day I was downloading stuff. An idea came to my head. Was there a site which required to stay and watch the ads while you are downloading? Didn't see one. Is that technically possible? Sure. I wanted to show how. So I made a small web app for that.

His application (live demo or download available) submits the user upload in the background so that, if the user decides to cancel it, they can at any time and move on immediately.

tagged: tutorial interrupt download background

Link:

Ralph Schinlder's Blog:
PHPundamentals Series: A Background on Statics (Part 1 on Statics)
May 07, 2010 @ 14:47:59

Ralph Schindler has started up a new series of posts to his blog with this first article looking one of the fundamentals of PHP - statics.

Static class members (from here on called simply, “statics”) in PHP conjure both the best and worst in developers for a variety of reasons. In part 1 of this series of articles on statics, we’ll explore some background to get a better understanding of statics in PHP.

He covers some of the places that the idea of "static" came from and how its used in a few other languages (including ones PHP borrowed some of its ideas from). He uses a few analogies to illustrate what statics are and even includes some illustrations of how the static scope of PHP compares with other languages (like Java and .NET).

tagged: fundamental static language background

Link:

Andre Liem's Blog:
5 tips and tools to optimize your php application - Part 1 simple
Dec 02, 2008 @ 21:31:07

Andre Liem has posted five simple tips (part one of a two-part series) on ways to optimize your PHP applications.

After experiencing some issues with an application running the Zend Framework, I realized there were a lot of things I was not doing to optimize my application. There are simple and more complex actions you can take to speed up your application. Since time is precious, and developers with an expertise on optimization are not always available, I’ve split this post into two sections (simple and more advanced). This post focuses on the simple part.

His simpler suggestions include using the YSlow extension in Firefox, minification of Javascript and CSS, merging CSS/JS requests, using gzip and avoiding CSS background images.

tagged: optimize application tip tool yslow javascript css marge background

Link:


Trending Topics: