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

Christoph Rumpel:
Hello world, I am Laravel (5)
April 24, 2015 @ 12:46:22

With Laravel 5 out in the wild, you may be wondering what this new version has to offer either as someone already using the framework or brand new. In this recent post from Christoph Rumpel you can find out some of the highlights of this new release along with some code samples to illustrate.

So there is this thing called Laravel. You may have heard of it already, but you're not sure what it is actually about? Or you do, but want to know more about it and its great new features in version 5? Great, this post is especially for you! Laravel is at the same time one of the youngest and most popular PHP frameworks out there. So how does this work together? Let us take a closer look at why it is that popular and how it could be of use for you too. We will go through the main functionalities and talk about brand new features in version 5.

He touches on several different topics including: routing, use of the Eloquent ORM, the "artisan" command line tool, controllers, migrations and form request handling. Each section has some example code and a brief description of the feature. Obviously the Laravel documentation is a much more complete resource for each of these topics, but at least this gives you a feel for the framework and what it can do.

0 comments voice your opinion now!
introduction laravel5 framework version features overview

Link: http://christoph-rumpel.com/2015/04/hello-world-i-am-laravel/

TechEmpower.com:
Web Framework Benchmarks - Round 10
April 22, 2015 @ 11:06:58

The TechEmpower.com site has posted round 10 of their PHP framework benchmarks that includes several test types and hardware configurations.

Round 10 of the Framework Benchmarks project is now available! It has been a little less than a year since the previous round and in that time, approximately 133 contributors have made 2,835 git commits. View Round 10 resultsThese contributions have improved the project's toolset and added many new framework test implementations.

Frameworks tested include Phalcon, Slim, Yii2, Fuel, Symfony2, Laravel and CodeIgniter. They've run tests on:

  • JSON serialization
  • Single queries (requests)
  • Multiple queries (requests)
  • Fortunes
  • Data updates
  • Plaintext output

If you click on each item in the tab list above the results, you'll also get a description of what each test entails. They also provide the results in multiple formats, not just in graphical form that include both latency and framework overhead. You can also read more commentary about the results in this related blog post.

0 comments voice your opinion now!
framework benchmark round10 performance blog

Link: https://www.techempower.com/benchmarks/#section=data-r10

NetTuts.com:
Building Your Startup With PHP Scheduling a Meeting
April 21, 2015 @ 11:37:52

NetTuts.com continues its "Building Your Startup with PHP" series today in this latest post enhancing the application and allowing the user to add a meeting.

This tutorial is part of the Building Your Startup With PHP series on Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real life example. Every step along the way, we'll release the Meeting Planner code as open source examples you can learn from. We'll also address startup-related business issues as they arise. All of the code for Meeting Planner is written in the Yii2 Framework for PHP.

In this new post (one of four that will deal with adding a meeting) they start by creating the initial meeting listing page that includes a description, last update date and icons linking to actions to perform on that meeting. Next up they create the "Create Meeting" form and the functionality behind the scenes to make it work. This includes some alerting functionality as well. Next is the functionality to invite people to the meetings, using autocomplete handling to make it easier to locate individuals. Following this they include code to add locations (integrating Google Maps), assigning a meeting time and adding additional notes.

0 comments voice your opinion now!
startup tutorial series schedule meeting yii2 framework

Link: http://code.tutsplus.com/tutorials/building-your-startup-with-php-scheduling-a-meeting--cms-23252

Slim Framework Blog:
Lumen
April 17, 2015 @ 09:34:17

Josh Lockart, the lead developer and creator of the Slim framework, has responded to some questions and comments around the recently released Laravel microframework Lumen and how it relates to Slim and its own goals.

Lumen happened. It's a shiny new micro-framework from Taylor Otwell, and it joins the Laravel family today. It looks to be a pretty nice framework, and it shares many of the same features and goals as Slim 3.0. I'm sure this raises a few question about Slim's future roadmap. [...] Is there overlap between Slim and Lumen? Of course. They both have similar goals and solve similar problems. There are also differences.

