Mobile Applications

From Wikicliki
Jump to: navigation, search

Decided that my goal for the year 2013 should be to learn at least one new language/development platform, or maybe something practical like how to build a mobile app. As a flash developer I figure this is not too difficult to get into. But there were so many methods and platforms I could get into, each being so specific. So I began by trying to understand mobile application strategy first...

Mobile Application Development Strategy

I began by listening to Welcome to How To Build A Mobile App by General Assembly in the background whilst i worked. This wasn't so much a talk on making apps as it was about mobile app strategies on udemy. Now this might sound like boring advertising drivel but actually fairly practical in helping me think about what I am learning it for and what to learn specifically (and what not to learn).

Four probable ways of thinking about how to develop a mobile app:

  • mobile sites
  • simple apps - eg: Phonegap (basic html5 app)
  • cross platform native - when you are more serious about wanting something with a native look and field - eg: Appcelerator Titanium (use html5 and say get me a native button here etc)
  • native apps - when you are actually writing Objective-C which gives you absolute best performance but you gotta have the right programmers then

What I learnt from this:

  • Discovered that udemy has a 1.25x button so i can speed it up a little HOORAY!!! Now everyone can speak faster!!!! I love this rate of absorption! This is how everyone should speak!!!
  • jquerymobile is awesome and really crossplatform for building dedicated mobile websites! it is very popular and is quick to work with for html/css developers.
  • Phonegap will result in apps that do not look like iOs natives no matter what you do. Pity!

Mobile sites Code Snippets

You can redirect users to mobile site. A few methods follow here but do think of it as a challenge to make a responsive design across many platforms/devices rather than just about finding out specific screensize and specific device name.

Redirecting to mobile site with javascript based on screen area:

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "mobilesite.html";
}
//-->
</script>

Redirecting to mobile site based on useragent:

<script type="text/javascript">
<!--
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
   location.replace("http://mymobilesite.url");
}
-->
</script>

Another possible method using a switchcase sorta thing:

var isMobile = {
    Android: function() {
        return navigator.userAgent.match(/Android/i) ? true : false;
    },
    BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i) ? true : false;
    },
    iOS: function() {
        return navigator.userAgent.match(/iPhone|iPad|iPod/i) ? true : false;
    },
    Windows: function() {
        return navigator.userAgent.match(/IEMobile/i) ? true : false;
    },
    any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows());
    }
};

if (isMobile.any()) {
    window.location = 'http://mymobilesite.url';
}

Why use mobile app instead of mobile site

  • Can use user's camera, compass, gyro, gps more consistently than with a web browser (wait for a few more years for things to standardize)
  • Access user's contact list (no one wants a website to go through their contact list, but maybe their phone app isn't that bad...)
  • Ability to use app offline or download offline content
  • Better Performance
  • Self-branding
  • OMG Uploading to App store yay!

Thoughts

  • use Phonegap for projects where speed of development or cross platform support is more important than UX
  • if i learn objective c so i can build in it, whatever "performance" benefits of objective c may be offset by my memory leaks from my beginning coding....
  • if i learn phonegap it seems a concern is about attaining the right UX and interface look which automatically comes with native apps...
  • do i really need standard looking apps?
  • how long would it take me to learn phonegap anyway? vs the learning curve for objective c? i already can do html5 after all... wouldn't it be easy to learn phonegap in a few days? (even titanium might take a week or more, let alone objective c which would be significantly harder) (but shouldn't i pick the more challenging option?)
  • Instructor at iOs course says in his opinion there are probably no good html5 based apps besides linkedin which is anyway very simple.

FOR STARTERS: things i wanted to build

  • Sound mapping app
  • singapore stuff map app
  • toolbox app as a tester
  • qrcode reader app ???
  • magnetic poetry app

See also