Learning Zend Framework: A Case Study

Recently I’ve been immersed into a Zend Framework project in a way that I’ve never been immersed before. This immersion experience has brought out a few thoughts and lessons that I’ve learned through the process about how to get into a framework, how to start a new project using a framework you’ve never used before, and the best way to learn without losing your sanity. Here are my findings.

Don’t fight the framework.
Various frameworks out there have varying degrees of integration with one another. While an argument can be made as to whether or not tightly integrated frameworks are better or worse than loosely integrated frameworks, when starting a new framework it’s best to accept it lock, stock and barrel (in other words, accept it completely).

Continue reading

Why You Should Replace ENUM With Something Else

One of the most hotly contested points of my article on database design was the suggestion that developers drop the use of ENUM and use something else instead. Lots of people argued in favor of ENUM; however, there are several good reasons why developers should reconsider ENUM and use it sparingly.

There are three core reasons why ENUM is a data type that should be reconsidered.

Continue reading

Designing Databases: Picking The Right Data Types

When I started writing this blog post, I had titled it “Tips for Designing Databases” and I planned to talk about various database design techniques. However, as I did more and more research, it dawned on me that one of the most crucial, and most overlooked, components of database development, is the selection of data types for columns.

Much of the information presented in this article was taken from presentations by Jay Pipes and a talk by Ronald Bradford. The talks are The Top 20 Design Tips For MySQL Enterprise Data Architects, Join-fu: The Art of SQL Tuning and SQL Query Tuning: The Legend Of Drunken Query Master.

Continue reading

For The Love Of God, Use Keys!

I recently worked on an application I built some time ago. It was built before I had regard for performance or cared about how a MySQL database should be built. As such, it had no indexes.

That changed, especially when I started playing with old data that I wanted to migrate. The read time on 15 rows in a 325-row table was some 0.86 seconds (which isn’t bad but isn’t great). When indexes were applied, however, the read time went down to 0.01 seconds, an 88% decline in read time.

Continue reading