Web Development Blog: archive page 2

Latest from Rapid Web

Search for:

Coding methods and principles (part 3)

By Mark Jones 19th June 2015


Inversion of Control (IoC) In the previous article (part 2), we talked about using Dependency Injection and Programming to an Interface to make your code more modular. However, we realised that we still had an issue with confusion and complexity whenever we needed to instantiate a class that requires a lot of arguments to be passed to it. Also if any of the classes arguments needed changing, then we would have to go through all our code and mod...

Read Article

Coding methods and principles (part 2)

By Mark Jones 8th June 2015


Real World Example In the previous article in this series, I spoke about dependency injection using cars and engines as an example. In this article I will show you a more practical example by showing you how easy it can be for your system to switch between different database ORMs (Eloquent and PDO in this example) without having to recode everywhere that interacts with the database. Just in case you're not sure what an ORM is, ORM stands for O...

Read Article

Coding methods and principles (part 1)

By Mark Jones 18th February 2015


During the course of this series we will look into the following coding methods/principles: Dependency Injection Coding to an Interface Inversion of Control Automatic Resolution I will explain what each one means, why we should use them, and how to implement each one. Dependency injection, coding to an interface, and inversion of control work well together so I will discuss those three first, and by the end of it, I will give you a full co...

Read Article

Refactoring Code – Part One

By Mark Jones 10th December 2014


In this first article of the series, we will look at some very simple ways to refactor your code. So what is Refactoring? Refactoring is simply a set of techniques, procedures and steps to keep your source code as clean as possible. Below describes some of the easier code smells to detect and how you can go about refactoring them. Duplicated Code (Extract Method Refactoring) This is probably the easiest code smell to detect, and also refactor. ...

Read Article

Benchmarking and optimising PHP web applications

By Jordan Hall 17th October 2014


With all Turing complete programming languages, there are many different ways of performing the same task. Be it sorting, searching, looping through a list, outputting content to the screen or to a file - they can all be accomplished by a variety of differnet methods. PHP is no different, therefore it is worth looking at the different ways in which tasks can be performed, and benchmarking their performance. This allows us, as developers, to id...

Read Article

Test Driven Development and Laravel

By Mark Jones 21st August 2014


This series will guide you through the process of using TDD (Test Driven Development) in your own projects and will consist of three articles. This first article will explain what TDD is, the positives and negatives of TDD, and finally TDD in conjunction with Laravel. The second article will take you through the process of creating your first test which will be classed as user-interface testing. This type of test will ensure the correct things a...

Read Article