HTTPlug – The HTTP client abstraction for PHP

HTTPlug is an HTTP client abstraction for PHP.  Using this library you can decouple your code from the specifics of the HTTP implementation in your client of choice, and can also easily switch between different clients, like cURL, Guzzle, and so on.

HTTPlug also supports pluggable functionality, so you can expand or shrink as needed by your application.  Some examples of plugins include request / response logging and authentication.

SQL Keys in Depth

SQL Keys in Depth is an excellent read if you want to brush up on your knowledge of database keys and how they affect the performance of your application.  For the laziest among you, here are the summary points, based on an extensive research of 60+ articles, StackOverflow questions and IRC discussions:

For each table:

  1. Identify and declare all natural keys.
  2. Create a <table_name>_id surrogate key of type uuid with default value uuid_generate_v1(). You can even mark it as a primary key if you like. Including the table name in this id makes joins simpler. It’s JOIN foo USING (bar_id) vs JOIN foo ON (foo.bar_id = bar.id). Do not expose this key to clients or anywhere outside the database.
  3. For “join tables” declare all foreign key columns as a single composite primary key.
  4. Add an artificial key if desired for use in a URL or anywhere else you want to share a reference to a row. Use a Feistel cipher or pg_hashids to conceal auto-incrementing integers.
  5. Mark foreign keys to surrogate UUIDs as ON UPDATE RESTRICT and to external artificial keys as ON UPDATE CASCADE. Use your own judgement for natural keys.

Top 10: Best Tour (website guide) Javascript and jQuery plugins

As I always, I was just looking for one, but found a whole top 10 … Top 10: Best Tour (website guide) Javascript and jQuery plugins.  Any other recommendations or comments?

WebGraphviz – Graphviz in a browser

WebGraphviz is yet another link for any Graphviz fan!  Pretty cool.

By the way, if it’s been a while since you checked Graphviz website, have a look – they’ve updated it recently and it doesn’t cause unexpected 90’s nostalgia outbreaks anymore.

micron.js – a micro-interaction CSS/JavaScript library

micron.js:

a [μ] microInteraction library built with CSS Animations and controlled by JavaScript Power

It won’t change your life, but it will help with adding a little human touch to your web application.