 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Goodbye CodeIgniter, Hello Laravel
by Chris Cornutt 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.
voice your opinion now!
codeigniter laravel framework compare
DZone.com: PHPUnit vs. Phake cheatsheet
by Chris Cornutt 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.
voice your opinion now!
phpunit phake mock stub unittest spies compare cheetsheet
Benjamin Eberlei: Traits are Static Access
by Chris Cornutt 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.
voice your opinion now!
traits static compare avoid example code
Adam Bard: The Same App 4 Times PHP vs Python vs Ruby vs Clojure
by Chris Cornutt March 27, 2013 @ 09:13:35
Adam Bard has written up a post that takes the same small application (a "Nurblizer") and writes it as a web application in four different languages - PHP, Python, Ruby and Clojure. His point is less about which is "best" but more to show the differences between them.
Here's a toy program I wrote implemented in PHP, Python, Ruby, and Clojure. I hope it's helpful for someone who knows at least one of those and wants to learn another.
The program is called "Nurblizer", and it does one thing: Accept free-form text, and attempt to replace all words but the nouns in said text with the word "nurble". It's up and running at http://nurblizer.herokuapp.com
He includes the source for each language's version using Sinatra for Ruby and Flask for Python but for PHP and Clojure it's just straight code. For each he briefly explains what its doing and a bit about how it relates to the examples from the other languages. He also points out a Hacker News discussion that's popped up about the examples.
voice your opinion now!
flask python clojure ruby example nurblizer compare
Lee Blue: PHP vs Ruby 2012 Year End Review
by Chris Cornutt November 07, 2012 @ 13:35:56
In this new post Lee Blue has gone through and compared Ruby and PHP in a "year end review" of their current statuses and what each of them have to offer:
Now that I've been working with Ruby in much more depth and both PHP and Ruby have matured dramatically over the past five years it is time to reevaluate the comparison. The previous article was primarily centered around the languages themselves and was not a showdown between any particular frameworks. In this review we will touch a bit more on frameworks, but in the context of a high level review of the two different landscapes of PHP vs Ruby for web development. We will not be getting down to feature-by-feature detail.
He talks a bit about the history and purpose of each of the languages and a good bit about the web frameworks that are available for each (hint: the PHP options are quite a bit more). He also talks about web hosting vs web application hosting and then compares the two languages with a "score card".
The bottom line, as always, is pick the solution that is right for you and your development team. My hope is that this article was helpful in shedding some light on the strengths of both PHP and Ruby, spreading the word about what is available to both languages, and helping you decide what is right for your next project.
voice your opinion now!
yearinreview language ruby compare framework history
QaFoo Blog: Abstract Classes vs. Interfaces
by Chris Cornutt October 02, 2012 @ 12:29:56
On the QaFoo.com blog Kore Nordmann shares some insight about the difference between abstract classes and interfaces and how they can be used effectively/correctly.
Features of object oriented languages are often use from a purely technical perspective, without respect to their actual semantics. This is fine as long as it works for you, but might lead to problems in the long run. In this article I discuss the semantical differences between abstract classes and interfaces. I also outline why following the semantics of those language constructs can lead to better code.
He defines "class" and "interface" before he gets too far into the differences, stating that a "class" is more of a "type" while an "interface" describes the type and the structure to use it. He also talks about how to tell them apart (when to use each). There's also some examples and "hints" to help you determine good and bad examples of interfaces and when an abstract class might be a better answer.
voice your opinion now!
abstract class interface compare tips definition
SitePoint: WordPress v Joomla Support and Community
by Chris Cornutt August 10, 2012 @ 10:52:52
Without a doubt, two of the most popular PHP-based projects out there are WordPress and Joomla. In this new post from SitePoint they compare the two on the basis of both their support and community (part 4 of a 5 part series).
Let's face it, an open-source content management system without a thorough user base, support system and community is destined for failure. We are comparing two giants in the CMS game here, so we already know they must be doing many things right in these departments. In this part of our series, we're going to be covering exactly what Joomla and WordPress have to offer when it comes to the support community.
Their comparison includes things like: WordPress.org vs Joomla.org, their respective support forums, other initiatives surrounding them and places you can find others to help you in your WordPress or Joomla work.
voice your opinion now!
wordpress joomla support community compare
PHPEasy.co.uk: Sorting array data using SplMaxHeap
by Chris Cornutt July 18, 2012 @ 08:17:25
On PHPEasy.co.uk today there's a new tutorial posted showing you how to sort using the SplMaxHeap functionality provided by the Standard PHP Library.
The SplMaxHeap class basically stores numbers in any order, and then returns them in descending order. In order to make this class useful for other data types other than numbers I have extend the SplMaxHeap class to compare dates and strings. SplMaxHeap extends SplHeap and implements the abstract class SplHeap::compare. Our extention of SplMaxHeap is therefore expected to implement the compare method.
Code examples are given showing sorting by things like "last name" and "date of birth" (using strtotime). There's also an example of its use in sorting values from an array and outputted in a loop. You can find out more about this functionality in the PHP manual.
voice your opinion now!
sort data splmaxheap compare function tutorial
|
Community Events
Don't see your event here? Let us know!
|