Mobile market share

Ever wondered how diverse the use of mobile devices/mobile browsers is?
Have a look at this nice post of iCrossing:

http://connect.icrossing.co.uk/mobile-market-share_6301

be sure to compare it to 2010:

http://connect.icrossing.co.uk/mobile-browser-market-share-map_4217

It is clear that Android gained a lot in the US, Japan and parts of Europe over the last year!

User interface decisions: multi-select

Thanks to Filip Forrez for the inspiration for this post.

As developers, we are often presented with UI choices. Some create subtle differences, others larger ones.

One of them is the way we present the possibility to select multiple items from a set (list) of predefined items. Traditionally this is realized by 2 select-lists with the multiple attribute.

In an (advanced) Sencha Ext Js implementation, you get this:
http://dev.sencha.com/deploy/dev/examples/multiselect/multiselect-demo.html

This offers a lot of features and while we as developers see this as the default way to offer this functionality, there are other options too.

In the spirit of mobile development, a list with check-boxes offers the same basic functionality:
http://demo.superdit.com/ext_listview_dataview/

You would also never be able to present the first solution on a small mobile screen. Another option to meet the same basic requirement is the way Google Calendar lets you add multiple invitees to an appointment.

Depending on the features you need, one option may be preferred over the other. Think of features like:

  • Sorting: you may need to offer the possibility to sort the result.
  • Quantity of predefined options: too much data may require a way to search.
  • Linkability: list-items may also need to be clickable and link to detailed information.

In some cases, a more creative approach can really have your site or app pop out.

Replace an Ext JS Element with a HTML string

After trying to do something as simple as replacing an HTML element in the dom with a string (HTML in this case) with Ext JS for about 3 hours without finding a proper answer on Google, I thought someone else might also benefit from my (sub-optimal) solution.

In my case, the string was a HTML fragment returned from an AJAX call. It needed to replace a HTML element already in place in the dom.

Ext.DomHelper.overwrite() works, but only replaces the contents of an existing element, not the element itself (and since the parent of that element contained other elements too, a higher level selection didn’t solve it either).

You would expect Ext.DomHelper.insertHtml(‘beforeBegin’, oldElement, html) and deleting the oldElement afterwards to work, but it generated an error message which (if I’m correct) told that the html string is not linked to the dom already (which is of course not the case).

Since I could not find a proper working solution, I tried to use the Ext.DomHelper.createTemplate() method to create an Ext.Template and to use template.insertBefore() with an empty values array to get it into the dom before removing the old element. This does not look optimal, but at least it works…

Disable SAP GUI sound

If you’ve ever worked with SAP, the chances are you have been “amazed” by its GUI more than once.

Besides a usability experience dating back from the first half of the previous century, the default sounds on every interaction with the GUI can be very anoying (at a minimum).

How to disable it:

  • Fire up the GUI and sign in.
  • On the main toolbar, click the last icon (Adjust local layout – what did you expect).
  • In the dropdown menu, select the second option (Configure New Visual Design… – of course).
  • Select Sound – Off.

Once again, it proved you should really stay away from the alcohol. Looking for something like “Settings” under de main “System” menu… you s*****.

Indexes on multiple columns in MySQL

When optimizing queries, you don’t need to be reminded that indexes play an important role.

Something to remember though: in real-world examples a multi-column index often outperforms multiple indexes.
So it can be worth changing something like:

INDEX `index1`(`column1`),
INDEX `index2`(`column2`)

to

INDEX `index1`(`column1`, `column2`)

MySQL 5.0 introduced an internal method called “Index Merge” which merges multiple indexes when querying a table (if applicable) but I haven’t seen this being used that often. On the contrarry, MySQL often picks one of the indexes and in these scenario’s it is especcialy usefull to have one multi-column index.

As always: use EXPLAIN to see what can be improved.

Search keyword tagcloud

Ever wondered what the prominent keywords were that your visitors use to reach your site?

Google Analytics will happily show you those. With the amount of visitors per keyword of course (amongst many other metrics).

