Tag Archives: Technology

Google Analytics for Nokia … and Mobiles

Is There an Analytics Interface for Mobile?

The last few months I was searching about some kind of mobile interface of Google Analytics for my Nokia e71. However I did not find one?! Please correct me if I’m wrong.

In the same time I knew there is a GA API, which is free to use, so finally I wrote a tiny web app allowing the reading of basic information about your Google Analytics accounts.

Note that your username and password are NOT SAVED! However it’s up to you to try.

An important note is that the API has a limitation in requests so yet again, it’s possible to be unavailable in case of too many requests.

Visit with Your Mobile Browser

this link:

http://www.stoimen.com/ga/

Note that I made it primary about my Nokia, so any screenshots will be welcomed as well.

It is still beta so be careful. In fact any suggestions are welcome. Either for improving the security and error handling as well as new data exports.

There are lots of things to be done, but this is really basic.

MVC in Practice: Designing Models

Existing Examples

Sketch

There are lots of examples online teaching you what is MVC, why it is good and how to develop an application using this pattern. However most of them use a predefined structure with already constructed database and only the connection between a database table and a model is described. Actually what happens before all this. The client tells you something he’d like to have in his application.

Just imagine the following situation. You’ve a client who tells you that he wants a blog. The blog has to have posts and users, and every user must write posts and every post must have comments. Also he wants a set of categories where each post will be attached to one ore more categories. And finally a blogroll – one ore more links to another blogs.

This is pretty general and does not pretend to be a full featured example. However the strategy to make a primary structure of the future models is to pickup the nouns in this paragraph. It is really simple:

The blog has to have posts and users, and every user must write posts and every post must have comments. Also he wants a set of categories where each post will be attached to one or more categories. And finally a blogroll – one ore more links to another blogs.

So far you can see there are five prototypes of database tables: post, user, comment, category and link.

It’s important to note that not every noun is ready to be a database table. In some cases, when the client is really smart, he can give you a more detailed description. Than there are nouns describing the other nouns, of course, they are supposed to be columns to those tables.

Every post must have title and description

This is what we can do for now. From a raw text you can design your database and models in the MVC architecture.

OpenLayers Can Be Faster!

Put All The Markers at Once!

The way OpenLayers puts markers on the stage is fine when they are not so much, but once you need more than 100, the library’s solution is not good. The question is is there a way to put all the markers faster than the built in method.

Yes, There is a Way to Speed Up Markers Load

I once wrote about how to speed up markers on OpenLayers, it is clear that my decision was to concatenate the DOM elements like a string after I’ve generated all the markers as markup with innerHTML as it’s faster than appendChild. The only question left is how to convert Longitude/Latitude pair in pixels.

The Answer’s Given by OpenLayers

There is a method called getLayerPxFromLonLat() which do the job. Let me show you a snippet:

ll = map.getLayerPxFromLonLat(new OpenLayers.LonLat(lon,lat));
console.log(ll);

You can see what’s inside the ll object. You can now reference the pixel as ll.y and ll.x.

Mobile Internet Users are Getting More Important

Internet Mobile

It isn’t strange that the internet is becoming more and more mobile. When it matters to news sites I think most of the mobile versions are better than the “desktop” versions of the site. Take a look at Huffingtonpost.com or LeMonde.fr.

Mobile Ads

The first thing that makes impression when comparing both mobile and desktop versions of a site is the layout. Of course the lack of ads on the mobile version, or if not the absolute lack at least the small number of appearing ads, seems to be quite pleasant.

The thing is that as the web grow and as the web 2.0 is becoming a reality most of us will prefer to use it on a mobile device, just because it’s

  1. easier to use
  2. easier to find
  3. easier to follow

Here’s a nice example of what mobile phones are now.

Now lets take a look on how the mobile web will grow in the near future.

That graphics describe quite well what will happen in the upcoming years. Is there now a question: should I make a mobile version of my site?