- Why Many Good Developers Don't Get a Good Job
I have seen lots of really good developers looking for work and they don’t find good work for months or years. On the other hand I’ve seen some really good companies looking for developers and they don’t find good developer for months or years. What’s the problem? After looking at the situation of some of the developers and companies I have tried to find out the reason behind it. Let me share my thoughts with you.
- New York Trip and The Laravel Conference
I work remotely for Vegan Cuts, which is based in Canada and I work from Bangladesh. As the team is distributed, Vegan Cuts arranges meetings every year in different countries. This time I was invited to visit New York :). It was a long journey for me, Sylhet > Dhaka > Istanbul > New York City, 20+ hours just in flight. I took 1.5 day break in Istanbul and explored the city, amazing, I must say.
- Don't Fear Exceptions
If you’re not one of the few, you surely get scared once you see one of these: Fatal error: Uncaught exception ‘Exception’ with message ‘Not found’ in /home/usman/www/test.php on line 27 Fatal error: Uncaught exception ‘UnexpectedValueException’ in /home/usman/www/test.php on line 27 When you see Red or Orange screen with Exception you fear like you’ve committed a sin and just go back to code to repent. Congrats, you’re the majority. What if I told you that Exceptions are no sin, rather blessings of object oriented programming?
- Strana - Smart Pagination Library for PHP
A framework agnostic, smart pagination library for PHP. Just a few lines of code and fully functional pagination is ready. Paginate your records with Strana. Strana will slice(limit and offset) these records, generate pagination links for you and reads page number from them, all automatically. Features: Built-in adapters for Doctrine, Eloquent (Laravel), Pixie, PHP Array and you can do it manually. Readable syntax Add Infinite Scroll with one line It automatically detects which DBAL you are using.
- Pixie - A Database Query Builder for PHP
It took me few weeks to build Pixie, a lightweight, expressive, framework agnostic query builder for PHP, it can also be referred as a Database Abstraction Layer. Pixie supports MySQL, SQLite and PostgreSQL and it takes care of query sanitization, table prefixing and many other things with a unified API. At least PHP 5.3 is required. It has some advanced features like: Query Events Nested Criteria Sub Queries Nested Queries Multiple Database Connections.
- PHP Router in 140 Characters
This is a dimple(damn simple) URL routing script for PHP which is written in just 140 characters of code, so it fits within a tweet. It’s NOT a good router at all, don’t use it in a real application, it’s not exception handled either. I did it just for fun and to demonstrate the simplicity. So here’s the router code, and that’s all (seriously). class R{ function a($r,callable $c){$this->r[$r]=$c;} function e(){$s=$_SERVER;$i='PATH_INFO';$p=isset($s\[$i])?
- GetSetGo - Dynamic Setter Getter Library for PHP
GetSetGo is a dynamic setter-getter library for PHP 5.4+. Its developed by me and Sheikh Heera, and yes, it’s well unit tested. You can use methods like setFoo('bar') and getFoo(), which you DON’T have to create (in your class). GetSetGo will make these methods work for you automatically as long as you have a $foo property in your class. It makes use of Traits, so using it is super simple, you don’t have to extend any class, as you can extend a single class only, we don’t force you to use ours.
- Laravel 4 Uses Lots of Static, Not True.
Most of the time developers blame Laravel for using too much static. This claim is not true in case of Laravel 4, let’s dig in and discuss why and how. What is static? In PHP you call it like this Class::$property. As the name suggests, it preserves the state. Static variables preserve their values across the lifetime of the running application(in our case request). In a class if a static property is declared it becomes the property of the CLASS itself, NOT the property of the instance(s) of the class.
- Filter Eloquent Results by Overriding in Laravel (v 3 & 4)
Now Laravel has this feature [built-in](http://laravel.com/docs/4.2/eloquent#query-scopes) What is Eloquent? Eloquent has been a really popular ORM in the PHP community lately, it was initially built for Laravel framework only. But since Laravel 4 all the components including Eloquent are built as Packages which may depend on other packages. These packages can be installed through Composer and can be browsed on Packagist. So what’s cool? Think of people out there who either don’t use Laravel or don’t use any framework at all.
- XSS Filter in Laravel Framework
If you are connected with the PHP development world then you must have heard the name Laravel and you know what it is. If you don’t know, Laravel is a modern PHP framework which utilizes modern PHP features and uses some of the existing frameworks’ components to truly awesomify PHP development. Back in 2012 I gave Laravel a try out of curiosity and I was amazed by the flexibility, features and easiness it offers.