MWC14_Logo-blackBGThe annual Mobile World Congress (#mwc14) event is underway in Barcelona. Those lucky enough to travel there will have already been treated to some surprising announcements, none more so than Nokia launching new android-based phones without the normal Google tie-ins associated with Samsung, Sony and other manufacturers.

The move was surprising to me and “perplexing” to other market analysts as I had assumed until fairly recently that Nokia were riding the two horses of Microsoft Windows for high-end Lumia range handsets and the cheap Asha operating system which replaced Symbian in Nokia’s arsenal for the lower end of the market.

It seems to me that the new X, X+ and XL phones will be a bit of a “dog’s breakfast” in that they will come with Android O/S but run Microsoft Outlook as standard and also incorporate BlackBerry Messenger. But at a cost of under a hundred quid they might be worth a look.

For more details see the story on BBC News – http://www.bbc.co.uk/news/technology-26320552

Please Rate and Like this blog and share it by using the social icons below or via short URL http://bit.ly/1fwFeQX

Our regular readers want to know what YOU think, so please add a Comment.

There have been some high profile instances recently of a Mobile App being “Retired”:

  • LinkedIn for iPad (they are retiring versions prior to 7)
  • Flappy Birds (yes, I know this link goes nowhere – it’s been withdrawn!)

Let’s take the second one first as that has even made CNN News and the pages of TIME as incredulous tech and gaming journalists speculate about the real reasons why anyone would voluntarily sacrifice over $50k a DAY in revenues by withdrawing an App from Apple and Google stores. Maybe Dong Nguyen just made enough money, or maybe he really was getting fed up with something that a lot of App Developers forget about – how to support your App in the ever-changing world of mobile. Or maybe he just wanted to create loads of publicity before cheap imitations like this took over.

In the former example of LinkedIn, like many of you probably,  I’ve been getting emails for a few days now encouraging me to change:

We wanted to follow up and remind you that we’ll no longer be supporting LinkedIn iPad app versions older than 7.0 starting February 18. This will help us focus on creating even better mobile products and experiences for you.

You currently have one of these older apps, but you can download the latest app anytime from the iTunes App Store. It’s a brand new app — we think you’ll like it! With the new app you can now search for jobs — plus like, share, and comment on what you’re reading.

Have questions? Visit our Help Center for more info.

Now, this is in spite of my having updated to version 7.1 of the App almost as soon as it came out as I regularly update my Apps. Why don’t they know that and stop spamming me? Oh, I forgot, that’s what LinkedIn does best…

“So what?”  you say…

Well, one common theme is that the “idea” to “retirement” lifecycle of mobile is fast – less than a few months in flappy birds (rather extreme) case and seems like LinkedIn have put some thought and effort into trying to ensure customers did not continue using their unsupported App version. This is accepted and understood by consumers who most likely downloaded the thing for free anyway but what if you’re the CEO of a company that just invested a few hundred thousand in developing some internal Apps for your employees?

Most people accept that the mobile development landscape is complicated and not getting any easier, in spite of cross-platform tools and web development paradigms so one of your pillars of your Mobile Enterprise is managing those Apps, supporting them, providing updates as operating systems update and, before long, retiring them completely. Have you thought through this before you launch your Apps on to your staff or customers?

We are seeing common trends, one very obvious one is that developing successfully for mobile within the Enterprise needs Agile methods to deliver value. So in a mature organisation a good choice for extending development to cover inception and longer term management could be an extended Agile delivery lifecycle such as provided in Disciplined Agile (DAD). The lifecycle extends your standard iterations to provide the initiation and support parts of the lifecycle.

extended-agile-mobile

The important points are not to stifle innovation, nor to slow down responsiveness to your users’ demands but to make sure you don’t waste your innovators’ time supporting out of date code and you also notify your users to get new versions in an intelligent way. Notification of users seems such a simple and common practice it’s amazing that Windows-8 Mobile doesn’t have common notification management yet although it’s rumoured to be coming soon as the Action Centre.

Having only just bitten the bullet and dumped my Android phone for a shiny new Nokia Windows-8 handset I’m finding first hand now a lot of these subtle differences in maturity between Android, iOS and Windows-Mobile, but Microsoft/Nokia are catching up fast and needs to be part of your mobile first strategy.

Three ‘Smarties’ (code name: 3 Wise Men) were seen blending in with the crowd last night at the Norwich offices of Virgin Wines, for a Christmas special meetup organised by Norfolk Developers (@NorfolkDev) the specialist group for techs by techs.

On a fact-finding mission to gather intelligence and boost their knowledge around Worklight, IBM’s swish mobile development and deployment platform, they didn’t come away empty-handed – or hungry!

Here’s their account:

Covert ops report: filed by JElsey, CSimms and JSpear at 22.00hrs on 04.12.13 in deep cover at Lat 52.634 Long 1.301

From left: Paul Grenyer (NorDev), Vladimir Vladimir Kislicins (IBM) , Andrew Ferrier (IBM) and Dom Davis (Virgin Wines)

From left: Paul Grenyer (NorDev), Vladimir Kislicins (IBM), Andrew Ferrier (IBM), and Dom Davis (Virgin Wines host and NorDev)

A buffet-to-die-for (by @norwichcat) and a delicious choice wines (VirginWines, obviously) ambushed delegates on arrival. Few resisted.

Polite intros by the organisers and adverts about the many tech events in the locality didn’t throw us of the trail. We were 100% focused on the mission at hand (but never underestimate how much is happening for techs and devs in Norfolk thanks to Grenyer, Davis and others).

Vladimir Kislicins, IBM-er at Hursley, was first up. His unassuming and suave delivery looked to us like a “Worklight 101”.  Covering a bit of history and context of Worklight, Kislicins  provided the essential heads-up on things like basic setup and ideal set (you’ve really gotta have iOS and Android devices). He dared a demo or two before the interval.

Eye-witnessing ample vino refills (VirginWines, naturally) and repeated swoops on the buffet, we saw attendees mingling and comparing notes on the event so far. Nobody stood alone. Despite all the hubbub, we retained our cover and stood resolute to our mission; we were here for the facts, not the food… oh ok, maybe one more sandwich then.

Andrew Ferrier, speaking at NorDev

Andrew Ferrier, speaking at NorDev

Andrew Ferrier IBM-er also out of Hursley (@andrewferrier) was second up. Focused on best practices with hybrid and mobile, Ferrier extolled the advantages of Worklight for developers.

And he took off like a gazelle, pouncing this way and that, as he contested the differences between the dojo and jquery mobile frameworks. Armed with his up-beat style and his laser pen pointer, he took us entirely by surprise.  We felt the need to regroup but there just wasn’t time…

Ferrier blasted through debugging options, the pace of change, (iOS 6+: web inspector; Android 4.4) and was unexpectedly intercepted by an inbound challenge on Weinre from dev expert Neil Sedger (@moley666), himself in deep cover amongst the crowd.  But it was ok – Ferrier fielded the intervention with ease and pressed on to cover performance and memory management.

“You have to remember we’re still targeting old devices” he cautioned.  This tip seemed highly significant so we wrote that down, put big quote marks around it and swallowed it. We’d analyse these tops tips later if we all made it back to the safe house (no, not the public house, what do you take us for? Oh c’mon, were meant to be incognitus tonight guys).

Appearance, CSS rules and treatment of lazy-loading images appearing as they are scrolled in were covered before Ferrier could move on to RESTful services.

GET. PUT. POST. DELETE.   – Yup, we got that.

JSON as your data format.  – Yup, got that too.

But Ferrier saved until last his secret weapon – the Worklight Adapter framework. This was very, very neat stuff. Our developers knew to see that one coming, but the crowd clearly didn’t. Ferrier did well to contain his enthusiasm for Worklight Adapters, a jewel in the crown for IBM’s mobile application platform.

Sprinting to finish, Lifecycle would have been Ferrier’s final topic and last hurrah in Norwich, but he saved it for another day and opened the floor for questions.

There was a very lively interactive Q&A, with questions being fired in from all directions. We busied ourselves capturing the intel.

But surprisingly for a tech meetup, everyone was fixated on Worklight pricing. Ferrier looked like he had been tazered, but said he knew nothing about pricing. Pressure from the crowd did force him to let slip the existence of a B2B and B2C pricing model and, crucially, availability of a developer version and a production version.  The secret was going to blown wide open now.

Ferrier cracked and the baying crowd moved in.

“Developers can download Worklight for free!”, he exclaimed,“OK – take it, have a play with it, see what it can do for you, it won’t cost you an penny. But take an app to the outside world, or put it into production in your own organisation, then we’ll obviously have to start charging you.”

We’d got what we came for. It was time to retreat to HQ.

Thinking that Norfolk Developers will be worth another visit in 2014, we disappeared into the night and went our separate ways.

Current status:  Mission accomplished.

No names have been changed. Nobody was that innocent.

Related Links

Blog by James Elsey on Worklight and Continuous Innovation > http://smart421.wordpress.com/2012/11/23/ibm-worklight-making-light-work-of-app-development-in-the-enterprise/

Blog by JSpear on IBM Mobile First > http://smart421.wordpress.com/2013/06/20/with-mobilefirst-ibm-has-just-made-mobile-exciting-again/

Please Rate and Like this blog.  Our readers want to know what YOU think, so please leave a Comment.

Share this blog by clicking on the social buttons below, or via short URL http://bit.ly/18Fjemk

Last week I was fortunate enough to attend my 4th annual DroidCon UK. DroidCon is a 2 day conference held at the Business Design Centre in Islington. London and encourages Android developers and enthusiasts to come together and share their ideas, apps, and advice.

As with previous years, the first day is a bar camp (45 minute talks that are decided on the day, based on who is there and who wants to present something). The second day is more structured with a pre defined schedule of talks. There are also vendor booths around the main hall promoting their products and services.

The purpose of this post is for me to summarise the event and mention some of the key things I took away from it.

Dependency Injection on android
The first talk discussed dependency injection and how it can be achieved on android via libraries such as RoboGuice and Dagger.  A quick show of hands made it clear that very few people in the room are actually following DI. Coming from a predominantly Java/Spring background, I understand the benefits of using DI (giving objects exactly what they need, loose coupling and easier testing), but there is a certain stigma that DI holds when mentioned alongside android. RoboGuice is often assumed to be the “go-to” DI framework, however there is a new kid on the block, dagger, from square.

TestFairy
Without a doubt, this was my favourite session from the conference, I was impressed with the service they offer, and its free! For those of you that have at some point developed an android app, chances are you’ve emailed the APK around to a few friends and asked them to check it out. They may have encountered some errors, but all you’ll likely hear is “it crashed when I clicked the blue button”, which isn’t entirely helpful.

Fortunately, the guys over at TestFairy have developed a service whereby you can upload your APK to your online account, and distribute it to your friends. When your friends install and open the app, their interactions are recorded, so if there is an error you can see a video clip of what they pressed in order to get the error. Logs are included, along with various other useful information such as battery, cpu, memory usage. Finally, you spot that bug that only occurs if an incoming call occurs whilst on your app! Please, please go check them out.

OCR on android
Next up was another bar camp discussion around OCR on android and how it can be achieved by using OpenCV. I was quite interested in this talk as I have done some work with OCR on android/iOS for Aviva. The discussion covered the basics of using the OpenCV library, however the emphasis was mostly on how non-trivial OCR is. I can certainly vouch for that, in order to get results that are even remotely close I needed to use blacklists and whitelists for characters, and pre-process the image. If you’re interested in OCR on android I’d highly recommend having a look at the tess-two project on github, which is a fantastic java wrapper around tesseract tools.

Cupboard
I haven’t delved too deeply into SQLite storage on android, but from what I did experiment with it wasn’t the easiest of APIs to work with. Fortunately there is a library called Cupboard that makes this easier with its fluent API. Hugo Visser, the creator of Cupboard gave a brilliant talk on how to get started using it.

Instant backends with Windows Azure
Microsoft, at an android conference, not what you’d typically expect, however they did provide a great session on how to get started building mobile backends on the Azure platform. Microsoft provide an intuitive interface so you can quite quickly create and deploy a backend with social sign in via the usual providers (Google, Facebook). You’re also able to download client libraries so that you can quickly and easily exchange data between your backend and the mobile client. Whilst this looks like a promising offer enabling you to get moving fast, I’m quite sceptical about whether or not ease/speed is still a benefit once your backend becomes more complex.

There is an excellent tutorial here

Mobile backend starter, from Google
Google is also on the BaaS scene, offering the mobile backend as a starter. This is based on the existing Google cloud platform services like app engine and cloud store. Similar to the Azure offering, you’re able to deploy a sample backend in a few clicks and are given client libraries to make the communication as easy as using a Java API.

A colleague of mine, Charlie Simms also attended the event, here is his take on it

A variety of SDKs were promoted at this years event, such as :

So what did it for me:

The event had 86 line ups so there was plenty to choice from, but having done my MSc at Surrey and been on a Satellite Communications Workshop (http://www.surrey.ac.uk/ee/study/pd/courses/satellite_communications.htm ) I was very interest and puzzled in the Keynote on Friday morning “Smart-Phones in Space” http://uk.droidcon.com/2013/sessions/keynote-smart-phones-in-space-a-guide/ why would you want to put a mobile phone in space. Dr Chris Bridges lead a small team at Surrey University Space Centre (http://www.surrey.ac.uk/ssc/ ) to launch a Nexus 1 into low Earth orbit. This talk provided the journey of the first of many ‘phone-sat’ projects and how hardware and software challenges were overcome to achieve this scientific feat in teaching and research. A brilliant talk both interesting and demonstrating what advanced technology is packed into a smart phone.

The second thing that did it for me was the talk by Benjamin Cabé  “Leveraging Android for the Internet of Things with Eclipse M2M”. Benjamin is an Open-Source M2M evangelist and chair of the Eclipse M2M project (http://m2m.eclipse.org). This talk briefly introduced the Eclipse M2M projects with cool end-to-end examples, combining the use of Android API for doing fleet tracking, remote monitoring, and home automation. Also discussed importantly is the challenge of operating large fleets of M2M devices, with the need for cloud-based scalable infrastructures. With the vast amounts of data being collected from possibly billions of sources there will be an ever greater need for cloud base services and the support for big data. The internet of things still in its infancy but it won’t be long before it starts to impact all our lives in the same way as mobile technology is doing today. Certainly a space to be watched closely.

The weird and wonderful

If you’ve made it this far, then lets end the post on some of the weird and wonderful ways that android is being used.

This year we had the worlds (probably) only android powered hydroponics system for growing plants indoors.

20131025_155750

Android powered hydroponics system from Seraku

There was also an android enabled car, an android powered mirror (which you can operate with your best Tom Cruise “Minority Report” impression), and a guy controlling an android powered robot via his android powered smartwatch

Lego Mindstorms robot controlled via AndroidScript / Smartwatch

Lego Mindstorms robot controlled via AndroidScript / Smartwatch

Conclusion
I feel that every year droidcon has a bit of a theme to it, well perhaps not a theme as such, but there will be one or two topics that are in the limelight of the conference, last year felt like the focus was on NFC, this year there was quite a focus on the backends and security, which may pinpoint androids evolution into the B2E space. With presence from Motorola Rhomobile promoting their enterprise platform, droidcon isn’t just attracting indie developers and B2C solutions.

Please share this blog using the social buttons below or via this short URL  http://bit.ly/1astU7y

Please Rate and Like this blog.  Our readers want to know what YOU think, so please take a moment to leave a Comment.

I have just got round to catching up with some blog posts after holiday season and this one from my KCom colleague Rob Wells caught my eye. I particularly liked the word “phablet” to cover phones and tablets but I’m not sure it will catch on.

Rob makes a compelling case against a proliferation of Apps and for building ‘mobile optimised HTML’ which relies on an initial web server detection mechanism that checks the user agent (Rob says Operating System but I don’t think that’s what he really meant) and then directs the request to the right pages. This is absolutely the right approach given that more and more users are now finding your company websites on mobile than on full-scale laptop screens so immediately directing from “www.acme.co” to “m.acme.co” that is optimised for mobile should be a no-brainer.

I like the KCom portal approach of assuming controls are ‘touch-first’ as well. I overheard a conversation the other day where someone was wondering how long it would be until putting something on a web page like “CLICK” (PC or mouse-oriented) would die out in favour of “TOUCH” here. Perhaps somebody needs to invent a new word that covers both options. I tried out an online thesaurus for touch which offered “tap” or “hit” (and a few other slightly dodgy ones) but synonyms for click were even less helpful.

Anyway, I digress. Rob has made a very good argument for HTML(5) on browser being the target of choice but I would argue it is not always the best option.

Here’s just two reasons why:

1. You’re NOT always online. The Apps I use the most are the ones where I can use them offline (and occasionally synchronise data when the Interweb is available) for example EverNote, Strava or good old faithful email clients. I actually hate Apps that rely on Internet connection to function and avoid them wherever possible.

2. There isn’t very consistent or reliable support for HTML5 in many browsers yet and it’s just as hard to ensure your application works on web browsers as it is with native or “hybrid” Apps with lots of browser-specific catches that you need to work with. For the foreseeable future I can’t see pure web applications having enough functionality to compete with Apps which run natively on the popular handsets.

The nice thing about Hybrid platforms like IBM Worklight or Appcelerator is that you can still use a lot of the common HTML, CSS and JavaScript skills but write them to use APIs into the native features such as encrypted cache through JSONStore for offline storage and benefit from a little bit the best of both worlds. Worklight, which is now a leader in Gartner’s Magic Quadrant of Mobile Application development Platforms has the option to generate a mobile web version as well as version for iOS, Android, Windows 8 and BlackBerry so you can have your cake and eat it. It also addresses the problems highlighted in Rob’s blog of fragmentation of the different mobile platforms plus controlling versions and ensuring security.

There are advocates of both approaches and neither is really right or wrong – as always you need to take a decision based on your requirements, strategy and budget.

Remember this? The IBM Simon Personal Communicator, the world's first smartphone. How times have changed!

Remember this? The IBM Simon Personal Communicator, the world’s first smartphone. How times have changed!

Until now, mobile just hasn’t had the take up by UK enterprises you might expect. But all that seems set to change.

The key drivers are threefold: the first is progressive mobile enablement of the company workforce, or business-to-employee (B2E); the second is individuals like you and me wanting to deal with companies we buy products and services from via a proliferation of mobile phones/tablets/set top consoles, or business-to-consumer (B2C); the third is companies trading with one another via a variety of mobile channels, or business-to-business (B2B).

IBM has a distinct advantage of a fine reputation with large enterprises.  And it is precisely within those enterprises that we think  a very lucrative opportunity resides. Many of those UK enterprises eager to know more about what mobile means for them descended on IBM South Bank in London this week (18 June).

Whereas this 1-day event followed an unremarkable formula (registration, opening plenary, coffee, 2nd keynote, lunch, breakouts, coffee, panel session, closing keynote, beer), in my opinion the content itself was entirely remarkable, taking many I spoke with by surprise in terms of the quality and coverage it provided.

The event was organised by Bob Yelland’s ( @BobYelland ) excellent marketing team and hosted by Mike Spradbery (  @spradders  @IBMMobileUK ), IBM’s charismatic and energetic Mobile leader for UK and Ireland.

IBM’s own journey with mobile is clear and roundly understood; MobileFirst is the apogee of IBM’s go to market proposition in the mobile space. A combination of strategic innovation and business acquisitions is now delivering one of the most coherent offerings we have seen in a long time.

In short, IBM has just made mobile exciting again.

(more…)

Alloys

Which Essex boy doesn’t want Titanium Alloys?
Photo © Maxpro Dreamstime Stock Photos & Stock Free Images

Introduction to Appcelerator

I’ve had my eye on Appcelerator and their Titanium mobile development platform product for some time. So I grabbed the opportunity to venture north of the [Suffolk] border to the “SyncFocus” a SyncNorwich spin-off event that was held in the Garden House Pub, upstairs room, in Norwich last night (20th March).  So, reflecting on my rough notes, I’m posting this blog with a few random thoughts thrown in and some links to further information for those interested in javascript-based mobile developments.

This SyncFocus featured as guest speaker non other than Boydlee.  For those who haven’t heard of Boydlee, he is a mobile application development guru and specialises in the Titanium platform who, like Beyoncé, is now so famous he doesn’t need to use his surname :-) .

My “executive summary” is that Titanium is a serious productivity tool for people who can write “well written” javascript code. It is in competition with the HTML5-based approach of PhoneGap, and does not (yet) have as many surrounding services as IBM Worklight which is squarely aimed at the big Enterprise market and is not as broad in its coverage of operating systems and devices (yet). It does however, have a thriving developer community and a very attractively priced (i.e. “FREE” cloud service). It does appear to be very easy for a moderately skilled javascript developer to create apps but it’s probably just as easy to create a horrendous mess so the newest approach is to supply a framework as the well-known MVC pattern through “Alloys” – which Essex boy doesn’t want Titanium Alloys on their racer?

Main points:

  • Titanium is purely JavaScript library coding against the Titanium api, the platform compiles the source to native Objective-C or Java code for the iOS and Android Apps and can easily be linked with the Xcode or Android SDK to complete the builds.
  • Links with emulators for iPhone, iPad and Android
  • Appcelerator has over 400,000 registered developers worldwide (a counter on their home page tells me it is just under 430,000 today)
  • The libraries themselves are “Free and open source”, available on GitHub
  • However, the Titanium studio is not free, and you can take the Appcelerator Paid support
  • An estimated one third of cross- platform apps are built on titanium
  • Claims to also support BlackBerry 10, but Windows 8 is not available until later this year

One really nice feature is a very large “Module marketplace” which is mostly compiled binary code aimed at one native operating system or the other that can be downloaded and incorporated into the build – for example something to integrate to native libraries, plugins, e.g. Barcode scanning

A lot of those modules also have their source code on GitHub, building the community even more and improving the eco-system. This appears to be thriving and also includes some javascript extensions as well as the compiled native iOS and Android libs.

Appcelerator Mobile Service (ACS)

ACS is an interesting move to give a free level of Mobile (application) Back-end as a Service (MBaaS) to developers of services, running on AWS.

This includes 20GB storage, 5m push, 5m api and 20 pre built common services, including key-value pairs (similar to AWS Simple DB), Ratings, Geo services, media, including thumbnails, Social integration (Facebook) and storage of custom objects, which I think was based on Mongo DB as a service. There is certainly capability to link directly with Node and Mongo backends and simple stuff like SMTP integration (again similar to AWS’s Simple Email Service “SES”).

Coding practices

Boydlee recommended looking into Common.js best practice for relative newbies to Javascript. Other frameworks are available, like backbone, require.js and one of his blog posts has recommended the javascript patterns book by Stoyan Stefanov.

There are also free books online available on styling, including best practices to cascade for tablets so you don’t just get an enlarged phone experience that sucks.

The CSS approach also over-rides for different devices, so it’s not always best to stick with pure javascript for everything, however, for those who really are blinkered by javascript there is a CSS to JSON converter library.

Boydlee’s books are on PACKT or there are kindle versions. Boydlee’s best practices book is one I will be getting for sure.

Finally, the newest developments in Appcelerator will probably be using Alloy which includes full Model View Controller (MVC) frameworks (again, all built on well-known javascript frameworks) that claims to speed up App development by another order of magnitude.

Comparing it with the IBM Mobile First offering the coverage of mobile O/S is much wider in Worklight (Windows 8 and BB 10 were available very soon after launch), the adaptor environment, the upgrade management and enterprise app centre seem more developed and you have the whole extra wrappers of security, analytics and so on within IBM’s Mobile offering. The customer list on Appcelerator’s website is mighty impressive for consumer-oriented Apps but the ability to integrate with Enterprise back-ends is less of a focus, which is why in our case we’re focusing on IBM for Enterprise mobility but Appcelerator is certainly worth considering.

Please Like and Rate this post.  If you can, please leave a Comment.

Ant Allan speaking at 2013 Gartner IAM

Ant Allan speaking at 2013 Gartner IAM Summit, London.
Photo by David Taylor

In the life of an IT professional you end up learning a good deal of information relevant to your profession, at seminars and conferences. When those conferences deal with security, as the Gartner Identity & Access Management Summit 2013 in London near Westminster last week did, then you will often take away lessons for your personal life too.

So when Jeffrey Robinson (@WritingFactory) told us in the closing keynote that 100% of us would be subject to an electronic fraud attack over the course of the next year – multiple times… he was underlining a theme that had been running through the sessions over the two fully-packed days.

Hacking and cyber attacks are no longer (and have not been for a while) a form of entertainment for script kiddies to boast about pwn’ing your server, or workstation… they are big business with plenty of resources.

Peter Armstrong, Identity Assurance Tech Director at CESG, had underlined this on Monday (11 March, 4.15pm), in his session “How to Attack an Online Service, when he explained that part of the Ice IX attack (fuller explanation by John Leyden in The Register, 02 Feb 2012) involves setting up a call centre and diverting your house phone there, so that when the bank calls to verify the suspicious transactions that start appearing. The call centre has enough people to find someone of the same sex, age and regional accent to pretend to be you; and then using a screen with all the harvested details from your hard-disk previously to be able to answer questions about your favourite football team, pet dog, music and film tastes, mother’s maiden name…   et voila !

Criminals no longer bother to rob banks directly, as consumers are much softer targets, and the risks are much lower. Cyber criminals are very unlikely to even see the inside of a courtroom, let alone the inside of a prison; and the rewards are high. Cyber crime is just not going to go away. It is an arms race.

And on the mobile front it is pretty one-sided. Apparently 30% of mobiles have malware on them, with Android being a favourite, Symbian, and even (surprisingly) BlackBerry.

Search the net for ZitMo for one of the big examples.

There are even trojans turning up in the curated app stores. The numbers in the un-curated stores for hacked and rooted hardware must be frightening. The one major defence against having all your passwords (good or bad, weak or strong) harvested by key-loggers on your desk-top/lap-top is good hygiene. There are even viruses which download to your android’s storage, and then infect your PC when you next sync, or mount it as a mass storage device.

All this raises big questions about the suitability of the Bring You Own Device (BYOD) model.

Various exhibitors showcased Mobile Device Management (MDM) products, and walled gardens… and there are various strategies for securing applications in themselves, but most mechanisms that do not classify the device as “totally untrusted” rely on the underlying OS not being compromised. Would a firm be expected to support a rooted device in addition to a stock device? Is it easy to keep corporate data safe, even in “totally untrusted” mode?

So as well as the professional angle of what I do, the IAM conference got me thinking about my own digital safety, in addition to the business application of digital safety.

Many thanks to our partners, ForgeRock, for inviting me along. It was good to get to know more of their excellent team there too.

Please Rate and Like this blog.  If you can, please leave a Comment.

Old record player

Photo: Old record player by Grafphotogpaher (c) Dreamstime Stock Free Images

Those of you accustomed to developing android application will be familiar with the mechanism used for building android apps, such as having the IDE do the work for you, which is somewhat limited, or breaking out and writing ant scripts to orchestrate a build. Some of the adventurous amongst you may be using the maven-android-plugin.

It appears that the Google Android build tools team has come to terms with the fact that ant probably isn’t the best option these days, and are moving towards replacing ant with gradle in the SDK in the future.

Last night I was fortunate enough to attend a Meetup.com event with the London Android Group (@londroid) at the SkillsMatter (@skillsmatter) HQ, where Hans Dockter (@hans_d), the CEO of gradleware gave a presentation on what gradle is, and how it can be used for building android projects, enabling developers to manage their builds with groovy based scripts rather than XML.

What is a build framework anyway?

As Hans put it so well, in short, a build framework will “compile stuff, copy things around, and drop out an archive“.

Whats so limiting with the current options?

Ant can be considered imperative, simply meaning that you have to spoon feed it with instructions via tasks; compile these files that reside here, copy them to this directory, jar it up etc, its not really capable of figuring things out for itself.

Maven on the other hand is considered declarative, meaning that you can focus more on the outputs of a task, such as “I want a web application”, providing you have your source in the right place, maven is smart enough to figure out where to find it, how to compile it, and what the output for a web application should look like. Essentially you tell maven what the inputs are, and what you expect to get out of it, and maven figures out the bit inbetween, thus avoiding the need for scripting tasks as you would have to if using ant.

Sounds great, so what does gradle bring to the android party?

Free beer! If only…but we get the next best thing.

Gradle attempts to take the best parts of ant and maven, by using it for building your android projects you can benefit from:

  • Very light and easy to manage build files, no trawling through humungous XML files. (gradle vs maven).
  • Gradle follows convention over configuration like maven. It knows where your source is for a java project (unless you decide to override it), you can read more about convention over configuration here.
  • Flexible dependency management, integrate with existing maven/ivy repositories. Different versions of dependencies for different build tasks? No problem.
  • It gives you the freedom and flexibility to define your own custom behaviour without needing to write plugins as you would if using maven. Groovy is your friend here.
  • Support for multiple projects. You don’t need to have separate projects for production code and integration tests, you can have keep them within the same project and define different source sets. This greatly reduces parent/child projects that can be a chore to maintain.
  • Don’t have gradle installed? Can’t install gradle easily? No worries, there is gradle wrapper for that. This is particularly useful on CloudBees Jenkins environments where you don’t have access to install gradle directly.
  • You have a free and paid for version of the app, with some common shared library between them? Gradle handles this perfectly via product flavours
  • In addition to free and paid for flavours, you also have builds for different architectures such as ARM and x86? Flavour groups will help you there.
  • You’re not tied to an IDE, the build scripts should be IDE independent so your team can choose their own flavour of IDE, or build from the command line as you would on a jenkins environment.
  • Don’t want to use Eclipse, prefer IntelliJ instead? No worries, apply the idea plugin and run gradle cleanIdea idea. Boom, idea project is setup and ready to go, no messing around with project settings.
  • Easily run instrumentation tests on multiple virtual devices, no need for manual testing each time you make a change.

Getting started?

  1. Watch the presentation
  2. Read through the android build tools page, plenty of information here on how to use the android gradle plugin
  3. Have a read of the gradle documentation, its very well documented.
  4. Checkout the samples on github
  5. Have a browse of the groovy documentation so you can understand the basic syntax of the language.
  6. code, code, code!

Make sure you join the London Android group on meetup.com and look out for future events like this, they’re free and well worth the train ticket. For those in the south east, be sure to checkout SyncIpswich and SyncNorwich for free technology meetups.

Having recently spent time working on the IBM Worklight platform, I thought it would only be fair if I documented some of my findings. No disrespect to the IBM’ers, but its reasonably fair to say that documentation is a little sparse in places, so lets give a little back to the community by discussing some of the hurdles. Lets not dwell on what Worklight is, Andy has already covered this well in a previous post; but lets just dive right into some of the technical aspects.

General Thoughts

Development on the whole is a relatively straightforward process, even for someone like myself that often steers well clear of anything that involves web presentation technologies (it reminds me of dark nights at the university labs spending hours trying to get a button to align correctly, the night before coursework submission *shudder*).

The Worklight eclipse plugin provides a good drag & drop GUI builder, but with support only for dojo. I opted to drop dojo and go for jQuery. jQuery is very well documented, and is easy to get help should you require it. One of the main things I like about jQuery is its showcase and examples, they are documented very well and the learning curve is generally quite small, but also the themeroller, it becomes incredibly easy to customise the default colour scheme and drop the generated CSS into your app. It always amazes me how excited the marketing guys will get if you can add in the corporate colour scheme to your app (thanks Joseph!).

Continuous Integration

We’re big fans of CI here, so I was quite keen to understand how easy it would be to have our Worklight apps built from the command line, and ultimately on a Jenkins CI box. The chaps over at IBM have done a fantastic job of exposing an array of Ant tasks that help with building and deploying apps, you’ll almost certainly want to read through module 42 on the getting started page that covers these tasks:

  • adapter-builder – Use this task to build your adapter and create the .adapter file
  • adapter-deployer – Use this to deploy a .adapter file to a Worklight server (very  useful for deploying to a remote AWS instance)
  • war-builder – Use this to build the server .war file that you will deploy to the application server (some manual tweaks are required)
  • app-builder – Use this to build the .wlapp files that you will deploy into your Worklight container
  • app-deployer – Use this to deploy your .wlapp files onto a Worklight server (useful again for remote deployments)

Lets have a closer look at each of those targets, and how we’re using them here at Smart421:

Getting the party started, with init

Firstly, grab the worklight ant jar (you’ll need to have purchased the WL Enterprise edition for this) and add it into your ant context like so :

<target name="init">
 <echo message="Loading ANT Tool"/>
 <taskdef resource="com/worklight/ant/defaults.properties">
 <classpath>
 <pathelement location="./build-config/worklight-ant.jar"/>
 </classpath>
 </taskdef>
 <property environment="env"/>
 </target>

Now you’re free to use the ant tasks anywhere in your build script.

Building & Deploying WL Adapters

You need to build each adapter individually, and then deploy each one. You can create the following ant targets to do that for you:

<target name="buildAdapters" depends="init">
 <echo message="Building all adapters"/>
 <adapter-builder
 folder="./adapters/TwitterAdapter"
 destinationfolder="./bin"/>
 <!-- Build your other adapters here, same as above-->
</target>

<target name="deployAdapters" depends="init">
 <property name="WLSERVERHOST" value="http://my_aws_ip_here:8080/SmartConf"/>
 <echo message="Deploying all adapters"/>
 <adapter-deployer
 worklightServerHost="${WLSERVERHOST}"
 deployable="./bin/TwitterAdapter.adapter"/>
 <!-- Deploy your other adapters here, same as above-->
</target>

Building the Server WAR

You can build the server war file using the war-builder task, as shown below. It is important to note however, that I needed to do some tweaking to the war file to avoid any post-installation configuration tasks. According to the Worklight forums, there doesn’t appear to be a way to include files in the WEB-INF when the war is created, which means that once you’ve expanded the war on the application server you’d need to manually replace the default web.xml and context.xml files (to set your datasources), this can be quite frustrating, so in true Blue Peter fashion, I’m updating the war file with files I created earlier.

<target name="warBuilder" depends="init">
 <echo message="Building the war file"/>
 <war-builder
 projectfolder="./"
 destinationfolder="./bin"
 warfile="./bin/SmartConf.war"
 classesFolder="./bin/classes"/>
</target>

<target name="updateWar">
 <echo message="Updating the war file"/>
 <war destfile="./bin/SmartConf.war" update="true" webxml="./build-config/web.xml">
 <metainf dir="./build-config" includes="context.xml"/>
 </war>
</target>

Building & Deploying the WL Apps

You’ll also want to automate the building and deploying of the wlapp files, you can do this with the following :

<target name="buildApps">
 <echo message="Building all WL Apps"/>
 <app-builder
 applicationFolder="./apps/Smartconf"
 nativeProjectPrefix="SmartConf"
 outputfolder="./bin"/>
</target>

<target name="deployApps">
 <property name="WLSERVERHOST" value="http://my_aws_ip_here:8080/SmartConf"/>
 <echo message="Deploying all WL Apps"/>
 <app-deployer
 worklightServerHost="${WLSERVERHOST}"
 deployable="./bin/SmartConf-all.wlapp"/>
</target>

Building the Native Application Distributable Binaries You’ve survived this far, and I’m thankful to you for that, however we’re not quite finished yet. Worklight will generate the native projects for you, but its your own responsibility to take those project directories and build the Android APK, or the iOS IPA etc. IBM will draw the line at this point, so you need to build them yourself, you can do this for all of the environments quite easily using additional ant tasks, android is the easiest :

<target name="client-android" depends="buildAndroid">
 <!-- Run the android native build, in its own directory -->
 <ant antfile="./apps/SmartConf/android/native/build.xml" target="release" useNativeBasedir="true"/>
 <!-- Copy up the apk into the bin area, for consistency -->
 <copy file="./apps/SmartConf/android/native/bin/SmartConf-release-unsigned.apk" tofile="./bin/SmartConfSmartConfAndroid.apk" overwrite="true"/>
 </target>

Building Blackberry and iOS apps from the command line is slightly more involved, and I feel they warrant their own blog post on that, alternatively, get in touch and we’d be glad to offer some assistance. Bear in mind you will need an Apple MAC to build iOS, for which we’ve installed a shared box in our build environment.

Other Gotchas

As with taking on board any emerging technology, there will always be plenty of head-scratching moments where the documentation is thin, and Uncle Google doesn’t provide much help, fortunately for you, we’re a nice bunch of guys here at Smart421 so we’ll share some of the things that had us pondering over a coffee:

  • The trailing “/” in the Worklight server host URL is required, don’t ask why, it just is.
  • The versioning conventions for Worklight are a little strange5.0.0.270 = v5.0 GA, but the developer edition is 5.0.2.407-developer-edition = 5.0.0.3.
  • If you have an existing 5.0.0.2 WL server installation, don’t upgrade it to 5.0.0.3, it fails to upgrade all components and leaves you with some obscure error messages that are hard to trace. The best plan of action is to uninstall, install again, but make sure you check for updates at time of installing, via the wizard
  • App crashes with Unreachable host? When you build and deploy the app to your device, it has the WL server IP hardcoded into it. The next day when you arrive at the office and hop onto the Wifi, DHCP gives you a different IP address…It’s a classic schoolboy error, but catches us out from time to time. A simple solution if you don’t have a spare box lying around is to install the Worklight server on AWS and deploy to the cloud, bearing in mind that it needs to be open to your mobile devices over the Internet in a real-life installation anyway.
  • Results is undefined on adapter call. A subtle difference here, HTTP adapters use invocationResult.results, whereas SQL adapters use invocationResults.result. That last character makes all the difference.
  • Response cannot be parsed, please contact support; this is an annoying error that you often see in the developer preview, just make sure you set the body onload to WL.Client.init() as mentioned here.
  • Unable to use geolocation services on android? You’re probably seeing Caught security exception registering for location updates from the system, this should only happen in DumpRenderTree. Make sure you have the geolocations permission in your android manifest as detailed here.

Conclusion

On the whole, I was very impressed with Worklight, they are offering a lot of functionality over and above the standard Cordova project. Some of the errors I’ve encountered have been a little frustrating, as often my only source of help was the forums, but I can accept that it is a product in its early stages of adoption, and will probably go very far. I’m looking forward to working with it in the future.

If you’d like to have a look at some of the apps we’re creating, or generally just want a chat about Worklight and some of its capabilities, or Mobility in general, we’d love to hear from you.

Follow

Get every new post delivered to your Inbox.

Join 1,122 other followers