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

Jani Hartikainen:
What's the difference between Unit Testing, TDD and BDD?
March 02, 2015 @ 09:16:28

On his site today Jani Hartikainen has a new post helping to demystify some potential confusion around unit testing, test-driven development and behavior-driven development. He's talking about them in the context of Javascript in this case, but the fundamentals transfer to just about any other language, including PHP.

When you're just getting started with automating your JavaScript testing, there's a lot of questions. You'll probably see people talk about unit testing, TDD or Test-Driven Development, and BDD or Behavior-Driven Development. But which one of them is the best approach? Can you use all of them? I've talked to a number of JavaScript developers, and there seems to be some confusion about all this. So, let's take a look at Unit testing, TDD and BDD, and fix some of the common misconceptions about them out there.

For each he provides an overview of this basic concepts and a bit of sample code showing it in action. For TDD (test-driven development) there's not really a way to show it specifically in code as it's more of a practice. Instead he gives a "checklist" to follow when practicing it.

Unit Testing gives you the what. Test-Driven Development gives you the when. Behavior Driven-Development gives you the how. Although you can use each individually, you should combine them for best results as they complement each other very nicely.
0 comments voice your opinion now!
bdd unittest tdd testdrive behaviordriven development introduction

Link: http://codeutopia.net/blog/2015/03/01/unit-testing-tdd-and-bdd/

SitePoint PHP Blog:
Exploring the Cache API in Drupal 8
February 26, 2015 @ 11:41:45

On the SitePoint PHP blog today there's a new tutorial (by Daniel Sipos) talking about the Drupal 8 cache and showing how to use it in an example, caching the latest post data pulled from the Drupal content.

Drupal 8 comes with many improvements over its predecessor we have grown to both love and hate. Next to prominent systems such as Views in core, configuration management or a useful translation service, there are also less known changes but that are equally important to know and use. One such improvement has been the cache API that solves many performance problems we have in Drupal 7.

They start with a basic introduction to the new cache handing and how the caches are separated out into different "bins" rather than all stored in one place. He includes sample code showing how to: save data to the cache, getting information back out and invalidating the cache to be handled by garbage collection. He also covers the cache tags, a feature that allows you to "tag" items across multiple caches and remove/invalidate them all at the same time. He wraps up the post getting into the more practical example showing the caching at work in a controller caching the contents of the posts to the Drupal site.

0 comments voice your opinion now!
drupal cache drupal8 tutorial introduction improvement

Link: http://www.sitepoint.com/exploring-cache-api-drupal-8/

Benjamin Eberlei:
Integrate Symfony and Webpack
February 26, 2015 @ 10:21:40

In his latest entry Benjamin Eberlei shows how he integrated Symfony and Webpack, a tool that makes it simpler to package up multiple assets (like Javascript or CSS files) and reduce them down to combined files, reducing the overhead on page loads.

Asset Management in Symfony2 is handled with the PHP based library Assetic by default, however I have never really connected to this library and at least for me it usually wastes more time than it saves. [...] While researching about React.JS I came across a tool called Webpack which you could compare to Symfony's Assetic. It is primarily focussing on bundling Javascript modules, but you can also ship CSS assets with it.

He talks about some of the main benefits to using the Webpack tool including a built-in web server to serve up the assets and a "hot reload" plugin that refreshes when assets change. He then gets into a more practical example, showing how the tool works with a typical asset structure in a Symfony application. He shows how it uses the internal server to prevent the need for a complete rebuild each time. He also shows how to install and configure it through Symfony and loading the Javascript file in your Twig template. Finally he shows how to run a build, the resulting output and the integration he mentioned with React.js.

0 comments voice your opinion now!
symfony asset webpack tool tutorial introduction configuration install

Link: http://www.whitewashing.de/2015/02/26/integrate_symfony_and_webpack.html

SitePoint PHP Blog:
Introduction to Silex - A Symfony Micro-framework
February 20, 2015 @ 12:31:40

The SitePoint PHP blog has a tutorial posted today introducing you to one of the more popular PHP microframeworks out there, Silex. This new article jumps right in and shows you how to use it.

Silex is a PHP micro-framework based on Symfony components and inspired by the Sinatra Ruby framework. In this article, we are going to get started with the framework and see the how it fits our needs.

He walks you through the installation of Silex (and Twig) through Composer and the creation of the basic folder structure to build the first app. He then gets into talking about how routes are handled, parameters and linking controllers to routes. He also introduces the use of providers and shows how to implement the one for Twig to use in templating the output of the application.

0 comments voice your opinion now!
silex microframework introduction tutorial symfony twig

Link: http://www.sitepoint.com/introduction-silex-symfony-micro-framework/

SitePoint PHP Blog:
Discover Graph Databases with Neo4j and PHP
February 16, 2015 @ 11:49:51

The SitePoint PHP blog has a post today about combining PHP and Neo4j, a popular graph database, and create a simple application.

In this post, we'll be learning about Neo4j, the leading graph database, and ways to use it with PHP. In a followup post, we'll be building a proper graph application powered by Silex. [...] For the newcomers, here is a short introduction to graph databases and Neo4j, apart from the theoretical glance we threw at it last year.

For those not familiar with some of the concepts behind graph databases, they start with a quick introduction. They illustrate the concept of relationships with a few helpful images. They also cover the basics of Cypher, the language used in Neo4j database queries. They then show how to get the Neoxygen components installed to talk with the Neo4j database (via an HTTP API) and configuring a basic connection. The remainder of the post shows how to insert data into the database, including relationships, and pulling that information back out via PHP.

