jacopo beschi: yet another web guy

Laravel Archive

SOLID Design principles and Php: Interface Segregation

Created at: Feb/24/2014 jacopo beschi

Ok guys we're almost done with the SOLID principles series, today we talk about the interface segregation principle. The Interface segregation principle says: "A client should not be forced to implement and interface that doesn't use". As we are used let's explain that with an example. Imagine we are using the repository pattern to save some objects.

Read on

Laravel setup alias and service provider in a package

Created at: Feb/17/2014 jacopo beschi

Hello folks. This article is just a brief explanation on how you can create new run-time alias and load service provider within your laravel package. If you want to load other service provider from the package you have to use this command inside the register method if your service provider:

Read on

SOLID Design principles and Php: Single responsability

Created at: Jan/23/2014 jacopo beschi

Hello guys, this is the first article (of 5) About SOLID design principles. Solid design principles was written by Uncle Bob Martin with the objective to help building quality code. But how can you say that you have written good code? You could say: when the code works its good code, but in fact that's not; in fact the biggest quality of software are that it's easy to replicate and easy to modify.

Read on

laravel form handling with event-driven code

Created at: Jan/07/2014 jacopo beschi

Hello guys, how many times you have created a form that has to handle many complicated tasks? If the answer is "many" i have one way for handling that in a very fashioned way based on events using laravel framework 4+. The proof of concept in OOP is the "Chain of responsabiity" design pattern. Imagine now that when we process a form we want to execute a list of action consequently, in the case one of them would fail we will return an error, otherwise we return a success message.

Read on

Php Laravel Single table inheritance

Created at: Jan/06/2014 jacopo beschi

As i came into OOP (Object-oriented-programming) i started to learn the concept of "Inheritance". Inheritance itself is a cool stuff, but problems come when you need to save that object structure into a relational database: for example Mysql. This article is one of a series that will explain the best-practise approaches to solve that problem.

Read on