Category: Mobile

Mobile related blog posts.

Enjoying Ionic, HTML5 app development

One of the things I’ve always loved doing is creating throwaway apps that solve very simple problems.  Historically these have been to educate me on the ‘art of the possible’, rather than actually produce something workable.  I’d always fall at a hurdle, or find a gap in my learning that would take me off on a tangent – the next gap to try and fill.  It’s been a lifetime of constant learning, challenging myself to fill more and more of the gaps with oodles of potentially useless information.

Ionic Framework

Luckily (or with amazing foresight), lots of this information is now becoming appropriate and useful.

As an example, a few years ago I was working at an organisation who got hit with a DDoS.   The site was down for 36 hours before we got it back up, and I learnt an awful lot then that I thought would be pertinent for my future career.  I discovered low level things about networking that I didn’t think much of learning at the time, yet it’s these small pieces of knowledge that make up the experience I have now.

I remember discovering Ionic around 2013 and following its creator, Max Lynch, on twitter.  We exchanged a few platitudes and he helped me out with a couple of early gotchas.  It was a great introduction to a community, and another advocate of my preconception that HTML5 would be ‘good enough’ for native apps – It wasn’t long after the HTML5 LinkedIn post that blasted the idea that HTML5 was the future.

I’d also been working on an app for the Oxford & Cambridge boat race.  I was adamant that using the accelerometer functionality in Cordova, it was possible to mimic a rowing motion and use your phone like a wii-mote.  I prototyped a very simple solution and touted it round a few app development companies.  They mostly laughed and suggested that I specified either iOS/Android, or double my costs.  I then took it to the excelled team at Inviqa, who despite not having long started their app development journey at the time, agreed that I’d seen the potential and were able to complete the project under the budget that we’d originally ballparked.

HTML5 FC 1 – 0 Native FC

Since then I’ve played with Ionic at each stage of its development.  It helped me establish my understanding of AngularJS, and been probably the exclusive partner to my investigations into Angular2+.  I don’t ply my trade as a developer, but as a technical generalist – and the concepts, documentation and community around Ionic have been superb in offering the support, patterns and scaffolding to help shape the new propositions that I nurture.

It was with fair trepidation that I ended up advocating a relatively straightforward application at my place of work; for internal use only and running on Ionic2.  I’ve had my battles (with myself, not the framework) in deciding on my application structure, but I’ve got there.  I have a wonderfully clean and well organised application that fulfils the role of PoC admirably.  The code is clean and well written enough for me to be comfortable in handing it over to a more established developer.  The README.md file could simply state: “Built using https://ionicframework.com – see the docs!  (Of course the documentation is slightly more comprehensive than that…)