But what if you wanted to know which separate words were most used throughout all search queries? Create a tagcloud:

  1. Go to the Traffic sources >> Keywords report.
  2. Be sure to select a good amount of visits by stretching the date range to e.g. a year.
  3. Append &limit=50000 at the end of the URL. This is some hack to get all keywords in the export and be sure to append it to the end, not before the hash (#) character or anything.
  4. Click the export button at the top of the report and click CSV.
  5. Open the file in an application that understands the standard CSV-format. I have to open the file in a text-editor and replace all comma’s with semicolon’s before I can open it in Excel.
  6. Copy all keywords (not the numbers behind them or the general data above them).
  7. Visit a tagcloud creation website and paste the data.

You can argue that the number of visitors per keyword is not taken into account but in the end that may not be what you are looking for. In case you want to know which keywords are most often used in different search phrases, this creates a pretty good image.

Below is the result of all searches that reached this website in 2009:


(click on the image to enlarge)

Thanks to Avinash Kaushik for another great post about Analytics Insights.

Take the risk

Want to start your own business and work from home?

Inc.com published a list of 9 examples of people who started a successful business from their home.

One of them is a self employed insurance broker who offers live webcam chat through his website. You do not need to know anything about insurance to imagine this can have a positive effect on customers who do not have time to make an appointment with him.

Enjoy the read!

Looking back on 2009, outlook on 2010

Like everyone has done these days and some (like me) are still doing: a random review of 2009 and a preview on 2010.

2009 (in order of magnitude)

  • My first ever energy-efficient lamp broke (I must have been using it about 7 or 8 years). So these things can die!
  • The basement scene with John Malkovich and the fitness owner in Burn After Reading was probably the best movie scene I ever saw.
  • Together with Jan from JAMA Webcreations I built the most user friendly content management system in the world. Be sure to contact Jan for a demo and partner with us.
  • I got hooked (if I wasn’t already) on a lot of Google applications: Analytics, Apps, AdWords, Mobile Gmail and Wave.

2010

  • While I must admit it isn’t that hard as some people want it to be, I will stop testing projects in Internet Explorer 6. It doesn’t make that big of a difference since IE 7 often has the same quirks.
  • I plan to move all hosting to Linode. Their service just can’t get better. E-mail accounts will probably be handled by Google Apps.
  • I hope to (re)launch a considerable amount of the projects I work on (on a Linode of course).
  • Maybe I should also try to get the Zend Framework certification but I also want to take the Google AdWords and Analytics exams.

Have fun in 2010!

Redirecting in Zend Framework

While working with Zend Framework, you must have asked yourself “Is there an easy way to redirect to another controller/action?”

Well, there is. When redirecting inside a controller, the first method we think about will probably be $this->_redirect(). This is quick, but it only accepts a URL. This means you have to create a URL to a specific route yourself. Either with the $this->view->url() URL view helper (which is not a pretty sight) or by assembling a route.

Yes, there is also $this->_forward() which sends your request to another controller/action, but it also goes through all init() logic again and forwarding isn’t suited for every situation (e.g. after a form POST).

But there is a far more flexible way: the less known Redirector action helper. Actually, $this->_redirect() uses it, but it provides easier ways to redirect to a specific route:

$redirector = $this->getHelper('Redirector');
$params = array(
	'controller' => 'my-controller',
	'action' => 'my-action',
	'other-param' => 'value'
);
$redirector->gotoRoute($params, 'my-route', true);

Its usage will be self explanatory (actually the parameters are the same as the URL view helper), but I want to add a little note about the last parameter (which the URL view helper also accepts): if true, it “resets” your route, meaning all other parameters currently in your Request object are removed. This implies that when setting it to false (which is the default) parameters you have in your “current URL” will be reused (unless overwritten).
This can be particularly useful when passing search query, paging,… parameters from one page to another.

So, next time you need to redirect: pull out the Redirector action helper.

Stay informed on Zend Framework

When developing with Zend Framework, it is difficult to keep track of new versions, new components, changes to components, roadmaps,…

After “Beginning Zend Framework“, you’ll need to stay current too. You can of course read everything on the wiki, but if you use a RSS reader (if not, you really need to) add this feed.

It provides a great overview of all proposals and discussions concerning components. Even if you don’t have time to follow up on this each day (there can be a lot of comments), by looking at the titles of the posts you can have an idea of what is going on.