Dependency Injection with the Silex Micro-Framework

Silex comes packed with its very own built-in dependency injection container called Pimple (this is also a standalone dependency injection container) which is a very lightweight, yet powerful, container. Let's delve into how it works.

Posted by on 30 April 2015 | 12:31 pm

Overview of the Silex Micro-Framework

Usually a micro-framework leaves pretty much everything up to you. You can do with it as you please and mostly you can get away with anything. Unlike a regular, full-stack framework, a micro-framework will not dictate much in terms of where to put things or how to do things.

Posted by on 10 April 2015 | 2:02 pm

Counting Facebook Likes and Twitter Tweets in Your App

Learn how to fetch the data from Facebook and Twitter, how to optimize the connection to these web sites and how to automatically update the data.

Posted by on 26 March 2015 | 2:59 pm

Working with the PayPal API

PayPal recently introduced a new RESTful API that is more convenient and more powerful than the previous version. Learn how to integrate your PHP application with the new PayPal API.

Posted by on 9 March 2015 | 11:55 am

More PHPUnit Helpers

In my previous article, I expanded a few ideas around test helpers and how to use setUp() and tearDown(). However, we still stayed in the realm of things built in to PHPUnit. Here, I want to expand on a helper function I include in most of my main testing classes that allows for the concept of setUp(), but grants a bit more flexibility.

Posted by on 23 February 2015 | 3:32 pm

Working with PHPUnit Test Helpers

introduction to PHPUnit and how to do object mocking. While necessary, sometimes all of the setup work can become tedious for large projects. In this article, I hope to show how some helper methods can make test writing much easier and faster.

Posted by on 30 January 2015 | 12:00 pm

Getting Started With Laravel Homestead

Laravel follows a slightly different approach to PHP development. Using ideas usually found in the .NET environment, such as Facades, and sporting an Inversion of Control Container, Laravel claims to be the future of PHP. Whether or not this is the case is too early to tell, but it certainly is popular.

Posted by on 15 January 2015 | 12:16 pm

Advanced Mocking with PHPUnit

One way of constructing the mock object is to replace functions with stubs that just return NULL. This is useful for utility functions that call an external resource such as an API or database. This is useful for when you don't care what comes back, but the code you are testing calls a function that needs to be accounted for.

Posted by on 17 December 2014 | 6:51 am

Using Global Variables in PHP

Leverage the power of global variables in PHP to make variables globally available and share data across functions and programs.

Posted by on 3 December 2014 | 9:59 am

Test Driven Design with PHPUnit

Test Driven Design is the process of writing unit tests first (expecting them to fail) and then writing the code to make the tests pass. The benefits of doing this include: • forces the programmer to plan out the functionality head of time • forces the functions to be small, concise, and testable • leaves the programmer with a full unit test suite with 100% test coverage

Posted by on 19 November 2014 | 10:00 am

Best Practices for Refactoring in PHP

A developer may consider his code as perfect if it runs successfully without any compile-time or run-time error. But there is always a scope of improvement in working code and refactoring improves the structure of existing code. The code, if not improved, may hamper the performance of an application considering factors such as memory, speed, reusability, etc.

Posted by on 30 October 2014 | 8:31 am

Closures in PHP Who Knew?

Closures (also known as anonymous functions or lambda functions) are just that - Anonymous or closed. They don't follow the standard function declaration, and can be created inline. If you've used any modern JavaScript library, you've already done this.

Posted by on 15 October 2014 | 11:40 am

Most Important Features in PHP 5

PHP 5 introduced a set of new features and functionalities to improve performance, efficiency and more. There are three major areas in which the improvement is significant. This article will discuss the most important features introduced in PHP 5.

Posted by on 24 September 2014 | 5:01 pm

Advanced Object-Oriented Programming in PHP

PHP is a server side scripting language used to develop web pages. In the recent times, PHP has become popular because of its simplicity. PHP code can be combined with HTML code and once the PHP code is executed, the web server sends the resulting content in the form of HTML or images that can be interpreted by the browser. We all know the power and importance of object-oriented programming or OOP. This is a technique that is widely used in the modern programming languages.

Posted by on 26 August 2014 | 12:48 pm

Valentina DB Solutions for PHP

Learn about all the main Paradigma Software products and how to use Valentina PHP ADK as a PHP DB solution for your applications.

Posted by on 12 August 2014 | 3:39 pm

Introduction to DooPHP

DooPHP is a high performance open source PHP framework. It is also a rapid development framework for PHP application development. It uses common design patterns like MVC and ORM. The framework helps to write less code for performing tasks and also reduce development costs.

Posted by on 28 July 2014 | 11:58 am

Creating Real Time Applications with PHP and WebSockets

Explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets.

Posted by on 3 July 2014 | 4:41 pm

Top 11 Best Practices for PHP Development

Right from its inception, PHP was widely used to develop web based applications. Since PHP is a scripting language, one must follow some rules while developing. Error reporting, DRY approach, Indentation and Use of whitespace, Meaningful and consistent naming standards, Deep Nesting, adequate comments, phpInfo() function, user input, Cache mechanism, extra variables, frameworks

Posted by on 20 June 2014 | 11:18 am

Exploring PHP Design Patterns

Design patterns provide a generic reusable solution to common problems. A design pattern is not a concrete solution that can be converted in to source code or a machine code rather it is a template which can be used to solve a problem in different situations. Design patterns help in faster development as the templates are proven and from the developer's point, only implementation is required. Design patterns not only make software development faster but also encapsulate big ideas in a simpler way. Factory Pattern, Singleton Pattern, Observer Pattern, Chain of Command Pattern, Strategy Pattern

Posted by on 28 May 2014 | 10:03 am