He talks about some of the current work being done on version 3.0 of Slim, the PSR-7 support it offers and some of the differences between Slim and Lumen. He points out two main ones: that Slim has fewer dependencies and that it is a supporter of the PSR-7 HTTP interoperability standard. Josh talks about why you might choose Lumen over Slim and that, in the end, he welcomes alternative microframeworks and challenges the Slim community to help consistently improve Slim and its place in the community.

0 comments voice your opinion now!
slimframework slim lumen respond opinion framework laravel microframework

Link: http://www.slimframework.com/2015/04/14/lumen.html

Pádraic Brady:
Introduction to Humbug A Mutation Testing Framework for PHP
April 08, 2015 @ 09:34:13

While he's mentioned it in other posts to his site, Pádraic Brady has officially posted an Introduction to Humbug to his site today. Humbug is a mutation testing framework that lets you determine the actual effectiveness of your unit tests through "mutation testing" methods.

You may already be familiar with the concept. In Mutation Testing, defects which emulate simple programmer errors are introduced into source code (your canonical code is untouched) and the relevant unit tests are run to see if they notice the defect. The more defects that are noticed, the more effective the test suite is presumed to be. The methodology relies on the theory that a quantity of relatively simple defects, either in isolation or combined, provide as much useful information as would a series of more complex defects.

