News 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:
Legacy Code is a Cancer
August 04, 2014 @ 11:08:45

In the latest post to the SitePoint PHP blog Bruno Skvorc proposes the idea that "legacy code is a cancer" that can influence decisions and technology choices that shy away from the new and possibly more functional alternatives.

This might come out controversial, but I firmly believe there is no room for legacy code in modern systems. Allow me to elaborate before you sharpen your pitchfork and light your torch. What I mean by that is: there should be absolutely zero reason to keep implementing the functions you're adding to the new version retroactively into the old version, just because some people are still using it, even if the people using it are a vast majority.

He talks about the "support everything for as long as we can" ideal and how it can come back to bite you in the end. He suggests that, at some point, the v1 users have to "be discarded" and dropped for the upgraded version of the application. He talks about failure potentially brining around success and compares applications versus libraries and components and the upgrade path for each. He ends the post with a suggested upgrade path to move the system itself away from legacy support and into the new, latest version.

0 comments voice your opinion now!
legacy code cancer maintenance upgrade support users

Link: http://www.sitepoint.com/legacy-code-cancer/

Phil Sturgeon:
Heroku and PHP Sitting in a Tree. K.I.S.S.I.N.G
May 12, 2014 @ 09:40:49

In a recent post Phil Sturgeon talks about the recent news from Heroku about their integrated PHP support and some of his own experience in using the new service feature and migrate his blog over.

Heroku was - as far as I remember - the first (mainstream) PaaS on the market. It was Ruby-only but it was that symbol of modern web development at the time, with the whole "slinging code", "getting shit done", make a Git repo and start shipping bro, hack project/agile-til-it-works mindset. [...] Git push your code, its deployed, one-click installs and drag to scale. It sucked that it was always for Ruby, because as I was also doing a lot of work in PHP I obviously wished I could have the same for my other projects.

He walks through some of the "evolution" of the PaaS (platform as a service) market as it related to PHP environments. He talks about other services like PHPFog, Pagodabox and Fortrabbit. The Heroku added true PHP support and he made his move. He goes through the steps he followed to get his blog migrated over and the commands needed to make the push.

0 comments voice your opinion now!
heroku paas platform service history support pyrocms

Link: http://philsturgeon.co.uk/blog/2014/05/heroku-and-php-sitting-in-a-tree

SitePoint PHP Blog:
HHVM and Hack on Heroku
April 30, 2014 @ 12:38:23

In a recent announcement Heroku, a popular platform as a service provider, announced that they now fully support native HHVM support to their platform offerings. In this new post to the SitePoint PHP blog Bruno Skvorc shares some of his own thoughts on the announcement.

In a move that surprised most but displeased none, Heroku, the Cloud Application Platform, has added native HHVM support to their cloud. PHP has long been a viable solution for high traffic production apps, and has had one of the best package managers for a while, not to mention the fact that it's evolved significantly since the days of "simple hacks for small projects". The PHP "development model" has been anything but "hackish" in the professional circles for a while now. The unfortunate ignorance of Adam Gross aside, this really is some big news.

Heroku apparently saw an opportunity to engage a whole new area with the integration of HHVM (and Hack) support on their PHP instance offerings. They even offer a method for switching between the normal PHP instances and an HHVM one to make the transition as easy as possible.

0 comments voice your opinion now!
hhvm heroku support release instance paas

Link: http://www.sitepoint.com/hhvm-hack-heroku/

SitePoint PHP Blog:
Implementing Multi-Language Support
April 16, 2014 @ 12:18:39

The SitePoint PHP blog has a new post from Jacek Barecki talking about a few ways you can include multi-language support in your PHP applications. There's not much in the way of actual code here, but there are links to some other tools that can help get the job done.

Setting up a multilingual site may be a good way to attract new customers to your business or gain more participants in your project. Translating a simple site with a few static pages probably won't probably be complicated, but more complex PHP web applications may require a lot of work when launching multiple language support. In this article I'll present different types of content that need to be taken under consideration when internationalizing a site.

He breaks it down into five different types of content that you might want to translate:

  • Multi-language Static Content
  • Database content
  • User submitted content
  • Resources (images, videos, etc)
  • Other types of content

He wraps it up with a few recommendations including making a checklist of the things you want to translate to figure out what tools you need to use.

0 comments voice your opinion now!
multilanguage support implementation content type

Link: http://www.sitepoint.com/implementing-multi-language-support/

HHVM Blog:
HHVM 3.0.0
March 31, 2014 @ 10:15:00

The HHVM blog has an exciting new post for those using the HHVM and Hack language - they've officially released version 3.0.0 with complete Hack support.

At our last major version bump (2.0.0), we basically became a whole new project. We switched from a "PHP -> C++" translator to a virtual machine. This version bump (3.0.0) is a much less dramatic code shift (we're still a VM, don't worry), but this time the big announcement is that we support a new language, Hack.

