Wednesday 12 September 2012

If you are better than facebook engineer..than go ahead with HTML5

Yesterday, M. Zuckerberg talked about HTML5 as a mistake for the facebook iphone and android app.

Exactly:
When I’m introspective about the last few years I think the biggest mistake that we made, as a company, is betting too much on HTML5 as opposed to native… because it just wasn’t there. And it’s not that HTML5 is bad. I’m actually, on long-term, really excited about it. One of the things that’s interesting is we actually have more people on a daily basis using mobile Web Facebook than we have using our iOS or Android apps combined. So mobile Web is a big thing for us.
Quote from http://blog.tobie.me/post/31366970040/when-im-introspective-about-the-last-few-years-i

(maybe people use Web Facebook instead of native version because the previous version was buggy. Changes are hard to made)


I totally agree about HTML5... but I also think that for any app out there, use HTML5 as a one solution for all the mobile platform out there, and as the main platform to build app is a mistake.
I don't have a good opinion of HTML5 on mobile, for many reason:
  • it is a growing and evolving tecnology with a not defined standard: there are 2 standards now..
  • you lose the link to the hardware and also control, if you need it.
  • I don't believe personally to solution/framework that can works everywhere.. You need compromise; compromise means poor integration & bad performance and so a bad user experience.
  • Not all the mobile browsers are the same: on android platform, you can find different browser installed, with different rendering engine. Yes you can choose to support only some browser.. but don't you choose HTML5 because it can runs everywhere?
  • Javascript performance may differ a lot from a platform to another: means slow speed on some device.
  • The time spent improving App/OS integration..cost.
  • No store exist yet... and if it exists.. needs a lot of app that are not native (if not why a user should point to the html5 store?)
  • it is early: maybe in the future will be the best choice. We don't really know if it will be the best and when.. we know is not now.
It also have good points:
  • HTML is a good solution for content rendering: if you need to show rich text, with images as an example.
  • Easy to prototype an app.
and I also don't think to be better than all those nerds engineer at facebook.. so...

Platforms matter
As a personal experience IOS and Android have done a lot in terms of HTML5 integration..and they are continuing to do it but it is not enough, at least for now...for an example in these platform you can't access:
- camera and than shoot photos (for example no QrCode sorry)
- PIM
- Media
- .. many others things
I don't have any experience on Windows Phone platform.. so I can't say more about that.

Damn, I want to make an HTML5 app
You have some choices:
  • if you don't need hardware integration, your app display contents grabbed from a web service.. you can accept UI compromise..performance...and you will package your app inside a WebKit window of a native app.. ok go ahead with your HTML5 app
  • choose a platform with HTML5 capabilities: Firefox Mobile OS and BlackBerry OS 10.
I have saw enough things of Firefox Mobile OS to say it is not ready, not interesting and it is in a evolving state.. and more important.. may have a 0% market impact when you will see a firefox phone.
It's simple early for Firefox Mobile OS. Someone said Tizen? Same story there.

BlackBerry is pushing a lot their new platform BBOS10, but first of all, they are believing in you, as a developer: pushing a lot of support on forums and social network.

They can't make mistakes (who really can?) for the new platform release (2013) and they have a real HTML5 support on BBOS10! Read More here
There is a growing community.. so if you choose to develop for HTML5, it is time to choose BBOS10.

Tuesday 11 September 2012

Playing with OAuth 2.0: how does it works?

Recently I have started to play with a new mobile platform.
Tipically the things that I do when I have a new platform to learn are:
- read general documentation of the platform
- try to realize an application from scratch with the new platform

Just because the project that I have in mind use OAuth I had the necessity to understand how it works.
Many portal and website  nowadays use this protocol for users authentication.

The idea is based on soundcloud and its api…
If you search on the site you will find a lot of documentation, also library, for  the most famous mobile platform (android and ios) but not a general way on how OAuth should works and how you, as developer, should handle it.
Results from a search on the web show me detailed complicated explanation or specific platform dependent explanations ( for the specific api or platform)

Talk auth2.0
With auth2.0 applications the security of your accounts improves.
A client with OAuth never ask for your username and password, instead, it ask authorization from the server where your account is.
The server (typically a famous service like Facebook,twitter, gmail…) than ask you to login(if you are not already logged) and ask if you would like to authorize the application.
If the user authorize the application the server send back to the application a token, something like a string of numbers and letters.
The application than will store the token locally and use that token for next api request to the service.
Someone can hack the application and get the saved token (it can expire and be invalidated also by the users) but it doesn't have access to your account… so your account still remain safe!

An image is better than thousands words...


simple uhm?
you connect to the credential page asking to the user to login (if it is not already logged) and than authorize the application.
the server than send back a message with a code.
with that code you can ask for a token...and with the token you can finally make api requests.

In the next post, I will show a specific implementation…based on soundcloud api!

Tuesday 4 September 2012

Tethering indicator... on github!

Ok!
First Alpha of Tethering Indicator is out!

 The client application on mac... as you can see the connection of the phone was 2G :/


It is not perfect.. and a little buggy.. but it works... need improvements and the main ingredient of all good application... TIME!

So for now I will stop to develop it , but I have commited the code on github .. so anyone that wants to try it ... can test it, improve it and change it :)
I'm not so good with osx development (I'm a bit new) so I hope that someone will change and fix the code... so I can learn something too :)

I'm not leaving the project, I've just want to develop something different for the next month
I will publish update everytime I can!
GITHUB TETHERING INDICATOR

Other post about tetheringindicator here