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

Reddit.com:
Why experienced developers consider Laravel as a poorly designed framework?
July 03, 2015 @ 11:41:03

There's a huge thread that's been going on over in the /r/php subreddit on Reddit.com with opinions on why experienced developers consider Laravel as a poorly designed framework.

I have been developing in Laravel and I loved it. My work colleagues that have been developing for over 10 years (I have 2 years experience) say that Laravel is maybe fast to develop and easy to understand but its only because it is poorly designed. He is strongly Symfony orientated and as per his instructions for past couple of months I have been learning Symfony and I have just finished a deployment of my first website. I miss Laravel ways so much.

Currently there's over 200 responses to the question with a wide range of opinions, everything from support of Laravel and its ways to the other side supporting Symfony and its structure. As is par for the course, there's also a share of "troll" comments in the mix, so be sure as you're reading through them to weed those out. There's also some interesting and enlightening things about Laravel, its structure and what it has to offer that those that may not be familiar with it could learn.

0 comments voice your opinion now!
reddit rphp experienced developer laravel poorly designed framework opinion

Link: https://www.reddit.com/r/PHP/comments/3bmclk/why_experienced_developers_consider_laravel_as_a/

Symfony Finland Blog:
PHP and Symfony Structure, Stability and Flexibility
July 03, 2015 @ 09:12:45

On the Symfony Finland blog they've posted a look at Symfony's past, present and future in terms of its structure and goals of stability and flexibility. This also includes some of the origins of PHP itself and how it evolved to the stage where creating framework made sense.

I like to think of modern PHP frameworks as glue to put together components to form something that is more than the sum of it's parts. [...] The Symfony Framework is a standard way (and framework code) to create applications using components. The application is always built with a specific structure, which allows code reuse of complete functionalities (Bundles in Symfony lingo) across projects. If you build using a collection of components, you'll need to invest time in learning how that software has decided to use the available components.

He talks more about the idea of components and how they make up a greater whole (like Symfony) and how they relate to the idea of "bundles". He then looks forward to the future of the framework, its long-term support and its work towards being fully PHP7 compatible.

The combination of the PHP language at 20 years and the Symfony framework at 10 years offers a stable platform with flexibility to adapt and grow in the future.
0 comments voice your opinion now!
symfony framework past present future component bundle stability structure flexibility

Link: https://www.symfony.fi/entry/php-and-symfony-structure-stability-and-flexibility

Rob Allen:
First beta of Slim Framework 3
July 03, 2015 @ 08:03:18

Rob Allen has a new post about the tagging of the first beta of Slim Framework v3, the popular PHP microframework's latest version. In it he details a few of the major changes and requests help testing.

Last night, I tagged beta 1 of Slim Framework 3! This is a significant upgrade to v2 with a number of changes that you can read on the Slim blog. For me, the two key features that I'm most excited about are: PSR-7 support, [...and a] dependency injection container with container-interop compliance. [...] There's lots of other changes and we believe we have kept to the key tenants of Slim, keeping it focussed as a micro-framework suitable for building any application that you want to build.

He includes everything you'll need to test this newly tagged release with the help of his skeleton application. He also links to the new documentation that's a work in progress to replace the current set of docs. You can find more information on the full list of changes over on the Slim blog.

0 comments voice your opinion now!
slim microframework framework slim3 beta tagged testing documentation

Link: http://akrabat.com/first-beta-of-slim-framework-3/

DigitalOcean Community Blog:
How To Deploy a Basic PHP Application using Ansible, Part2
June 26, 2015 @ 09:53:33

Digital Ocean has continued their series about deploying "advanced PHP applications" on an Ubuntu instance via Ansible in part two of the series. If you missed the first part of the series, you can check it out here.

This tutorial is the second in a series about deploying PHP applications using Ansible on Ubuntu 14.04. The first tutorial covers the basic steps for deploying an application, and is a starting point for the steps outlined in this tutorial.

In this tutorial we will cover setting up SSH keys to support code deployment/publishing tools, configuring the system firewall, provisioning and configuring the database (including the password!), and setting up task schedulers (crons) and queue daemons. The goal at the end of this tutorial is for you to have a fully working PHP application server with the aforementioned advanced configuration.

You'll need to finish the first tutorial if you want to follow along here. They pick up where they left off to finish the whole process, starting with a switch to a more advanced example repository. They modify the Ansible configuration and run the playbook to update the host. From there they break things down into several more steps:

  • Setting up SSH Keys for Deployment
  • Configuring the Firewall
  • Installing the MySQL Packages
  • Setting up the MySQL Database
  • Configuring the PHP Application for the Database
  • Migrating the Database
  • Configuring cron Tasks
  • Configuring the Queue Daemon

While a good bit of these steps relate to something Laravel needs (what they use for the sample application), it's still a good overview of the wide range of things you can do with Ansible during deployment.

0 comments voice your opinion now!
deploy ansible digitalocean setup tutorial configure laravel framework part2

Link: https://www.digitalocean.com/community/tutorials/how-to-deploy-an-advanced-php-application-using-ansible-on-ubuntu-14-04

Rob Allen:
Accessing services in Slim 3
June 23, 2015 @ 10:51:36

Rob Allen has a new post to his site today showing you how to access services in a Slim 3 application using container injection instead of the previous "getInstance" method.

One of the changes between Slim Framework 2 and 3 is that the application singleton has gone. [...] In general, you didn't need access to $app itself, but rather you wanted access to something that the app knows about, such as a database adapter, or the router for access to the urlFor method to create a URL to a route. With Slim 3, there is no getInstance() on App, so you need to inject the instances of whatever you need where ever you need them.