He talks about the differences between mutation testing and the more traditional code coverage metrics. He points out that code coverage, while a decent high-level metric, should never be used as a quality metric. Using Humbug allows you to determine the real effectiveness and "coverage" of what you're testing. He then gets into how to use the tool, outlining:

  • Installation of the library as a phar
  • Generating a configuration file
  • Execute the command to run your tests (to ensure they're passing) and execute the mutation testing

The execution is broken into several stages: executing your tests for passing, breaking up the source into tokens to determine mutability, replacement of content with mutations in a temporary version of the source and a final execution of the test suite to determine the mutation results. He includes some example output from the tool on a moderately large codebase and how to interpret these results. He ends the post talking about the logs that Humbug generates, the overall performance of the tool and an experimental feature that's in the works called "Incremental Analysis".

0 comments voice your opinion now!
humbug mutation testing framework tool library introduction example

Link: http://blog.astrumfutura.com/2015/04/introduction-to-humbug-a-mutation-testing-framework-for-php/

Rob Allen:
Logging errors in Slim 3
April 07, 2015 @ 10:57:36

Rob Allen continues his posts looking at the use of the Slim PHP framework with this new post about logging errors.

Slim Framework 3 is being actively developed at the moment and has a number of changes in it, including the use of the Pimple DI container and an overhaul of pretty much everything else! In this post, I'm going to look at error handling. The default error handler in Slim 3 is SlimHandlersError. It's fairly simple and renders the error quite nicely, setting the HTTP status to 500. I want to log these errors via monolog.

He includes the code to first set up the Monolog logger and inject it into the dependency injection container. Then he creates a custom error handler that extends the Slim handler but overrides the __invoke method to log the message in addition to displaying it. Finally he registers the error handler into the DI container as the "errorHandler" instance so Pimple correctly knows how to throw errors.

0 comments voice your opinion now!
log error slim framework monolog custom errorhandler tutorial

Link: http://akrabat.com/logging-errors-in-slim-3/

SitePoint PHP Blog:
Laravel 4 to Laravel 5 - The Simple Upgrade Guide
April 06, 2015 @ 11:49:51

The SitePoint PHP blog has posted a guide to help you upgrade from a Laravel 4 based application to the latest version, Laravel 5. Author Younes Rafie walks you through each step of the process, providing sample code and explanations of the changes along the way.

Laravel 5 is already out, but the fear of change is taking everyone. We keep hearing people complaining about some radical changes. Like, why this new folder structure? Will my application break if I do a composer update? In this article, we're going to look at how to migrate your existing Laravel 4 application to Laravel 5 and understand the new folder structure.

he starts by helping you get Larave 5 installed and working via Composer. He then makes updates to some configuration files for his sample application (it hooks into the Google Analytics API) including the Analytics connection information. He includes changes to the route handling and moving some files around to their new locations. He also mentions the re-installation of the Illuminate/Html package as it's no longer included in the base release.

0 comments voice your opinion now!
laravel4 laravel5 upgrade guide tutorial framework

Link: http://www.sitepoint.com/laravel-4-laravel-5-simple-upgrade-guide/

Reddit.com:
Frameworks, how are requests per second important?
April 03, 2015 @ 10:37:50

In this recent post to the /r/php subreddit on Reddit.com, AfterNite wonders why it's important to measure the "requests per second" that a framework handles (or if it is at all).

I have been using Laravel 4 for a while now. Recently I saw a benchmark here (http://blog.a-way-out.net/blog/2015/03/27/php-framework-benchmark/). There are many frameworks that were compared and compared to phalcon the requests per second seem crappy. Hearing that zend is powerful and primarily aimed at businesses how is it that a few hundred requests per second is good? I can't wrap my head around why people are using frameworks such as Zend, Laravel 5 and Symfony.

The comments on the post mention things like:

  • taking benchmarks "with a grain of salt"
  • How it relates to optimization
  • Wondering what the mean requests-per-second would be
  • What effect a datasource has on performance
  • The relation between performance and ease of use

You can read the full post or leave an opinion of your own on the full post.

0 comments voice your opinion now!
requestspersecond performance optimization framework opinion reddit

Link: http://www.reddit.com/r/PHP/comments/313nc8/frameworks_how_are_requests_per_second_important/

Developer Drive:
40+ tools for writing better PHP
April 01, 2015 @ 10:56:43

The Developer Drive site has posted their top 40+ list of libraries and tools that can help developers write better PHP. Their selections range from templating libraries to request handling and even testing tools.

There are scads of PHP tools available over the internet for php developers, but finding an appropriate PHP tool is quite an arduous task and demands effort and time. Today we've collected 45 handy PHP development tools for developers.

Included in their list are tools such as:

Several of the libraries can be installed via Composer (another tool in their list) but other items are stand-alone software that would need to be set up outside of the application.

0 comments voice your opinion now!
tools list top40 libraries software testing template framework ide server

Link: http://www.developerdrive.com/2015/03/40-tools-for-writing-better-php/

SitePoint PHP Blog:
Best PHP Framework for 2015 - SitePoint Survey Results
March 30, 2015 @ 11:59:00

In a new post to the SitePoint PHP blog editor Bruno Skvorc shares the results of the PHP framework survey the site posted a month back. In it they asked developers for their opinions on favorite frameworks (not necessarily the one they use, but their own personal opinion). For anyone that's been keeping up with the current state of PHP frameworks, the results aren't all that surprising though.

One month ago, we started the annual SitePoint framework popularity survey. Now that the month has expired, it's time to look at the results and to distribute the prizes. The response was a whopping ~7800 entries, far more than any other survey we've held so far, and even after filtering out invalid entries we end up with a formidable number of valid participants.

According to the results the most popular framework, by far, was Laravel. Coming in second was Symfony2 and third the Nette framework. They did ask for different opinions for personal versus business choices but the results track the same between the two. He also splits out the data into the top results by country and by the age of the people who responded.

He finishes off the post with some of his own thoughts on why Laravel was the clear winner with only some of it having to do with the framework itself. He points out the related projects, "near perfect documentation" and other things (like Laravel's own subreddit). He suggests that, even though open source and "free" tend to go together, spending money and a good amount of time on a project can help ensure it succeeds. He also offers some practical advice for those wanting to give their project a boost:

Spread the word, analyze solutions from other people, discuss them. Be open, be transparent. Have an official blog, get a StackOverflow tag, justify your decisions, get in touch with popular publications which can help promote your framework if you present it well enough.
0 comments voice your opinion now!
framework survey results opinion popularity 2015 laravel symfony2 nette

Link: http://www.sitepoint.com/best-php-framework-2015-sitepoint-survey-results/


Community Events

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


community interview opinion application series api symfony2 example performance podcast library version release php7 conference voicesoftheelephpant framework introduction laravel extension

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