News Feed
Jobs 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:
HHVM vs Zend Engine in PHP 6
January 27, 2014 @ 12:05:55

In this recent post to the SitePoint PHP blog Bruno Skvorc compares two technologies that have influence how PHP performs - the HHVM (HipHop Virtual Machine) and the Zend Engine in PHP6 - and the potential replacement of one with the other.

The fabled PHP 6 is long overdue. This unicorn of the web dev world has been "coming" for decades now, and it's still not clear whether or not it's actually something that's going to happen in this decade, or just an idea, a fantasy of the PHP userbase. [...] In the latest edition [of the PHPClasses podcast] between Manuel Lemos and César Rodas, an interesting topic arose among others - Facebook's HHVM replacing Zend Engine in PHP 6. While this was purely speculation on the part of the participants, and whether or not you believe in PHP 6, you have to admit it's an interesting notion.

He starts with a look at the overall pros of the HHVM solution - the speed of execution, that it's backed by Facebook and its support for static typing. There's some cons that come with the HHVM though, including not allowing custom extensions, that it's developed by Facebook (yes, this can be a con too) and that there are other ways to enhance PHP's execution speed without sacrificing other functionality.

0 comments voice your opinion now!
hhvm sitepoint pro con compare zendengine

Link: http://www.sitepoint.com/hhvm-vs-zend-engine-php-6/

SitePoint PHP Blog:
Message Queues Comparing Beanstalkd, IronMQ and Amazon SQS
January 08, 2014 @ 10:37:35

The SitePoint PHP blog has a new post looking at using message queues in PHP. More specifically it compares a few of the different solutions out there and their advantages/disadvantages - Beanstalkd, IronMQ and the Amazon SQS.

This article introduces the concept of message queues and discusses the strengths and weaknesses of three specific message queue services: Beanstalkd, IronMQ and Amazon SQS. [...] Queues allow you to store metadata for processing jobs at a later date. They can aid in the development of SOA (service-oriented architecture) by providing the flexibility to defer tasks to separate processes. When applied correctly, queues can dramatically increase the user experience of a web site by reducing load times.

He starts with some of the overall benefits and downfalls of using a queueing system in your application, including some common use cases. From their he breaks it up into sections, in each talking about the option and how it differs from the others:

  • Services
  • Server setup
  • Service Level Agreements (SLAs)
  • Architecture
  • Client libraries
  • Management interface
  • Redundancy
  • Security
  • Speed
  • Fidelity
  • One-time pickup

...and many, many more. If you're looking for a good, complete overview of how these three options compare on a wide range of features and configurations, definitely check out this post. It even includes some PHP close to the end to make the connections to each and send/receive messages.

0 comments voice your opinion now!
message queue compare beanstalkd ironmq amazonsqs advantage disadvantage tutorial

Link: http://www.sitepoint.com/message-queues-comparing-beanstalkd-ironmq-amazon-sqs/

Aura Blog:
Which is Lighter, Silex or Aura.Web_Project?
December 26, 2013 @ 09:40:01

