Android Otto event system

When you work in a client side application, you always wait for something to happen, an event. This isn’t happening only in Android, in every client side application I’ve worked (regardless of technology) you always wait for the user’s input. It could be a button click or something else, but that’s the whole meaning of interactive apps. It makes sense then to design your code structure based on this principle, you always wait for an event. It also makes sense to keep the event communication happening through a single object, otherwise your code can become a nice ball of spaghetti really fast! The Otto event bus can be that object for you.

Continue reading

NodeJS PostgreSQL JSON

So many drafts of subjects that need to be published and so little time to finish them. Being that desperate I’ve decided to introduce a new category called quick tips for all those small suggestions and tips I want to share. Hopefully, only good can come from these and they will benefit someone out there in the wild.

My latest adventures are taking place in the world of node.js. I can see lengthy node tutorials popping up here soon so I’ll leave the details for then.
The reason this quick tip exists is that a fellow code addict suggested PostgreSQL as a new way to waste my time, mainly because of it’s JSON data type and handling.

Continue reading

Multi-Screen CSS

It’s been some time now that I’m working on a simple game for mobile devices and I’ve chosen Phonegap to build it. Usually when you dive into a new technology and start learning it you discover a lot of problems and you become extremely happy when you solve them. So in this post I will try to describe how I’ve managed to organize my CSS code to make the application adjust to different devices and at the same time minimize the changes I have to make to other parts of the application (like HTML and Javascript). It’s a fairly new problem I’ve encountered so a lot might change to my solution but if that happens I can always post a second article.

Continue reading

Calling GWT from Flash

In a world where HTML5 is advertised as the solution to every problem, someone would think that you will need nothing more to create a web app based on data and media. Unfortunately the reality is somewhat different. Stream Pod is a fine example of such an application, it’s an audio player which is based on your search terms to find what it will play. The audio player in Stream Pod is using Flash as the core technology and the reason for this decision was the need for fast development without a lot of browser headaches. There is some great work being done with media in the HTML5 world but personally I would use it as a fallback to Flash for these use cases at the moment.

Continue reading