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

SitePoint WordPress Blog:
The WordPress Plugin Boilerplate Part 2 Developing a Plugin
June 30, 2015 @ 10:07:50

The SitePoint WordPress blog has posted the second part of their series covering the creation of a WordPress plugin with the help of the WordPress Plugin Boilerplate. In this latest article they build on the first part of the series and start in on the actual plugin development.

In the first part of my series, an introduction to the WordPress Plugin Boilerplate, we looked at how the code is organised within the Boilerplate. To continue with this series, we'll apply what we've learnt previously to build a real working plugin. We are going to take a look at how quickly we can get our plugin up and running using the Boilerplate code, with as little work as possible. This article will focus on creating and activating the plugin, as well as developing the admin facing functionality of the plugin.

They show you how to create a simple "time since posted" plugin with a few customizations available. They show how to use the Boilerplate generator to set up the basic plugin file structure and installing it on your WordPress application. From there they show you how to create a simple "Settings" page for the plugin and making it work via the functionality Boilerplate offers. The post then shows how to register the plugin, populate the options page and saving the changes the user makes.

0 comments voice your opinion now!
wordpress boilerplate plugin generator tutorial development lastposted

Link: http://www.sitepoint.com/wordpress-plugin-boilerplate-part-2-developing-a-plugin/

SitePoint PHP Blog:
Building a Custom Twig Filter the TDD Way
June 08, 2015 @ 13:40:18

The SitePoint PHP blog has a new tutorial posted showing you how to create your own Twig template following a TDD (test-driven development) mentality.

Twig is a powerful, yet easy to master template engine. It is also my personal favorite as all my web development is based on either Symfony or Silex. Apart from its core syntax ({{ ... }} and {% ... %}), Twig has built-in support for various filters. A filter is like a "converter". It receives certain original data (a string, a number, a date, etc) and by applying a conversion, outputs the data in a new form (as a string, a number, a date, etc).

He starts with a brief introduction to what filters in Twig are and some simple ways to use them. From there he gets into building a custom filter, starting with the tests first (hence the test-driven design). He walks you through the creation of a filter that turns times into relative strings, like "Just now" or "Within an hour". He shows how to make the extension classes and integrate it into a Symfony application.

0 comments voice your opinion now!
twig filter tutorial custom timediff extension tdd testdriven development

Link: http://www.sitepoint.com/building-custom-twig-filter-tdd-way/

Fortrabbit.com:
10 Pillars of Modern PHP Development
June 04, 2015 @ 08:27:50

On the Fortrabbit.com blog today they have a post where they share what they see as the 10 Pillars of PHP Development. It's a set of ten things they see as the most important to consider in a developer's work.

For most of us PHP developers writing applications now compared to ten or so years ago is quite a different endeavor. [...] This has changed in recent years. Classical web sites are becoming more and more the domain of specialized SaaS. [...] So web developers changed themselves by specializing and concentrating on what cannot be automated so easily: web applications. Along with this came a new mindset on how PHP development should be done and what tools should be used.

Their list of ten includes both generic topics (with a few subtopics for explanation) and specific technical items like:

  • Code management
  • Tests
  • Dependencies and modularization
  • Runtime data
  • Deployment

Check out the rest of the post for other "pillars" in their list and explanations for each.

0 comments voice your opinion now!
top10 list pillars topics focus application development

Link: http://blog.fortrabbit.com/10-pillars-php-dev

Henrik Warne:
Lessons Learned in Software Development
April 29, 2015 @ 12:52:04

In this recent post to his site Henrik Warne has shared a list of advice around software development and some good practices he's picked up along the way.

Here is my list of heuristics and rules of thumb for software development that I have found useful over the years.

His list includes several points related to a few main categories:

  • Development
  • Troubleshooting
  • Cooperation (personal, not code)
  • Other Miscellaneous Tips

Each main topic has a few sub-topics and each of those includes a brief description (with twenty-two tips in the list overall). There's some great advice in the list as well as some good contributions in the comments, so be sure to read through those too.

0 comments voice your opinion now!
lessons learned software development advice tips development troubleshooting cooperation

Link: http://henrikwarne.com/2015/04/16/lessons-learned-in-software-development/

SitePoint PHP Blog:
First Look at Platform.sh - a Development and Deployment SaaS
March 23, 2015 @ 11:24:36

In this latest post to the SitePoint PHP blog Chris Ward takes a "first look" at the Platform.sh development and deployment service.

Not so long ago, many of us were satisfied handling deployment of our projects by uploading files via FTP to a web server. [...] The old methods for deploying became unstable, unreliable and (generally) untrusted. [...] So was born a new wave of tools, services and workflows designed to simplify the process of deploying complex web applications, along with a plethora of accompanying commercial services. Generally, they offer an integrated toolset for version control, hosting, performance and security at a competitive price. Platform.sh is a newer player on the market, built by the team at Commerce Guys, who are better known for their Drupal eCommerce solutions.

