Sam Croft

Full-stack developer

Tutorial: Using PHP’s JSON encode and decode functions to handle data sent to and from your app

  • 7 comments

Filed in: api, apps, JSON, PhoneGap, php

JSON makes dealing with data in your app exceptionally easy and manageable. The best part about JSON is you can look at it and understand it. It’s not like the confusing spaghetti DOM that you get with XML, it’s a lean minimal representation of your data. If you’re dealing with chunks of data in your app, you want to be using JSON.

So while your app will happily eat up all the JSON you can throw at it, you still need to make it in the first place – and/or have a server side app that is capable of reading it. If, like me, you use PHP to handle things on a server then things are pretty straightforward. You can use PHP’s json_encode and json_decode functions. Encode will take your arrays, or objects, and create a JSON string of your data. While decode will take a JSON string, sent from your app, and turn it into an array or object.

(more…)

My article for Adobe’s Appliness magazine: Loading data into, and posting data from, a PhoneGap app

  • 29 comments

Filed in: android, apps, cordova, iOS, jQuery, JSON, MySQL, PhoneGap, php, zepto

In September we tweeted a photo at RITH of a PhoneGap app we’d been working on. The photo showed the app running on quite a few iOS and Android phones and an iPad. One HTML5 app, running perfectly on many devices, all with different resolutions and pixel densities.

UniApp running on iPhone and Android phones and an iPad

Following a retweet by PhoneGap we were contacted by Adobe’s new magazine, Appliness, to see if we’d like to write an article for their October issue. I jumped at the chance.

(more…)

Responsive button feedback in PhoneGap apps: a better alternative to -webkit-tap-highlight-color

  • 13 comments

Filed in: android, apps, cordova, css, iOS, PhoneGap, zepto

I don’t think I’m alone when I say that the most important thing with a PhoneGap app is that it feels responsive to a users touch. It goes without saying that the easiest argument that web/hybrid app neigh-sayers have is touch response lag. The first thing they’re going to point fingers at and tweet to their native compadres is how many milliseconds it takes for a button to light up when it is touched.

(more…)

How to elegantly handle errors in a PhoneGap app by using device API native notifications

  • 13 comments

Filed in: android, apps, cordova, iOS, jQuery, PhoneGap

Making use of the device API is what makes PhoneGap so brilliant. What’s equally brilliant is how simple it is to integrate some of these functions within your app.

One of these functions is the native notification which can be used in place of, or in addition to, any error messages that you might need to display in your app.

(more…)

Hacked By Shade

  • 10 comments

Filed in: apps, project management, rith, tools

Hacked By Shade

Hacked By Shade

 

GreetZ : Prosox & Sxtz

Hacked By Shade <3