VGTech is a blog where the developers and devops of Norways most visited website share code and tricks of the trade… Read more



Are you brilliant? We're hiring. Read more

Don’t forget the View Model!

Android

Background

I’ve observed an increase in architecture-focused Android posts lately in channels such as /r/androiddev and Android Weekly. That’s great, but frankly it’s about time. When I transitioned from Windows Phone development to Android a couple of years ago I felt it was difficult to find good examples on how to architect a solid app. It didn’t help that Google’s examples violated most best practices[1] either. I kind of went with my own version of MVVM (or MVPVM) which I had with me from the .NET platform and it sort of worked. Reading
Hannes Dorfmann’s post on MVP and his Mosby framework, I realize I’m not the only one who’ve been struggling with getting the established patterns working with Android (he spent 3 years). The Android SDK is not exactly leading you into a good architecture out of the box. Maybe Fragments is partly to blame, and why Square Inc is advocating against it. (more…)


Product Management In Media

Media companies where journalists and technologists don’t get on the same page regarding product and product management will die.

Tl;dr — Unless media companies step it up and totally change their view and abilities on product management, they will be eaten by tech and new players. Only those that fully embrace that product management in media is the intersection between journalism, user experience, software, data and analytics will thrive.

The ability media companies have to innovate and compete in this tech-eats-everything-world is fully dependent on how they view product and product management. As of now, it seems very few (traditional) media companies are able to agree on these terms internally.

(more…)


The current state of the Wearable industry

Wearables

The wearables space is quite broad and includes everything from fitness trackers, smartwatches, augmented reality glasses, smart jewellery, smart clothes and even implants. Its all about the connected self and the use of this new technology to do things like monitor your health, to play games, to make you fitter, to save you time or to make you more organised.

The industry is still lacking a killer feature, platform or device that can rejuvenate this market. Everyone is looking to the soon to be released Apple watch to do to wearables what it did for the mobile industry.

Below are some examples of how wearables are being used today.

(more…)


Clean and simple Z-index with SASS lists

CSS

So.. Z-index. Ever used it on a rather large scale site before? Or in a CSS environment that you don’t really know inside out? What number did you set? Did you make it really, really high just to be sure? Ever used z-index: 100003? Or 99999999?

Highest z-index was an astonishing 999999999999999999999999999 or 9.99e26. With a default key repeat on OS X, this would take 3 seconds of holding down 9 to type.

QuickLefts 2014 CSS report

You don’t do that, right? Perhaps you rather build systems with levels set in hundreds or thousands, to be able to sneak in future elements? The oddball z-index: 1005; here and there?

For my latest project I used a rather simple trick in SASS that got me out of this potential mess, and I didn’t even set a single number. SASS took care of that for me! (more…)


JavaScript Code Style

JS

Code is read much more often than it is written. Having a consistent and defined coding style helps developers read the code, and it also helps to make a code base feel like one unit, instead of individual pieces written by different authors with their own way of doing things.

Having a coding standards is beneficial, but making people follow it is usually a bit harder. Let me introduce two awesome tools to help you: JSHint and JSCS. (more…)


Writing, testing and publishing Javascript modules

JS

So you want to write reusable, maintainable and modular Javascript, huh? Good.

Here’s a rather extensive “getting started”-guide by yours truly – which means it’s my own preferred way of doing things. It’s written with open-source in mind, but most points can be applied to “private” modules as well.

(more…)


How I set up my local PHP development environment on Mac OSX Yosemite in three easy steps

PHP

When I first started writing this post, I considered giving it a title such as “How to set up local PHP development with dynamically configured mass virtual hosting on Apache 2.4″, “Quick and easy prototyping using Liip PHP, Dnsmasq or Proxy Auto Configuration” or even “The Ultimate Guide to Rapid Development on OSX 10.10″. I did not.

In my daily job as a Development Manager, I don’t get to code very much, but when I do, I want to have a setup that allows me to quickly create development projects and prototypes in the ~/Sites folder and have them show up as vhosts automagically, without having to edit any configuration file(s).

I also want to make sure my pseudo-toplevel domain .dev resolves to localhost and any domains/subdomains i choose to create lead into the relevant web root folder.

(more…)


Aggregator apps: friend or foe?

Android

Aggregator apps are changing the way news is discovered, consumed and packaged. The popularity of aggregator apps vary largely from country to country. A quarter of the top 20 apps in the news category on both Googles US Playstore and Apples US Appstore are aggregator apps.

More and more publishers have begun to understand the need to have a presence wherever their readers or potential readers are consuming content. Some have chosen to work together with aggregator apps like Flipboard, Smartnews and Yahoo news digest so as to capitalize on this relatively new distribution channel.

(more…)


The magic of createObjectURL()

JS

The web platform is maturing faster and faster, and we’re seeing the work normally done by native desktop applications now often shifting towards web-based applications instead. Features that may appear to have little importance can be really powerful when combined together.

A good example of this is URL.createObjectURL(). On it’s own, it really doesn’t do much. Paired with the HTML5 video and audio element, or even the good old image element, it gets to be really powerful.

(more…)


Is my pink your blue?

Design

pinkblue

When I grew up, far above the arctic circle, I was told that the sun is yellow, the sky is blue and the grass is green. However, most of the year the sun was gone, the sky was black, and the ground was covered with snow. Associations to colours were not always consistent. Light, and the environment around us, determines how we perceive colours. I do not know if everyone with normal vision see the same colours. My pink could be your blue, and so on. What I do know, is that some people are colour blind, some have low vision and some are blind. As a designer, I have a huge responsibility to create the best solutions possible, accessible for all. Recently, I have been diving into a wide open ocean of knowledge, swallowed some salty water and floated up with increased insight.

 

(more…)