Geocoding, PHPUnit/TDD & D3.js (PHP & Laravel)

Listed below are the packages/tools which I used for my CS-15 final project, which may help any readers looking to start their own Laravel apps in PHP.

Geocoding: Convert address into lat/long, useful for Google Maps, etc.

Geocoder Package:


  • Install using “composer require willdurand/geocoder”
  • Documentation is useful and outlines how to work with the Geocoder class/methods
  • getLatitude & getLongitude methods return values to plug into Google Maps API, etc.

TDD: Catch errors as code base grows and becomes more complex

PHPUnit (Installed with Laravel – example tests included):


  • Integration tests help test by process, e.g. logging in, viewing pages, etc.
  • Changes within MVC stack may result in errors elsewhere (regression testing)
  • Ideally, tests are written concurrently with development code
  • PHPUnit output can be sparse, so options are useful
  • Verbose output: “vendor/bin/phpunit –verbose –debug –tap”

PHP Integration Testing Tutorial:

Integration Testing Example:

Regression Testing:

Data Visualization & Charts: Display user data using visualization/charts


C3.js (Add-on):


  • D3.js is a great tool but may require lots of time depending on chart/feature
  • C3.js provides similar functionality with a simpler API/interface
  • Basically comes down to putting data into arrays, then passing into D3/C3

D3.js & C3.js:

Database Primer: ERD Diagram, Normalization & MySQL Workbench

For anyone new to databases (critical for web development), the following topics will be useful for getting started:

  1. Relational Databases – Understanding how tables are constructed, relationships connect tables and data types/integrity.
  2. Data Normalization – Understanding how to clean up data before placing them in tables to prevent redundancy and issues down the road.
  3. ERD Diagrams & MySQL Workbench – Practicing how to sketch out tables/relationships, MySQL Workbench is a great tool for doing so.

Benefits on reading up and/or brushing up on these topics are follows:

  1. Plan out the database schema with an ERD diagram before committing it to code, which can be costly later once tables/relationships are created.
  2. Cleaning up data and plotting out the schema will help one think through their domain and process for mapping out the application back-end.
  3. An ERD diagrams with all tables, relationships, fields and data types are a handy reference document even after initial database setup.

That said, I hope that helps and please see links below for more information:

Data Normalization (first 3 forms are most common/useful, 4th & 5th normally not needed):

ERD Diagrams (recommended to sketch out tables using Data Normalization):

MySQL Workbench (free ERD digram tool, works on all platforms):

Atom & Chocolatey Package Manager (For Use with Windows & CMDer)

I recently started programming in Windows at work (otherwise, I am on Mac/Ubuntu) and came across some handy tools in addition to Atom & CMDer which made the work environment more bearable:

Chocolatey Package Manager (call from CMDer to install packages):

Atom Package Manager (for anyone who did not explore yet):

Chocolatey is a good way to install packages similar to port, brew, curl, etc. from the bash command line and the Atom Package Manager is a good way to install additional features, especially if working with other languages and frameworks.

That said, programming tools in Windows have come a long way since the SciTE Editor and Cygwin Shell