Get Fresh: Opening Mint

September 06, 2005 @ 02:09 am

0 Comments

Of important note, Mint(Mint: A fresh look at your website) is out, and it's $30. It's also the best damn easy-breezy stat package out there. I speak as a big fan of bbclone, the new big bad Inman stat program is actually a dainty, quick, pleasing piece of software. And it could probably wipe the floor with bbclone when it comes to the statistical information I want. Within minutes of sending away my cash, I was neck deep in functions.php, home of the Mint() object.

I picked up Mint for my personal site (felocity.org) because I wanted to see what the guts of it looked like. Seeing someone's source code, seeing how they built something is easily worth the cost, and Shaun doesn't disappoint. His comments rival those on his website, and this makes me very happy. I've been reading through his plugin in order to see what the interface looks like, and it seems very straightforward. I already feel that programmer itch-- functionality I'd love to have such as internal referral tracking and metrics for locating a consistently popular page (longer lasting mints?). The Pepper API is making it look really easy. I'll have to loose myself this next weekend in a text editor and see what comes of it all.

The Mint class itself is heavy, my only concern as a developer. Weighing in at over 1400 lines (plus comments), there is a lot of extra code that is going to be pulled around on the recording side. Add to that some variable weight (times n plugins), and you're looking at a really heavy thing to lug around. Based on the design, there is only one Mint() at any given time. One possible option is to refactor Mint() into a vehicle for dynamically adding component classes such as a MintInstall(), MintTracker(), MintPepper(), or MintConfiguration(). The advantage to this is that only the components needed at runtime are loaded. Weight can also be reduced by splitting the Pepper objects into record / display objects. Since the API is still very young, there's a lot of room to grow and optimze though. Interestingly enough though, Mint's [failing" is also its blessing.

The Mint() object knows about everything. In its omnipotent state, it's capable of some very sophisticated logic. Serving as a hybrid of Factory and Manager design patterns, Mint() can not only create its plugins, but batch-process them as well. The resulting data becomes a single SQL insert. One insert per page view isn't bad at all! However, your milage is going to vary based on load.

So now my inner programmer is alive, and it craves blood. Okay, not blood, but it does crave some of those orange tic-tacs. Those things are like candy. I can think of two "changes" to Mint I want to experiment with on my site:

  • Create "chewing gum" to make Mint stick to something like "ADOdb](http://adodb.sourceforge.net/.) The easiest and most direct way is to extend Mint and decorate the appropriate functions (plus 1 config option)
  • Test and benchmark InnoDB performance (for large sites)

Overall, the bottom line that people have to decide is if Mint is worth $30. The answer is yes, Mint is worth $30. If you're hesitant or don't see something you want from Mint yet, give it a week or two, hit the demo, and decide if it's going to give you the answers you want.

In response to "Get Fresh: Opening Mint":

Leave a Reply:

Commenting is not available in this section entry.