Thursday, May 29, 2014

The Hunt for a New PHP Framework

As we start to spin up new projects and products at Curve, we are always keeping an eye on our frameworks to make sure they are the right tool for the job. We recently decided to take another look at what's out there so we picked a few of the top PHP frameworks and attempted use them to write a simple web application.

We tried to break our time up in evenly-divisible chunks during the exercise which meant we had to drop some frameworks due to the time required to fix the problems we were running into. The resulting applications were run using Apache with PHP 5.5.12.



  • Super easy to get going. Very straightforward and easy to understand. Feels very natural coming from a rails-style framework.
  • Active, strong community
  • Migrations are handled the way we want them to be.
  • Has built-in abstractions over queuing services like SQS and IronMQ.
  • Extensive documentation
  • Supports Composer
  • Would be able to split out the Eloquent ORM and use a data mapper (e.g. Doctrine) instead (e.g. Laravel-Doctrine or the Doctrine Bundle)


  • There is a lot of stuff included in the package that we might not use.



  • Very modular - potential to scale well, provided developers write/configure their bundles correctly
  • Generators exist for a lot of stuff. 
  • Supports Composer
  • Extensive documentation


  • Code is very verbose and dense
  • Migrations are done by changing attributes on the model(s) and running an analyzer which migrates the schema for you.



  • Even though it’s old, it appears to have had long term support
  • Documentation is okay


  • Feels old
  • Like Symfony, the schema migrations feel awkward. The first time you generate a migration (Cake PHP calls it a "schema"), the library creates "schema.php". Subsequent calls to generate a new schema will create "schema_2.php", etc.
  • You start a new project by downloading their source and untarring it


It is Curve's opinion that Laravel is the best choice for smaller projects that require access to a database. It and Symfony are very similar in terms of architecture, but we found Laravel to be much easier to get up and running with. There is some complexity around Bundles in Symfony, but other than that, it was the only other framework we could get a very simple app up and running with in a short amount of time.

Database Migrations

Like almost all enterprise applications, Curve Hero uses a relational database to store the majority of its data. We do make use of some other technologies where appropriate but the lion's share of the data goes to the DB.

A problem faced by many development teams is how to manage structural change within a database and how to make sure all developers are working with the correct database structure during a project. A common technique for handling this is to use migrations.

Our current PHP framework uses rails-style migrations which are identified by a timestamp and contain an up/down function that encapsulate the change being made to the database. Other migration styles differ from this in a couple of ways. These are the most common ones:
  • Instead of using a timestamp to identify migrations, an auto-incrementing integer is used. This isn't ideal when you have multiple developers on a team working on different migrations at the same time; two developers might have the same ID assigned to the migrations they're working on and will encounter a conflict when merging their code together. In the PHP world Akelos uses this method.
  • Instead of using up/down methods, the complete schema is described and the framework computes the changes that need to be made. We have avoided using this style because it limits our ability to deploy migrations that might not actually change the schema. It also introduces (or increases) the risk of the schema change unintentionally. Symfony uses this idea.

Friday, February 7, 2014

Getting Nagios 4 to run on Ubuntu

Like a lot of tech companies, Curve uses Nagios to monitor our systems and notify us of any problems. We recently upgraded to Nagios 4 but had some problems getting it up and running on Ubuntu (Nagios 4 was built using Red Hat Linux) so we came up with the solution ourselves and have open-sourced it so that others can use it.


Welcome to the new tech blog by Curve Dental

We build awesome web applications to help dental offices manage their operations; behind our applications are a crack technical team who want to share their experiences and ideas with the world.

Enjoy and please comment on anything that takes your fancy, we'd love to hear from you!