He shows you how to create a simple Slim dependency injection container (service locator?) and push two kinds of objects in for later reuse. He shows how to reference this container from inside of your routes in both the callable/closure and class contexts. He also includes an example of referencing the same container from inside middleware (again in both the closure and class contexts).

0 comments voice your opinion now!
slim microframework framework slim3 service access container this

Link: http://akrabat.com/accessing-services-in-slim-3/

SitePoint PHP Blog:
Nette Framework First Impressions
June 23, 2015 @ 09:41:33

The SitePoint PHP blog has a new article posted with some first impressions of the Nette framework, a larger but not often talked about PHP framework that showed up in their framework survey results in third place.

SitePoint's PHP channel conducted its annual survey on the most popular framework of 2015 and the results were discussed here. We saw some familiar names: Laravel, Symfony2, Phalcon, Silex, Slim, etc. But wait, what is this: Nette? According to the survey result, it ranked number 3 in both "at Work" and "in Personal Projects", just tailing the two giants: Laravel and Symfony2.

I had never heard of this framework before the survey results got published. A framework so popular is worth looking into. Thus, in this article, we will take a look at Nette, see what it can do and discuss some of the features.

The Nette framework is a "set of decoupled and reusable PHP components" that combine into a complete framework (including templating, error tracing and unit testing integration). He follows along with their Getting Started guide and helps you get a demo application copy up and running (via Composer). He then goes through the project structure, the "Adminer" tool, route handling, controllers/actions and the "Latte" templating engine. He also covers basic security functionality and some other interesting features like the "Tracy" debugger and the use of the integrated unit test functionality.

0 comments voice your opinion now!
nette framework first impression overview demo project tutorial

Link: http://www.sitepoint.com/nette-framework-first-impressions/

NetTuts.com:
Programming With Yii2 Working With Asset Bundles
June 10, 2015 @ 10:42:30

NetTuts.com is back with another part in their "Programming with Yii2" series today. In this new post they focus on asset bundles, pieces of functionality that let you easily manage things like Javascript and CSS files automatically.

In this Programming With Yii2 series, I'm guiding readers in use of the newly upgraded Yii2 Framework for PHP. In this tutorial, I'll show you how to add custom JavaScript and CSS scripts and libraries to your Yii application. Yii uses a concept it calls Asset Bundles to make it easier to manage these resources. For these examples, we'll continue to build on the simple status application from previous tutorials.

They start with an introduction to asset bundles and how to set them up in the framework and the resulting HTML markup to include the involved files. They show you how to create a simple bundle and load it into your application. A screenshot is included showing a result of the inclusion.

0 comments voice your opinion now!
yii2 framework series programming asset bundles javascript csss

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-working-with-asset-bundles--cms-23226

SmartTutorials.com:
Install CakePHP 3 using Composer
June 09, 2015 @ 11:42:03

On the SmartTutorials.com site there's an article posted showing how to install CakePHP 3 with Composer, the popular PHP package management tool.

Installation of CakePHP 3 somewhat tricky/difficult for newbies. I will give you step by step instructions to install CakePHP 3 on your machine successfully, All you need to do is just follow this tutorial.

There's a brief section about requirements needed for the system you're installing it onto. Then they break the process up into a few different steps:

  • Installing Composer if you haven't already
  • Install CakePHP 3 using Composer
  • Setting permissions for the temporary (tmp) directory

While their platform choice for the tutorial is Windows, the instructions mostly apply for linux-based systems. There's a few screenshots sprinkled in to show you what things should look like as you go along.

0 comments voice your opinion now!
cakephp3 framework install composer tutorial

Link: http://www.smarttutorials.net/install-cakephp-3-using-composer/

NetTuts.com:
Programming With Yii2 Timestamp Behavior
May 22, 2015 @ 09:47:33

NetTuts.com has posted the next part of their "Programming with Yii2" tutorial series today. This new tutorial in the series focuses on the use of the timestamp behavior to assign the current date to an object (like for create or update dates).

In this tutorial, we'll explore Timestamp Behaviors, which reduce the amount of code you need to write with each new model for the common operation of creating timestamps for inserts and updates. We'll also dive into the Yii2 source code, examining how a behavior is implemented.

He starts with a brief look at what behaviors are (a reminder for those that may have already read about the sluggable and blameable behaviors). He then gets into the Timestamp behavior specifically and how to apply it to the sample project's "Status" instances. He shows the updates needed for the behavior configuration and rules. He also looks inside the component at the code that makes it up and the "touch" method it provides.

0 comments voice your opinion now!
tutorial timestamp behavior yii2 framework series touch

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-timestamp-behavior--cms-23329

NetTuts.com:
Programming With Yii2 Blameable Behaviors
May 20, 2015 @ 10:33:10

NetTuts.com has continued their series about programming with the Yii2 framework with this new tutorial talking about blamable behaviors. These behaviors can de defined similarly to a common concept in other languages/tools, mixins

In this tutorial, I'll guide you through another of Yii2's interesting behaviors: helping automate the common web development task of assigning created by and updated by user_ids across the models in your web app using DRY coding and Yii2 BlameableBehavior. We'll also create a log that records who updated the Status table for every change made.

In his example he shows the code needed to insert and update these two dates related to users of your system. He shows what kind of updates are needed to support it in your migrations and adding in the support for the BlameableBehavior in the models. He then modifies this example to not only log the latest person to modify a record but a history of IDs in a "status log" table.

0 comments voice your opinion now!
tutorial blameable behaviors programming series yii2 framework

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-blameable-behaviors--cms-23287


Community Events

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


example api composer interview opinion podcast community conference introduction php7 project part2 symfony framework series laravel language yii2 list application

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