With the advancement of web APIs (see https://whatwebcando.today/) enabling frameworks like cordova to start to get ‘native’ functionality ‘in the browser’ and Ionic’s support for building Progressive Web Apps (PWAs) out of the box, I can see a very bright future for HTML5.  My biggest concern is that whilst competing on functionality may be the sexier opportunity, the HTML5 apps community can design these new APIs with the UX around security built in from the start.

HTML5 App development

I’ve always been a fan of the concept of HTML5 app development, mostly due to the fact that I knew little Java/ObjectiveC in order to be able to even begin to do native.

That said, in the past 12 months I’ve been able to help out on an iOS app developed in ObjC & Swift; and then a hackathon where we used some neat networking tricks to create the “Internet of Christmas Jumpers” – more on that in a post later in the year.

One of the frameworks I’ve been following for a while is Ionic, and it doesn’t disappoint.  One of the nicest surprises though has been the IDE functionality built out more recently in VSCode.  The cordova-tools extension to VSCode is absolutely fantastic to play with:

I can click and drag on that phone in the bottom right to mimic accelerometer data.  Of course; to tweak the right values you need to play around with a device in the real world – but it’s a neat ‘accelerator’ to places where you require native functionality integration.

The other thing that’s pleasing me more is the developments of Progressive Web Apps, therefore the ability to run a mobile site and download the page/functionality without having to pass through the stringent requirements of individual app stores.  Most ‘apps’ I write are throwaway ideas, rather than productised moneymaking things – and the ability to run these as PWAs allows me to ignore much of the device integration – and focus on the HTML5 bits.

As browser APIs start to provide more and more in depth functionality; the need to do ‘native’ integration is passed over to the Cordova library for performance, and with the wonderful work of the open source community in keeping this every improving, we can be confident that this will continue to be ‘good enough’ for quite a while.

 

 

Wagtail, Django & Heroku

I’ve been sleeping pretty badly recently, so thought last night would be a good opportunity to be productive and start work on a new idea I’ve had for a new site/webApp/mobileApp.

It’s taken a bit of a while to get off the ground, as I wasn’t sure what the best technology would be to write it. I tried a few times kicking off with yeoman.io, but quickly realised it was worth starting with the backend of the system before doing the pretty frontend.

Yeoman is a great system, and I’ve learned alot; I even played around with AngularJS 2.0 before deciding it best to ‘stick to what I know.’

After a conversation with our recruitment manager at work (of all people!) I was introduced to wagtail, a django-based CMS. As I’d already built a PO system on Django (albeit in the pre v1 era) I figured it’d be a good system to build on, and the app integration would work well with the django-rest-framework at a later date.

The final step was to work out how to develop it.  VirtualEnv is a cool little system for python that helps keep all the dependencies locked in with the project; a bit like composer.json and package.json for php and nodeJS respectively.  I then discovered that Heroku would offer free hosting for 18 hours a day for the project, and seemed to be a neat system for dealing with scalability and database .etc.

In my first couple of hours I managed to get a site up and running, and am really impressed with the Wagtail CMS.  Having the familiarity with Django under the hood is also awesome, as setting up Strava  OAuth API Authentication was an absolute breeze.  I can’t wait to get stuck in and get this project off the ground.

Centralising HealthData Storage

Today the guys over at Google released their newest parry against Apple’s dominance by launching Google Fit.  I’m glad that they’ve made this move to combat the perceived potential monopoly of the Apple HealthKit – as it seems that many people are getting excited about the benefits of a centralised record of a person’s physical activities.

My favourite fitness app – Strava

As you’ll see from the little widget on the side of the blog, I am a big fan of Strava.  Yes, it’s got a bit of a bad reputation for male ‘KOMs’ (King of the Mountains) trying to better each other on dangerous stretches of road, and is a little macho-istic in its purpose – but the real benefit for me is to chart and see my progress over the time that I’ve been using it.  Only in the last few weeks have my commutes started becoming ‘achievement free’ – meaning that I’m no longer simply improving my performance on a weekly basis through chugging away on my commute – or that I’ve hit the ‘safe’ limit for speeding around central London through rush hour.

Strava & Veloviewer –  a match made in heaven.

It’s neat though, because I came across a tool called Veloviewer.com which can interact with the Strava API and pull out all my ride data, and then provide better analysis and graphing of my progress.  Want to see my performance on a certain segment over the past 2 years? Sure.  They even start by mirroring the privacy settings of what I’ve kept on Strava.  Perfect.

Twitter & Twitpic – the lesson.

However, they’re developing against a moving target.  There’s nothing stopping Strava from seeing how Veloviewer are using the Strava API, copying their efforts and then closing it down*.  Twitter’s API during it’s boom years was a major incentive for companies like TweetDeck, twitpic & Instagram to all grab onto the shirt-tails and using the twitter API boost their own revenues, however, when Twitter decided to expand and compete directly with them, it was easy to shut down the API and make more advanced functionality a ‘premium’ service.

So, Google Fit.

What Google Fit does, is bring together that fitness data under one, independent* source – that will allow a greater level of trust and compatibility between apps like Strava and Veloviewer.  Garmin recently saw the light at the end of the tunnel and opened up their ‘Garmin Connect’ software to sync data in and out with some key mobile fitness apps – but separating the data from the devices has got to be the ultimate aim in usability.  Sites like veloviewer can leverage the functionality of the GoogleFit REST API, whereas Android apps themselves can use the ‘Android’ interface to get data in and out of the datastore.

What’s the problem?

The problem is that it’s another bit of data that is fairly personal that I’m giving to Google.  Now, Google give me a load of stuff for ‘free’ – and in return I get neat functionality.  Want to track whether my girlfriend is going to beat me home to make dinner – yep; check.  I can do it.  The problem I’ve got is the ‘visibility’ of what Google store on me.  When Google Latitude first came out, it was immediately obvious where the data points were gathered from, and though the interfaces were pretty ugly, you could navigate and quite easily see things like your location history.  The difference in the most modern iteration is that the ‘gateway’ for signing yourself up into this data collection exercise is no longer contextualised.  You buy an Android phone and turn on location services (otherwise people have actually got to use orienteering skills to use Google maps, rather than just follow the blue dot!), and Boom!  Now google did react quite positively to concerns about this, so when you google ‘Location History’ you can see the following link: https://maps.google.co.uk/locationhistory/ – but many people are still freaked out by this.

So, when an interface like Google Fit comes along, it scares me a bit
:

Google Fit

 

It’s so bloody simple it doesn’t really tell me what’s being stored.  At the moment I’ll put this down to ‘freshness’ and hopefully Google will take the same path that they did with location history – but seeing my data stash (being able to import/export from it too) is key functionality that I expect to be developed either by a third party using the Google API – or by Google themselves.

The positive is that they’ve published a paragraph called ‘Responsible use of Google Fit‘ – so at least they’re giving it plenty of thought from the off.

I look forward to seeing the direction this takes, and hopefully more apps like Veloviewer will be able to grow based on today’s announcement.  It’ll be interesting to see how Google manage to compete with Apple’s HealthKit – with Apple clearly taking the initiative on NFC (despite being years late to the party) by proactively curating a network of corporate agreements to get their payment systems integrated with the new ApplePay, versus Google’s passive actions waiting for Contactless, and then NFC to take off organically.

*I have no idea what the incentives of the Strava developers are re: veloviewer, but at the moment it’s all looking rosy from the outside.

Technical Sales

Disclaimer:  Forgive me for the ramble.  I started this blog off on quite a separate topic, and in doing so found myself on quite a different train of thought..  If you do end up staying with me to the end, I’d really appreciate reading your comments so I can start to formulate a more cohesive account of what we are trying to say.

One of the most challenging jobs I consider is the role of technical Sales. I’ve been involved in quite a few software businesses where the salesperson has to have a full grasp of not just the company’s immediate offering, but how it may strategically evolve to become the right choice for the customer.

Ironically there is a parallel here with car industry. Companies like Lucas used to develop car headlamps (their premium models branded “King of the Road”) and other specialist car parts. I have a vague recollection of being on holiday in the West of France with my family when the Vauxhall Frontera was relaunched with a fundamentally different rear suspension system, dramatically improving the car. From the AA:

“Semi-elliptic rear leaf springs gave these early models an unrefined ride, but things changed for the better in April 1995 with the introduction of a coil-sprung rear axle, plus better brakes and improved rear door opening with lifting glass.”

The real crux here is that when there is a major leap forward in technology or innovation, there is a transitional period where the customers who don’t understand the technology need to have a technical salesperson explain the benefits. Once the technology is bedded in, there is less of a need for the technical sales as the technology has become, if not ubiquitous, at least understood in the realm in which it is used.

For digital communications, this same phenomenon appears to have occurred. In the late 90s and early 00s digital was about having an online presence; it then became the focus of communications experts to align the online presence with the offline marketing plans. Following on from this we’ve seen the social media boom, and now marketing departments are starting to understand what social networks are, their advantages and drawbacks, and aligning all their messaging accordingly.

It seems to me that the next jump is going to be another technical one. With the imminent introduction of browser-to-browser communication, what are the innovations or restrictions that such technology may carry? Having recently read (and commented on) @Documentally’s piece on the ‘Perfect Prison‘ – what could the internet look like in another 5 years?

In the last 200 years the majority of the Western World has been fortunate. We’ve been able to align the progress of time with what feels like improvement. This story, perpetuated by the media and by ideas such as “Moore’s Law” has made us believe that through the simple passage of time things will get better*. However, could the real story be that, as a society, we are starting to regress?

I am a huge fan of Hans Rosling, though his talks on the wealth of nations in comparison to life expectancy over the last 200 years aligns more with the first story than the latter.  In them, however, you’ll see anomalies that don’t match the overall story are ignored.  In the disclaimer there’s also the admission that due to the pure volume and scarcity of data, some of it has been ‘normalised’ and ‘interpolated’ to enable its use in the chart.

One of the most intriguing articles I read at the end of 2013 (it was actually published in Feb 2012) was on against TED.  I’ve always had a soft spot for TED.  I used to spend afternoons at college with a friend pinging each other TED talks.  They were a ‘cool’ glimpse into what would be possible in the future.  Intelligent role models taking time to share their ideas in a way that we could easily digest.  The most intriguing part of the criticism for me was the following paragraph:

At TED, “everyone is Steve Jobs” and every idea is treated like an iPad. The conferences have come to resemble religious meetings and the TED talks techno-spiritual sermons, pushing an evangelical, cultish attitude toward “the new ideas that will change the world.” Everything becomes “magical” and “inspirational.” In just the top-ten most-viewed TED talks, we get the messages of “inspiration,” “astonishment,” “insight,” “mathmagic” and the “thrilling potential of SixthSense technology”! The ideas most popular are those that pander to a metaphysical, magical portrayal of the role of technology in the world.

Technology is what we make of it.  As a technologist myself, I’m sometimes the awe of my friends when they come round and see that I’ve got my heating system graphing hourly electricity usage, and I can set my alarm in the morning to not bother turning the hot water on because I know I’ll be showering at work after cycling in.  This isn’t mystical, nor is it a ‘great leap forward’ – it’s actually using five year old technology in a way that the original inventor did not intend.

Behind all the technology that we’re currently using is an inventor that has set the technology up and is manipulating it in some way.  Sometimes it’s obvious and we are fully aware of the manipulation and carry on; other times it’s more subtle.  I think the big change over the next few years will be algorithms that are not used simply to manipulate, but to identify where this manipulation fails and find ways of making it work.  We will be made redundant from our roles as technical salespeople, as people think they understand how the technology works and can make the decisions themselves, but with the oversimplification of the technologies so ‘everyone can understand it’ comes a price.  The price, in this case, is the freedom to choose.

The wonderful world of computing

Well it seems like 2013 gave me a little hiatus from blogging – it wasn’t planned but so many of the projects I was working on were about implementing previous knowledge, not pushing the boat out and learning new things.  In hindsight, I realise that is a big mistake, as well as a bit of an untruth – as pretty much every configuration I’ve touched has improved in some way.

2014 is going to bring with it its own challenges, and I hope to keep as many of them catalogued as possible.  2013 brought me into the world of Rackspace – on both their co-location and cloud services – and I’ve found them  ‘fanatical’ about everything, just as they claim.

I’ve also started picking up some AngularJS and using Yeoman for my scaffolding.  I hope to learn a CSS tool, such as Compass/LESS/SASS and use a templating language such as jade.  I’m also going to kill the blog at www.andyloughran.co.uk and bring it back here.  There’s no point in separating my personal and technical blogs, I’ll just make sure I tag them properly on here so people can read what they choose.

Welcome back, and I wish all of you a prosperous 2014.