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

PMG Blog:
Symfony from Scratch
May 21, 2015 @ 08:41:15

In the latest post to the PMG blog Chris Davis shows us how to create a Symfony application from scratch, that is without using the Symfony Standard repository/skeleton application.

The end goal here is to have an application that will send a simple Hello World message. So we're going to cover the core framework stuff, but save things like templating, database access, ORMs, and forms for later. The goal here to see how to scaffold a Symfony app to better understand why symfony standard does what it does and where to deviate. We'll end up with an app that uses the Symfony 3 directory structure.

Starting with the smallest "composer.json" he can (just symfony/symfony) he walks through the creation of the application one step at a time:

  • The Application Kernel
  • Handling Web Requests
  • What's in a Bundle?
  • Stepping into Configuration
  • AppBundle
  • Hello, World

The end result is a simple page outputting a "Hello, World" message, but it gives you a good foundation to work from and understanding of the simplest pieces needed to make a Symfony application.

0 comments voice your opinion now!
symfony scratch introduction simple application standard

Link: https://www.pmg.com/blog/symfony-from-scratch/

SitePoint PHP Blog:
Displaying Youtube Videos in PHP
May 14, 2015 @ 11:49:41

The SitePoint PHP blog has a new post today showing you how to display YouTube videos inside your application as a part of this series. The series is using Laravel as a framework to create the application.

In this two-part article, we're going to learn how to work with version 3 of the Youtube API and we'll build a demo along the way. [...] We're going to build a demo that lets the user browse popular videos on Youtube, search for a video, browse videos by categories, and select a video to watch. I will be using Laravel 5 as my framework of choice, and Vagrant for my development environment.

The end result will show a set of video thumbnails related to the selected category. He walks you through the steps to get the application set up and running including the configuration of your Google API connection. He creates a login controller to allow users to log in with their Google credentials and the callback to handle the API response. From there he makes the YouTube service provider, the "video list" endpoint (and view) and a single video page with an embedded player.

0 comments voice your opinion now!
tutorial youtube api google integration laravel vagrant application

Link: http://www.sitepoint.com/displaying-youtube-videos-php/

Osedea Blog:
Speeding up your ZF2 application
May 11, 2015 @ 16:30:36

On the Osedea blog today there's a new post showing you a few ways you can speed up your Zend Framework 2 application with a few easy code changes.

After about a year developing a Zend Framework 2 application, we decided it was time to do some optimizations. Page load times were up to several seconds on our bigger pages, and none of our pages were loading in under 2 seconds. We took a few days to profile our application and scour the various ZF2 articles out there to see what could be done to reduce the load times. We found some pretty obvious causes as well as a few inconspicuous ones. Here's a brief list of our findings, along with some steps on how to improve your ZF2 applications.

Their list includes updates around:

  • Standard vs Classmap Autoloading
  • Event Listeners
  • Making your Module.php "skinny"
  • Cache Settings
  • Session Write Close

Each tip includes a bit of code showing what will need to be changed, making it easy to drop them in and make your application nice and speedy.

0 comments voice your opinion now!
zendframework2 application speed performance

Link: http://blog.osedea.com/2015/05/11/speeding-up-your-zf2-application/

Vincent Composieux:
Run a Symfony application using Docker and docker-compose (English)
April 30, 2015 @ 10:53:48

Vincent Composieux has put together a new tutorial showing you how to get a Symfony2 application up and running inside of a Docker virtual machine for development and testing.

Why boot a full virtual machine when you can only run Docker containers of what you need to develop your Symfony applications ? This is one question asked by Jeremy Derusse at his "Docker dans le développement l'intégration continue" talk during Symfony Live Paris 2015. Those slides are really interesting, I invite you to take a look. They demonstrate the power of Docker and docker-compose but are waiting for practice in order to well understand. So I enjoyed a rainy week-end for further study!

He then outlines the components needed for a simple Symfony2 application: Nginx, PHP (well, PHP-FPM), MySQL and, of course, the code for the application. He includes the full contents for the "docker-compose.yml" configuration file to generate this Docker instance. He walks through each of the components it requires and talks about what they contain and how to define each of them as an image. Following this, he creates the containers with a "docker build" and brings it all up and working with one "docker up" command. He also includes a few other helpful commands for getting memory/CPU usage as well as removing all containers and images with a single command.