He talks about some of the requirements for using the service (including Drush, the Drupal command line tool) and how to get started with a new project. He shows how to get the codebase with their CLI tool, pushing SQL data up to the instance, and starting in on some development work. He shows how to configure the modules you want to use and adding some additional content to the data. He also covers some of the other features of Platform.sh including: performance and profiling tools and integration with Redis, Solr and the EntityCache/AuthCache tools.

0 comments voice your opinion now!
platformsh drupal deployment development platform saas introduction

Link: http://www.sitepoint.com/first-look-platform-sh-development-deployment-saas/

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/

Laravel News:
Homestead Now With Blackfire Support
February 27, 2015 @ 10:05:47

As is mentioned in this new post to the Laravel News site, the Homestead development environment now comes with support for the Blackfire.io profiler.

Blackfire Profiler by SensioLabs automatically gathers data about your code's execution, such as RAM, CPU time, and disk I/O. Homestead makes it a breeze to use this profiler for your own applications. All of the proper packages have already been installed on your Homestead box, you simply need to set a Blackfire ID and token in your Homestead.yaml file

With the configuration set up, the only installation the user needs to make is setting up the companion extension (Chrome) for your browser.

0 comments voice your opinion now!
blackfire support laravel homestead development environment performance

Link: https://laravel-news.com/2015/02/homestead-now-with-blackfire-support/

AWS Development Blog:
DynamoDB JSON and Array Marshaling for PHP
February 04, 2015 @ 10:51:30

In the latest post to the AWS PHP Development blog Jeremy Lindblom looks at a new feature of their PHP SDK that allows for more flexibility (and easier handling) when using DynamoDB for document storage in storing more complex data.

Back in October of 2014, Amazon DynamoDB added support for new data types, including the map (M) and list (L) types. These new types, along with some API updates, make it possible to store more complex, multilevel data, and use DynamoDB for document storage.

He talks about a new class thats been added to help work with the DynamoDB storage, the DynamoDb Marshaler (in version >= 2.2.7) that handles the push and pull of the JSON document data directly from the storage, reducing the need to perform the operation manually. He includes code examples of its use and JSON examples of what results are returned on a get request. He also shows how to use it with a native PHP array, translating it with help from the Marshaler and the "marshalItem" method.

0 comments voice your opinion now!
aws development sdk amazon dynamodb json storage marshaler

Link: http://blogs.aws.amazon.com/php/post/Tx3QE1CEXG8QG1Z/DynamoDB-JSON-and-Array-Marshaling-for-PHP

Three Devs & A Maybe Podcast:
Episode #56 The SOLID Podcast
January 29, 2015 @ 12:20:03

In the latest show from the Three Devs & A Maybe podcast hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann talk about a wide range of topics with a focus on the SOLID development principles.

This week we have a three developer podcast with discussion on a host of topics. We kick off with how Fraser has enjoyed building his first bonus slot game, written entirely in JavaScript and HTML5. Preprocessors are a huge part of the JavaScript ecosystem at this time, with so many to choose from we discuss a couple of the more popular ones. This leads on to Photoshop discussion, ReactJS, the cool features present in ES6 and how you can use them today with transpilers. Following this we move on to the SOLID principles, the overuse of inheritance, technical debt and the concept of Over-DRY vs. Software Value. This then takes us on to a strange 'rubber duck' example Edd conjured up to help try and explain the Liskov substitution and Interface segregation principles. Finally, we discuss Edd's media server setup and how he has got it to a staged that he is finally happy with it.

Other topics include things like:

You can listen to the latest show either through the in-page audio player or by downloading the mp3 of the episode. Also, be sure to subscribe to their feed of you enjoy the show!

0 comments voice your opinion now!
threedevsandamaybe podcast ep56 solid development principles

Link: http://threedevsandamaybe.com/the-solid-podcast/

SitePoint PHP Blog:
Basic TDD in Your New PHP Package
January 28, 2015 @ 12:27:17

The SitePoint PHP blog continues their "How to Build Your Own PHP Package" series with their latest post (part two of the series) covering the use of test-driven development while working on the package code.

In part 1, we set up our development environment, baked in some rules as inherited from The League, and created two sample but useless classes - Diffbot and DiffbotException. In this part, we'll get started with Test Driven Development.

He starts by briefly introducing PHPUnit, a PHP-based unit testing tool, and how to use it to generate the HTML version of the code coverage report. He helps you define a good phpunit.xml configuration file and how to execute a first sample test (code provided) from inside PHPStorm. From there he adds one some more complex testing of exception handling and checking the class types. With this foundation, he moves into the test-driven development (TDD) practices. TDD means writing the tests before writing the code to make those tests pass. He gives an example of this and shows how test abstract classes too. He then comes back around and writes the code to satisfy the test.

0 comments voice your opinion now!
tdd package bestpractice unittest testdriven development tutorial

Link: http://www.sitepoint.com/basic-tdd-new-php-package/


Community Events

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


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

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