In a recent post the Aura PHP blog compares the "lightness" of two different micro-framework-oriented packages - Silex and Aura.Web_Project (of the Aura framework project.

Too many people, including the Silex article author, use absolute terms like "light" and "heavy" and "bloated", instead of relative terms like "lighter" and "heavier" and "more bloated" and "less bloated", to describe software. Any time someone uses an absolute term like that, you need to ask: "Compared to what?" [...] don't know if the measurements in that article are valid or useful for defining "what makes a microframework" but they do provide a basis for comparison. I understand that some people think "measuring (size|lines-of-code|number-of-classes) is stupid and it doesn't matter!" Maybe it is, maybe it's not. [...] So, let's go with that article and use its approach to make a comparison between Silex and Aura.Web_Project to see if my earlier claim, using the terms and measurements outlined by the Silex post author, is accurate.

The rest of the post outlines the steps that were taken to perform the measurements, the tools used check things like memory usage and the results. They compare things like:

  • Total Package Dependencies
  • Total Disk Usage
  • Total Class Count
  • "Actual Usage" Class Count
  • "Actual Usage" Non-Comment Lines Of PHP Code
0 comments voice your opinion now!
silex aura framework webproject compare lighter

Link: http://auraphp.com/blog/2013/12/23/lightness-silex-vs-web-project/

Paul Jones:
Quicker, Easier, More Seductive How To Tell A DI Container From A Service Locator
December 17, 2013 @ 13:55:11

Paul Jones has continued his posts about dependency injection containers versus service locators in his site with this new post that hopes to make it easier for you to tell the difference between the two.

It is easy to confuse a Dependency Injection container with a Service Locator. They are very similar to each other. The differences are subtle. Indeed, it's even possible to use a Dependency Injection container as a Service Locator, although I think it's difficult to use a Service Locator as a Dependency Injection container. They are both sub-patterns of a more generic pattern called Inversion of Control, and some people confuse the term Dependency Injection with the more generic term Inversion of Control.

He starts off with a few questions you can ask to see which camp the implementation belongs in, mostly revolving around how the objects are fetched. He includes some code samples to help reinforce the point, showing both a service locator and DIC. He's also done some looking around at some of the major DIC implementations and which of the two he sees them as (with a few notes explaining his thoughts).

0 comments voice your opinion now!
service locator dependency injection compare inversionofcontrol

Link: http://paul-m-jones.com/archives/5843

Phil Sturgeon:
Benchmarking Codswallop NodeJS v PHP
November 12, 2013 @ 09:21:29

Phil Sturgeonhas posted about some Node.js vs PHP benchmarks that someone linked him to concerning web scraping. The article suggests that Node.js "owns" PHP when it comes to this but, as Phil finds out, there's a bit more to the story than that.

Sometimes people link me to articles and ask for my opinions. This one was a real doozy. Oh goody, a framework versus language post. Let's try and chew through this probable linkbait [where] we're benchmarking NodeJS v PHP. Weird, but I'll go along with it. Well, now we're testing cheerio v PhpQuery which is a bit different, but fine, let's go along with it.

Through a little discovery, Phil noticed phpQuery using file_get_contents, a blocking method for fetching the remote pages to scrape. Node.js instead uses a non-blocking method, meaning multiple files can be fetched at the same time. In answer to this blocking vs non-blocking, he decided to run benchamrks against a few cases - Node.js/Cherrio, PHP/phpQuery and his own, more correct comparison to the Node option - PHP/ReactPHP/phpQuery. He's shared his results, showing a major difference between the straight phpQuery and the React-based version.

It seems likely to me that people just assume PHP can't do this stuff, because by default most people arse around PHP with things like MAMP, or on their shitty web-host where is is hard to install things and as such get used to writing PHP without utilizing many extensions. It is probably exactly this which makes people think PHP just can't do something, when it easily can.
0 comments voice your opinion now!
nodejs reactphp webpage scraping benchmark compare

Link: http://philsturgeon.co.uk/blog/2013/11/benchmarking-codswallop-nodejs-v-php

Smartbridge.com:
Rapid Website Development The Case for LAMP and WordPress (Part 1)
August 05, 2013 @ 10:14:06

Smartbridge.com has posted the first part of a series of articles looking at rapid development with WordPress and the LAMP stack (Linux, Apache, MySQL and PHP).

As more and more people around the world have access to computers, laptops, tablets, and smartphones, these users are getting connected to the internet, ready to jump into the virtual world of unlimited and unrestrained information. Websites today are the most popular tool to deliver this vast information to an ever increasing audience. Let's talk about choices when it comes to rapidly developing custom non-enterprise websites.

He starts by eliminating some of the language alternatives off the bat because of either their lack of quality CMSes or complexity. He then moves on to Open Source options, focusing in on PHP for its low learning curve and popularity. There's a brief comparison of Drupal and WordPress, but it's pretty high level. He's saving the good parts of WordPress for the next part of the series.

0 comments voice your opinion now!
rapid development wordpress lamp drupal compare

Link: http://www.smartbridge.com/blog/rapid-website-development-the-case-for-lamp-and-wordpress-part-1/

Reddit.com:
My new boss is convinced Symfony2 is not suitable for big projects...
June 06, 2013 @ 13:13:13

On Reddit.com there's a big discussion happening around a question asked about Symfony2 versus Zend Framework 2 - My new boss is convinced Symfony2 is not suitable for big projects. He wants us to start developing with ZF2. Should we? Here's his story:

I have worked with ZF1 and Symfony2. To me, Symfony2 is not only more productive (with all the CLI thingies), but is much more robust, modular... better in almost all ways. I don't know much about ZF2. I've read some comparatives (here in this subreddit as well as in a few articles), but got nowhere. I either need reasons to learn ZF2 (and start the new projects with all difficulties a newbie would encounter, which sounds overly tedious, I must say) or arguments to provide my boss with. Even opinions from people who know both frameworks.

There's lots of different opinions shared in the comments ranging from pro-Symfony2, pro-ZF2 out to those that eschew both and opt for something lighter for their needs (like an advanced setup of Slim).

0 comments voice your opinion now!
symfony2 zendframework2 compare opinion framework

Link: http://www.reddit.com/r/PHP/comments/1fq11x/my_new_boss_is_convinced_symfony2_is_not_suitable

PHPMaster.com:
Goodbye CodeIgniter, Hello Laravel
May 07, 2013 @ 10:37:05

On PHPMaster.com today there's a new post from Daniel Gafitescu that compares CodeIgniter (an "old standby" in the PHP framework world) and Laravel, a relative newcomer. The article is broken up into a few different categories, with some sample code included to illustrate.

n the beginning of my career I stumble upon CodeIgniter and I love it for its simplicity, small footprint, and good documentation. [...] But last year, because of the Twitter buzz from some in the PHP community, blog posts, and the suggestions of some friends, I give Laravel 3 a try - and since that time I've never looked back. So, in this article I'd like to present a comparison of the two frameworks from my point of view.

He compares the two frameworks based on things like the requirements to get them installed, how they handle creating REST APIs, the general organization of their code (and your code using them) as well as command line support. There's a "miscellaneous" section that talks about some of the smaller differences and a (very) brief mention of the communities for each.

0 comments voice your opinion now!
codeigniter laravel framework compare

Link: http://phpmaster.com/goodbye-codeigniter-hello-laravel

DZone.com:
PHPUnit vs. Phake cheatsheet
April 19, 2013 @ 09:53:45

On DZone.com today Giorgio Sironi has posted a "cheat sheet" to help you correlate the functionality of two PHP unit testing tools - PHPUnit vs Phake (for mocking objects).

Benjamin Eberlei introduced me to Phake with his recent article: it is a Composer-ready PHP library that integrates easily with PHPUnit and provides an independent Test Doubles framework, capable of producing Stubs, Mocks, and Spies. The syntax and object model reminds me of Mockito, the Java Test Double framework from the authors of Growing Object-Oriented Software. I like tools that do one thing and do it well, and after experimenting with Phake I'm using it on all new code.

He compares the two tools on a few different pieces of functionality including creating stubs, mocks and spies. Sample code is included for both sides. It's not a detailed guide by any means, but it can give you a better picture of how the two compare.

0 comments voice your opinion now!
phpunit phake mock stub unittest spies compare cheetsheet

Link: http://css.dzone.com/articles/phpunit-vs-phake-cheatsheet

Benjamin Eberlei:
Traits are Static Access
April 12, 2013 @ 11:16:35

In a new post to his site Benjamin Eberlei shares an opinion about traits, noting that they're basically the same as static functionality when it comes to several things like coupling, not being testable and being a "global state" container.

I used to look forward to traits as a feature in PHP 5.4, but after discussions with Kore I came to the conclusion that traits are nothing else than static access in disguise. They actually lead to the exact same code smells. Familiar with the outcome of too much static use, we should reject traits as just another way of statically coupling your code to other classes.

He includes some code examples showing traits in use in an example controller to handle a simple redirect. He points out at least six different issues with just this simple implementation. He rewrites it as "static" code to help prove his point. He comes to the conclusion that, much like static methods, traits should be avoided and instead aggregation should be favored.

0 comments voice your opinion now!
traits static compare avoid example code

Link: http://www.whitewashing.de/2013/04/12/traits_are_static_access.html


Community Events











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


composer application framework opinion code example hhvm podcast symfony2 introduction security facebook hack unittest package language release series install component

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