0 comments voice your opinion now!
symfony2 application docker tutorial dockercompose nginx mysql phpfpm

Link: http://vincent.composieux.fr/article/run-a-symfony-application-using-docker-and-docker-compose

Luciano Mammino:
Developing a web application with Lumen and MySql
April 27, 2015 @ 08:24:09

Luciano Mammino has a tutorial posted to his site showing you how to create a Lumen application that ties into a MySQL database from start to finish. It's a simple "display a famous quote" application, but it shows the full process you'll need to follow to hook it all together.

Lumen is a new Php micro-framework developed by Taylor Otwell, the same author of the famous Laravel framework. I wanted to give it a try and I am here to share my experimentations. I am not an expert of Lumen (yet), but I think one of the best characteristics of this framework is that it makes really really easy to bootstrap a new project. So to prove this, we will now build a fully functional app backed by a MySql database in less than 30 minutes. Are you ready to start?

His goal is a create a simple application that displays a quote, "randomized" based on the day. He shows you how to set up a new Lumen project, configure the database and create a migration to create the table in MySQL. He also includes the code for the data seeder and the main application routing (just two routes). Finally, he includes the output template and the CSS needed to make the end result look as expected.

0 comments voice your opinion now!
lumen tutorial microframework mysql famous quote application

Link: http://loige.co/developing-a-web-application-with-lumen-and-mysql/

DigitalOcean Community Blog:
Horizontally Scaling PHP Applications A Practical Overview
April 24, 2015 @ 13:06:49

On the Digital Ocean blog there's a new post with a "practical overview" of how to effectively scale PHP applications, specifically as it relates to horizontal scaling not vertical.

Shipping a website or application to production has its own challenges, but when it gets the right traction, it's a great accomplishment. It always feels good to see the visitor numbers going up, doesn't it? Except, of course, when your traffic increases so much that it crashes your little LAMP stack. [...] But fear not! There are ways to make your PHP application much more reliable and consistent. If the term scalability crossed your mind, you've got the right idea.

The article starts with a brief overview of what scalability is and the main difference between horizontal and vertical scaling (scaling out vs scaling up). They then get into a bit more detail about what horizontal scaling is and how it commonly works in relation to the average PHP application (complete with diagrams). They also talk about some things you can do inside your code to help make things flow a bit more smoothly including decoupling between services and user session/file consistency measures. There's also a bit at the end about load balancing but as that depends a good bit on what technology you're using and the actual load, they just provide an overview and some links to other articles and tutorials with more information.

0 comments voice your opinion now!
scaling application horizontal vertical decouple consistency loadbalance

Link: https://www.digitalocean.com/company/blog/horizontally-scaling-php-applications/

Scotch.io:
Build a Time Tracker with Laravel 5 and AngularJS - Part 2
April 22, 2015 @ 09:38:53

Scotch.io has posted the second part of their series today showing you how to build a simple time tracking application with Laravel and AngularJS. In this latest part of the series he finishes the application and connect the two pieces.

This is the second of a two-part series on using Laravel 5 and AngularJS together to build a simple time tracking application. If you've gone through part 1, you'll have seen that we put together the front-end first and used a simple JSON file with some mocked-up data to test with. We left off with the ability to add new time entries and have the total time from all of them display on the side. We didn't include any way to edit or delete the time entries, and of course there was no persistence to a database. In this part we will complete the application so that the time entries get stored in a database and our Angular front-end and Laravel backend work together to create, read, update and delete from it.

He starts by helping you get a Laravel application up and running (time-tracker-2), set up the database and modify the configuration to point to the database location. He helps you run the migrations to set up the database tables and generate the related model code. Next up he shows how to inject the seed data, setting up the main index view and adding in routes for the Angular code to access. The rest of the article is just about as detailed and covers steps to:

  • View all the Available Routes
  • Return all Time Entries
  • Return All Users
  • Updating the front-end
  • Setting up the users list
  • Creating time entries
  • Updating time entries
  • Deleting time entires