They take a step back in time and look at the changes since 2.0.0 in organization, technology and community involvement. From there, they get into "the business" of what's in this new release including:

  • The old webserver is gone. If you get something like Uncaught exception: no factory for server type "libevent", you need to switch to fastcgi.
  • We are moving from .hdf config files to .ini.
  • Our most requested extension, mysqli is now in. (there's currently a bug, but the fix will be in 3.0.1).

You can find out more about the HHVM on the project's main website.

0 comments voice your opinion now!
hhvm release hack support v3 project facebook

Link: http://hhvm.com/blog/4349/hhvm-3-0-0

Liip Blog:
HHVM and New Relic
March 28, 2014 @ 09:04:00

In this new post to the Liip blog Christian Stocker talks about how they use the popular application and server monitoring service New Relic with the HHVM (despite no official support).

As discussed in one of my last blog posts, we really like New Relic for performance metrics and use it a lot. Unfortunately there isn't an extension for HHVM (yet) and HHVM is becoming an important part in our setup. But - a big great coincidence - New Relic released an Agent SDK and with that, an example extension for HHVM and WordPress. That was a great start for me to get behind the whole thing.

He talks about writing a HHVM extension and includes an example of the implementation. Christian also talks about the challenges around profiling data and finding out where the requests "spend their time" in the execution. There's two solutions he suggests, but they each have their tradeoffs (a recompiled/patched version or a performance hit). He provides the extension they've built in this github repository.

0 comments voice your opinion now!
hhvm newrelic patch extension support agentsdk

Link: http://blog.liip.ch/archive/2014/03/27/hhvm-and-new-relic.html

Ulf Wendel:
The performance penalty of the early MySQL Fabric support for PHP
March 13, 2014 @ 12:16:23

In his latest post Ulf Wendel looks at the performance issues around the recently introduced MySQL Fabric support included in the mysqlnd extension.

PECL/mysqlnd_ms 1.6 is currently being modified to support sharding and fully automatic server and client failover when using MySQL Fabric (slides) to manage a farm of MySQL servers. PECL/mysqlnd_ms is a mostly transparent load balancer that works with all PHP MySQL APIs (PDO_MySQL, mysqli, ...). The idea is, that if, for example, a MySQL server fails, the plugin talks to MySQL Fabric to learn about alternative servers that Fabric has provisioned automatically. This "talks to" gives implies a performance penalty for applications.

He takes a look at what's happening "behind the scenes" when it comes to using the Fabric functionality and sharding (based on the use of mysqlnd_ms_select_shard). He traces through the execution path and how much slower then end result is. He includes some results from the connection debugging and the number of queries a single request makes.

0 comments voice your opinion now!
mysqlnd performance penalty mysql fabric support

Link: http://blog.ulf-wendel.de/2014/the-performance-penalty-of-the-early-mysql-fabric-support-for-php/

Pádraic Brady:
Thoughts on Composer's Future Security
March 06, 2014 @ 11:09:06

Pádraic Brady has a new "let's watch Paddy think aloud in a completely unstructured manner blog post" about the future of security when it comes to the popular PHP package manager Composer. It's recently come under criticism around its lack of package signing and TLS/SSL support.

The Composer issue, as initially reported by Kevin McArthur, was fairly simple. Since no download connection by Composer was properly secured using SSL/TLS then an attacker could, with the assistance of a Man-In-The-Middle (MITM) attack, substitute the package you wanted to download with a modified version that communicated with the attacker's server. They could, for example, plant a line of code which sends the contents of $_POST to the attacker's server.

He's been working on some updates to the project, one of with is TLS/SSL support as defined in this pull request currently pending. It enables peer verification by default, follows PHP 5.6 TLS recommendations and uses local system certificates in the connection. He talks some about other additional TLS/SSL measures that could be added in the future and how, despite it being safer than nothing, TLS/SSL is not the "cure all" for the problem.

He then moves on to package signing and suggests one method for implementation - signing the "composer.phar" executable and signing "everything else" (packages to be downloaded) to verify their validity.

The flaw in Composer's installer isn't that it's unsigned, it's that it doesn't afford the opportunity for the downloader to read it before it gets piped to PHP. It's a documentation issue. You can go down the route of using a CA, of course, but that's further down the rabbit hole than may be necessary. Signing the composer.phar file is another matter.
0 comments voice your opinion now!
composer package signing tls ssl support security

Link: http://blog.astrumfutura.com/2014/03/thoughts-on-composers-future-security

Johannes Schlüter:
On rumors of "PHP dropping MySQL"
February 24, 2014 @ 13:44:21

There's been some rumors floating around about the possibility of PHP's MySQL support going away in upcoming versions of the language. In his latest post Johannes Schlüter tries to bring a bit of clarity to these rumors and what's actually being removed.

Over the last few days different people asked me for comments about PHP dropping MySQL support. These questions confused me, but meanwhile I figured out where these rumors come from and what they mean. The simple facts are: No, PHP is not dropping MySQL support and we, Oracle's MySQL team, continue working with the PHP community.

He suggests that the confusion might have come from the recent changes to "soft deprecate" the oldest ext/mysql functionality and warn users against using it in their applications. He talks about the history of MySQL support in PHP and one project that removing it could adversely effect (WordPress).

0 comments voice your opinion now!
mysql support remove rumor extmysql deprecate wordpress

Link: http://schlueters.de/blog/archives/177-On-rumors-of-PHP-dropping-MySQL.html

Phil Sturgeon:
Composer now supports PSR-4
January 06, 2014 @ 09:59:36

As Phil Sturgeon notes in a recent post to his site, the Composer, the popular PHP package management tool, now supports the PSR-4 autoloading standard as defined by the PHP-FIG.

PSR-4 was voted in as an "accepted" PSR by the FIG in December. It took a little while to get done and went through a series of painful rewrites but when we have in the end is a document that reflects what this truly is: an improvement on PSR-0.

Today Jordi Boggiano merged a pull request by Andreas Hennings into master branch of Composer that contained support for PSR-4. Andreas was a massive help to the FIG while we were trying to shake the issues out of PSR-4 during Draft and Review stages, so he really outdone himself by providing the code too.

Phil makes a few suggestions about moving to PSR-4 including: not moving immediately, making a "psr4" branch to test it out and points to an example of how to do it. More information on PSR-4 and Composer can be found in the official documentation.

0 comments voice your opinion now!
composer psr4 autoload standard phpfig support

Link: http://philsturgeon.co.uk/blog/2014/01/composer-now-supports-psr4


Community Events





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


library language install developer interview list unittest api podcast configure homestead code community wordpress threedevsandamaybe release series introduction laravel application

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