AdCenter Analytics

April 22nd, 2008

I finagled access to Microsoft’s AdCenter Analytics and spent an hour going through the UI and checking out the functionality. It contains the standard functionality found in free analytics package, with the ability to track marketing campaigns and report on revenue. You can set up goals in case reporting on revenue isn’t you thing, and AdCenter Analytics also supports setting up funnels to determine pain points in your site.

I had heard a year ago that Microsoft was including some slick new visualization tools in the offering. The app contains a tree view, which is a visualization of traffic stats and I found it mildly interesting, but probably not something I would use that often. It also offers a number of different graphs. For example, the visitors stats are represented by three different graphs, one in monthly increments, one if weekly increments and one in daily increments. You can click on the increment to limit the data to that specific date range. Again, this is something that is interesting, but not a feature that would make me want to sign up for the account.

The one interesting feature I encountered was the ability to automatically install the script on your site via a connection to your FTP server. I’m not sure how it works – does it open all your html files and insert the script in the bottom? I guess that would be useful for small sites.

There is a fairly intuitive tool to exclude query string parameters for dynamic urls and also exclude IP addresses. This seems easier but less flexible than Google Analytic’s filters. The IP address exclusion allows you to exclude C and B address blocks by using “*”, but it doesn’t support regular expressions, which is fine for most people. But that could become an issue if you needed to block a subset of IP addresses.

All in all it is a decent offering, but I didn’t see anything there that would make me want to switch or even sign up in addition to the current web analytics programs I use. As a new entrant to the field, I would have thought they would have some killer feature to gain traction. But that doesn’t appear to be the case.

Adcenter Pic
Adcenter Pic 2

Book Review : Zend Framework in Action

April 10th, 2008

I signed up for the Manning early access program for Zend Framework in Action to get information on the ACL functionality in the framework and the book provided some useful examples. I was a bit underwhelmed by the content in the first release, but I guess that is to be expected when viewing a rough cut.

This release (the 2nd) is a vast improvement, and the book is really starting to come together. I like how the authors go into detail about testing, showing not only how to test your models, but also how to test controllers, and showing some common set up steps. It doesn’t cover all the details of testing, nor should it, but the book provides a solid background to build upon. This is refreshing compared to most books which simply mention testing and say whole books have been written about it.

The book does a good job of logically building upon previous examples, and I felt the flow was good when introducing more complex topics like Plugins and ActionHelpers. This version was updated to include Zend_Layout, including info on partials and ActionStack plugin, but the chapter on forms is not complete yet – looking forward to reading that when it comes out.

I thought the AJAX chapter was a little shaky. Maybe it’s me, but I felt the authors spent too much time going over a general ajax request sans the framework. By the time they work the framework into the equation, they are using an include file in a controller action to bring in some procedural code written earlier. And that procedural code lives in the models folder – it just doesn’t seem right to me. I think this would have been a good opportunity to use Zend_Filter, although it is used in later in the book when discussing Zend_Search_Lucene (the chapter on this is very thorough and easy to understand). Also, they recommend using separate controllers/actions for Ajax requests and not rendering the view in each action method. That’s fine, but I would also like to have seen using a Plugin in the dispatch loop to detect an Ajax request and automatically turn off Zend_View/Zend_Layout.

I like how the authors occasionally work in design patters, such as the registry, and the observer pattern in the search chapter. The authors describe using the observer pattern with hooks in the DB class (hooks which I didn’t know existed) to update the search index.

The chapter on deployment was good; most books don’t seem to tackle this. My only quibble is when discussing setting up virtual hosts, they say to make sure to enable AllowOverride to use .htaccess. I don’t have any problem with this, but since the book is talking about Virtual Hosts, they should recommend putting the redirects in the httpd.conf file, rather than relying on .htaccess, as it is more efficient due to the fact that Apache doesn’t need to read a file on every request.

At times I felt like there may be too much ancillary topics covered, however, after finishing the book, I felt overall it was good that topics such as testing, deployment, and version control were covered. While there isn’t enough information to provide in depth coverage, it exposures the reader to these topics and provides enough information to get started, rather than just briefly mentioning it. And the coverage of the different components with the Zend Framework is comprehensive and understandable. If you are looking at working with the Zend Framework, I would definitely recommend this book.

24% Percent of Users Can’t Find Google

March 28th, 2008

Over on usability guru Jakon Nielsen’s blog, he throws out a statistic that 24% of users in a recent study couldn’t navigate to google to perform a search - they either went to a different search engine or just failed. How you fail at that task is beyond me. Do you look at the browser, throw up your hands, and scream “I don’t know how to use the damn thing!!”.

I generally try not to be critical of non-tech savvy people, as I spend way too much time online and its only normal that things that make perfect sense to me can baffle other people. A couple of years ago a friend handed me a socket wrench when I asked for help on my car. He was amazed that I had no idea what to do with it - but hey, I had never done any work on a car engine, let alone even change the oil. It’s all perspective I guess. The scary thing about the study is this quote “Also, for this round of research we’re deliberately recruiting above-average users, so the success rate across all Internet users is probably lower than our finding.” If 24% of above average users can’t navigate to Google, then my perception of the web is way out of wack with the general population. I would have guessed in 1% to 2% range…

Loading Zend Config file for a Cron Job

March 23rd, 2008

The other day I talked about using Apache Environment variables to determine which section of a config file to use for a Zend Framework website. That works swimmingly, however, I had a cron job that was running for the same site, and since it was piped directly to php, Apache Environment variables were not an option. Fortunately, PHP has the function php_uname(’n') which will output the hostname of the computer. You can then load the appropriate config section based on that:


<?php
$environment 
= (php_uname(‘n’) == ‘rlbolton-desktop’) ? ‘development’ ‘production’;
$config = new Zend_Config_Ini(APP_PATH ‘configs/config.ini’$environment);

?>


Traits for PHP

March 17th, 2008

Via blog, found a link to a proposal for Traits in PHP. I wasn’t familiar with the practice, but as I read the proposal it struck a cord with me. I have been grappling with how to reuse certain functionality throughout disparate classes.

I looked at Mixins, which I also have been playing around with in JavaScript. Problem is, how do you combine a couple of mixins together. Say I am using the Zend Framework, and I have some classes that inherit from the Zend_Db_Table_Row and I want a couple to use some Mixin classes. Do I extend the Zend class for my Mixin, and extend my other classes off the Mixin? What happens if some of the classes need other functionality found in a different Mixin? Needless to say, it doesn’t seem like a great solution.

Lets jump into an example. I have a number of classes extending Zend_Db_Table_Row, and they all have a user entered attribute, like title or name, which gets turned into a SEO friendly url and saved to the database. Additionally, I don’t want the url to change, so there has to be code from preventing another developer from updating the url.For example,


<?php
class Article extends Zend_Db_Table_Row
{
    public function 
insert() {
         
$this->url $this->_createUrl();
         
parent::insert()
    }

     protected function _createUrl($name) {
       
//code to create the url - remove spaces, etc…
       
return $url
    
}
}

?>


How do I share that functionality across multiple classes, without using inheritance??