Finally he wraps it all up with a few possible things that could be done to improve the application, both simple and a bit more complex. He challenges you the developer to implement those features.

0 comments voice your opinion now!
tutorial angularjs laravel series part2 time tracker application

Link: https://scotch.io/tutorials/build-a-time-tracker-with-laravel-5-and-angularjs-part-2

Rob Allen:
Using ZendConfig with a Slim app
April 21, 2015 @ 09:11:31

Rob Allen has a quick post to his site continuing his theme of Slim framework-related posts with this new post showing how to use the ZendConfig module with a Slim application.

Sometimes you need more configuration flexibility for your application than a single array. In these situations, I use the ZendConfig component which I install via composer: composer require "zendframework/zend-config". This will install the ZendConfig component, along with its dependency ZendStdlib.

He shows how to use the glob function to have the component load a set of configuration files and the order they'd load in. He also points out that the ZendConfig component supports other formats including YAML and JSON data. He also includes a code example showing how you can load multiple formats at the same time (ex. some .php files and some .yml files with one call).

0 comments voice your opinion now!
slim application zendframework2 config component zendconfig tutorial introduction

Link: http://akrabat.com/using-zendconfig-with-a-slim-application/

Semaphore CI Blog:
Deploying PHP Applications with Rocketeer and Docker
April 10, 2015 @ 11:52:08

The Semaphore CI blog has a new tutorial showing you how to use Rocketeer and Docker to deploy PHP applications, pushing the resulting application out into a Docker container.

Deploying web applications is an integral part of modern web development. From this need, many tools have emerged to make the process as easy as possible. Rocketeer is heavily influenced by Capistrano and Laravel's principle of elegant code. It strives to make the deployment process accessible for everyone. [...] We'll deploy a fresh Laravel installation to a running Docker instance. This enables us to focus on setting up and using Rocketeer while the Docker instance will act as an application server requiring zero configuration and a great environment to experiment with.

They start with a list of requirements you'll need before getting started including Docker running on the server and Composer. They help you get Rocketeer installed and using the Docker command line too to set up and configure the server. Next up they show you how to use the "rocketeer" command to configure the Laravel application to be deployed. Once configured, they show you what updates you'll need to make and, finally, how to run the deployment. They also "dig deeper" and look at the file system setup on the server, stages of deployment, tasks, strategies and plugins.

0 comments voice your opinion now!
tutorial deploy laravel application rocketeer docker instance

Link: https://semaphoreci.com/community/tutorials/deploying-php-applications-with-rocketeer-and-docker

Scotch.io:
Build a Time Tracker with Laravel 5 and AngularJS - Part 1
March 27, 2015 @ 08:49:57

On the Scotch.io site there's a new tutorial showing you how to build a time tracking application with a combination of Laravel and AngularJS. This is the first part of a new series and focuses on the basic principles and getting some of the first parts of the application up and running.

Laravel and AngularJS work great together, but it can be a little tricky to get going at first, especially if you are new to the frameworks. In a previous article, Chris showed you how to make a Single Page Comment App with Laravel and Angular. This tutorial will again bring the two frameworks together as we build out a simple time tracking application.

We'll be going into a lot of detail in this tutorial, so to make things manageable it has been broken into two parts. The first part will focus on getting the front-end setup with AngularJS and the second part on getting the backend setup with Laravel 5.

He starts with an overall look at the application and what functionality it will have. From there he walks you through:

  • Setting up the folder structure
  • Installing dependencies
  • Creating Javascript files
  • Setting up the view
  • Adding extra styling
  • Fetching the time data

He makes use of the Moment.js library to perform some of the time calculations for the difference and total time elapsed. He ends the post by tying up some loose ends with the controller and updating the view with the new calculated time values.

0 comments voice your opinion now!
tutorial laravel angularjs time tracker application series part1

Link: https://scotch.io/tutorials/build-a-time-tracker-with-laravel-5-and-angularjs-part-1


Community Events

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


api conference laravel community library install application composer interview release performance example configure symfony2 introduction podcast framework opinion series php7

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