ZURB’s Foundation is a light weight framework for designing responsive web applications, it comes packed with: CSS3 media queries, The Grid, reusable HTML5 components and several jQuery plugins to aid interactivity. Furthermore, Foundation is built with mobile-first approach and allows the stacking of content by default using predefined break points. Or, in other words, we can say that it is responsive by default. Continue reading ZURB Foundation 5: Creating A Responsive Blog Layout
Laravel 4 developed by Taylor Otwell, is indeed a great php framework out there. It is suitable for both small and large scale applications, and has a very active community of really helpful people. I started using laravel more or less four months ago, and I have not searched google for “the best php framework” since then. With its powerful components like: a powerful and flexible routing system, an expressive query builder Fluent, Eloquent ORM, a descent authentication component, an intelligent IoC Container, Blade template engine and Artisan CLI tool, it just rocks (pardon me if I am missing something here).
Database Migrations In Laravel
Database migrations in Laravel provide you with an easy way of managing your application’s database schema. When using migrations, a lot of tasks related to database schema become a lot easier; by using migrations you can change the structure of database tables on the fly Continue reading Database Migrations In Laravel 4
In my previous article, I have explained DI (Dependency Injection). In this article, I will explain how we can use Inversion of Control in PHP to reduce complexity that comes with DI.
Every design pattern has its positive and negative aspects, DI can make it easier to automate the testing process using unit testing frameworks. But, on the other side, DI can introduce extra complexity in your code that makes it more verbose and less readable. For example:
$subdep = new SubDep(); //dependency required for Dep1 class.
$dep1 = new Dep1($subdep); //creating Dep1 by injecting its dependency
$dep2 = new Dep2(); //creating Dep2.
$dep3 = new Dep3(); //creating Dep3
$instance = new SomeClass($dep1,$dep2,$dep3); // injecting required dependencies
As you can see, SomeClass requires three dependencies, whereas Dep1 has its own dependency (more complexity). So the point is, if you are dealing with lot of dependencies in your application, you could end up writing and repeating a lot of code throughout your application. To subdue this problem, we use another design pattern called as Inversion of Control Container.
In software engineering, inversion of control (IoC) is a programming technique, expressed here in terms of object-oriented programming, in which object coupling is bound at run time by an assembler object and is typically not known at compile time using static analysis.
Inversion Of Control in PHP: Dependency Management