0 comments voice your opinion now!
graph database neo4j tutorial introduction neoxygen series part1

Link: http://www.sitepoint.com/discover-graph-databases-neo4j-php/

Laracasts.com:
Laravel 5 Fundamentals (Screencast Tutorial Series)
February 16, 2015 @ 09:47:41

The Laracasts site has put together a series of videos they're currently offering for free to help you get started with the latest release of the Laravel framework, version 5.

The video series covers things like:

  • Virtual Machines and Homestead
  • A Gentle Introduction to Routing, Controllers, and Views
  • Eloquent 101
  • Dates, Mutators and Scopes
  • Eloquent Relationships
  • Route Model Binding
  • Syncing Tags

Check out the full list for a great introduction to the new features and offerings of this latest Laravel version.

0 comments voice your opinion now!
screencast tutorial series laravel5 video introduction

Link: https://laracasts.com/series/laravel-5-fundamentals

Phil Sturgeon:
Meet the League
February 12, 2015 @ 10:56:17

Phil Sturgeon has a new post to his site introducing a group that you may have heard about but aren't exactly familiar with who makes it up - the members of the League of Extraordinary PHP Packages (or just "The League").

A few months ago I wrote What is The League of Extraordinary Packages?, and it was clearly written in a defensive tone. I wanted to explain a few things about the League because people were attacking it in weird ways. We sat down as a group and discussed a plan for 2015 to solve this. A lot of cool ideas came up, the first of which was to make a Leadership Group. These people have been doing amazing things in the PHP community at large, and have been doing awesome things in the League too. This is an introduction to them, and a thank you for everything they do.

He introduces five members of The League and talks about which project they're associated with:

There's several other packages besides those mentioned here that make up the League's offerings, so be sure to take a look at the list and see if there's anything that might benefit you or your application.

0 comments voice your opinion now!
theleague meet introduction packages theleagueofextraordinarypackages members

Link: https://philsturgeon.uk/api/2015/02/11/meet-the-league/

SitePoint PHP Blog:
Introducing Pagoda Box - a PaaS just for PHP
February 10, 2015 @ 11:56:01

In the most recent post to the SitePoint PHP blog Aleksander Koko has written up a summary of using Pagoda Box for PHP applications. Pagoda Box is a platform-as-a-service hosting provider that makes automated deployment and hosting much simpler.

In this article, we'll take a look at Pagoda Box, another PaaS (Platform as a Service). If you have used other PaaS in previous projects, Pagoda Box is similar to Heroku. Pagoda Box is PHP only (for now) and has a well defined architecture to start developing with PHP. Everything in PB is a component. The database is a component, the webservers, workers, cron jobs and the caching. Having such an architecture doesn't only give you ease in development but also a control over money usage. This post will be a quick overview of this platform. We will set up a framework and look at a list of pros and cons, comparing it to Heroku.

He starts with a quick overview of the service and the features it offers (including databases, caching and the already mentioned cron and worker handling). He then gets into the creation of a sample application (using Slim) and the full deployment process. He introduces the concept of the "boxfile" before getting into his "pro" and "con" list as compared to Heroku.

0 comments voice your opinion now!
pagodabox paas deploy introduction hosting

Link: http://www.sitepoint.com/introducing-pagoda-box-paas-just-php/

Laravel News:
Debug Your App with the Laravel Debugbar
February 10, 2015 @ 09:34:12

The Laravel News site has a post introducing a tool you can use in your Laravel applications to help debug issues and performance, the Laravel Debug Bar.

The Laravel Debugbar by Barry vd. Heuvel is a package that allows you to quickly and easily keep tabs on your application during development. With a simple installation and powerful features the Debugbar package is one of the cornerstone packages for Laravel. The debugbar is already updated for Laravel 5 and I wanted to show you all the great features it includes.

The post includes instructions to get the debugbar installed (via Composer) and add it to your Laravel providers list. They walk through the basics of its features and screenshots of each. He also links you to the project documentation to provide more detail on each of the features.

0 comments voice your opinion now!
laravel debug debugbar toolbar library provider tutorial introduction

Link: https://laravel-news.com/2015/02/laravel-debugbar/

SitePoint PHP Blog:
CMS Content Organization Structures Trees vs Facets vs Tags
February 05, 2015 @ 11:38:35

In the latest post to the SitePoint PHP blog Lukas Smith takes a look at content management systems comparing trees versus facets versus tags in content organization.

For several years I have been interested in content repositories as a key aspect of modern CMS. With "modern", I mean CMS that are not just "page management systems" but CMS that actually manage content, thereby enabling authors to reuse their content on different devices and even different applications. But when evaluating [prismic.io and contentful.com], I noticed a surprising trend: they do not leverage trees, neither as a native storage concept nor as a visualization concept. Instead, they for the most part rely on flat structures with tagging. My gut feeling was telling me that this was a mistake, especially when managing larger content repositories. At the same time I wondered: "Am I just a dinosaur that is missing the ark?".

He starts with an introduction to the concepts of trees, facets and tags and starts in on the advantages and disadvantages of each. For each topic he shares a brief summary of what they are and a screenshot showing how they could be visualized. He finishes the post with a "tl;dr;" summarizing the points made for those wanting the basics.

0 comments voice your opinion now!
cms content organization structure tree facet tag introduction

Link: http://www.sitepoint.com/cms-content-organization-structures-trees-vs-facets-vs-tags/


Community Events

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


extension community introduction api middleware opinion unittest library release voicesoftheelephpant language laravel laravel5 podcast series wordpress interview framework development conference

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