Tuesday, March 22, 2011

HTML5 GeoLocation by Scott Ryan @ HTML5 user group

Part of HTML5 standard. Not very standard on desktop browsers, but is relatively very stadard on the mobile browsers. Moderizer library helps see what capabilities the browser has

Basics

5 methods to get geolocation :

  • GPS : most battery consuming, sky view, elevation possible, better accuracy, 4-x of 24 satellite
  • Cell Towers : low power, no sky view, 1-x cell tower, low startup (works well in cities, not in middle of country)
  • wifi :
  • ip lookup
  • assisted GPS
    • cell towers & gps can collaborate to work togather, cell towers can help narrow what satellites to focus on, and delays. cell tower can also do the calculation on the behalf of phone

Cell Towers use : cell towerid : thats what google map uses ( big circle is 1 cid, then multiple cid, circle narrows, pushpin is gps). * other things used : Angle of arrival, time of arrival, signal strength, time difference of arrival etc

Privacy

  • prompts the user per domain
  • non blocking
  • cant bypass via code

Error Messages

  • permission_denied : not all browers, some give unknown error
  • position_unavailable : can also get if the accuracy asked is high some phone say permission denied

two calls

  • getCurrentPosition(function,error_function, options)
    • always get back lat/long, might get altitute
    • accuracy, altitute accurancy (might)
      • speed, heading : no one has implemented
        • options : accuracy, age
    • watchPosition
      • returns the number which is used to stop watching
      • should sample only when locaton changes (significant differences in vendor implementations)

Fall backs

  • Geo.js
  • GoogleGears : has to be installed
  • IP Resolution : yahoo/google has one, few more standard one

Mobile HTML5 by Scott Davis @ HTML5 user group

Mobile phones have become very pervasive.

Apple sold 4.1 macs in 4qtr 2010, 7.3 ipad, 9.1 ipod, 16.3 iphone : 35M mobile vs 4.1 laptops. mobile devices are outselling pcs for first time per IDC

Native vs HTML5 on mobile

  • Native app:

    • great way to sell the app, join one of the app store (apple, andorid marketplace, amazon). they take care of credit card processing etc
    • downside : vetting process
    • have to learn a new language/platform
  • html5

    • basecamp mobile is html5, netflix on other side has an army of developers for each platform
  • change a website a bit to be mobile friendly*

    • mobile resolution on phone is lower than desktop, tablets are closer
    • css3 can do media queries : have css classes based on resolution and web vs mobile
    • portrait vs landscape : css rules for portrait & landscape, cant force an orientation
    • use html5 form elements ( can use in web as they all default automatically to string even in legacy browers)
    • Modernizer library for detecting html5
    • href elemnets like tel:, sms: ( similar to mailto:) ( maps apps open up just with href to google maps)
    • touch & gesture events ( no hover events )
      • remember to cancel default event (which is scrolling), can do on divs
  • change a website a lot to be mobile friendly

    • Localviews, remote data, application cache, local storage
    • Localviews : all “pages” are divs, all “links” show or hide divs, all data is “Ajax call away”
    • application cache: has state, has programatic control
    • local storage: survives browser reboots, session storage cleans on browser reboot

Friday, March 11, 2011

IPad2 3G or IPad wifi + Iphone personal hotspot (AT&T)

IPAD2 wifi or IPAD2 3G well after comparing the data plans I think its a no brainer, specially if you already have iphone 4. (I am on Iphone4 with AT&T) 1. IPAD2 data plan : $15 for 150 and $25 for 2G, $10 for overage. month to month 2. IPhone personal hotsot (ATT calls it Datapro + tethering) : $45 , $10 per GB overage, month to month IPAD2 3g is $130 more than IPAD2 wifi Thus on the iPhone personal hotspot we get extra 2G for $20 vs extra $25, plus as its a hotspot you can tether to your laptop if needed. which i guess you cant on ipad. one think to keep in mind that Ipad 3g comes with GPS chip while wifi model does not. but if you have iphone and dont mind draining both of them down. just go with wifi.

Tuesday, March 8, 2011

[BoulderJug] Title: Introduction to Web Sockets by: Jonny Way : Time Warner Cable

What are web Sockets ?

Part of Html5 : Forms, GeoLocation, File API etc

There is no websocket tag. its a Bi Directional full duplex TCP socket communication. It has its own protocol Its ascii only, binary is in works. Supports TLS. Like most HTML5 tech, this is in works

  • supports real time communication needs like games, chat servers etc.
  • cuts down on http overhead (headers, cookies, 302s)
  • with web sockets its just 2 byte overhead
  • can replace Flash sockeys. XHR long pools, forever frames etc

Var webSocket = new WebSocket(“ws://aaa.bb.com”); webSocket.onMessage webSocket.onClose webSocket.send

problems: - no support in legacy browsers - inconsisent support in browsers that claim support - security concerns is causing ff4 to deprecate suppoer

workaround - comet (XHR long poll) - scalability issues - on client : uses up one of two allowed connection - on server : manage multiple connections - JSONP - bit for a hack - same origin policy does not apply to the dynamically supported ags - forever frame : - invisible frame - mix presentation & functionality etc - flash xmlsockets - not available on mobile platform (iOS) - plugin, debugging etc

solution - socket io : abstracts socket method into unified api (socket.io) - includes server code - open source - jWebSocket - servlet like api - open source - cometD - Dojo driven - Jetty & Glassfish implement it - Pusherapp - SAAS - Atmosphere - comtainer agnostic done by glassfish guy

Scaling challenges - connections have state - communication pipeline to app server - LB needs introspection

Controvery - HTTP upgrade vs CONNECT (verb) : some proxy server dont implement http upgrade correctly, thus some browsers are choosing to use connect for negotiating the protocol (purist dont like this, its abuse of the connet verb)

links - websocket.org - socket.io

Saturday, March 5, 2011

Its a Post-PC world, and we will Love it !

When Steve Jobs speaks the world listens. There is always something for everyone. Geeks, Consumers, product companies etc. And Apple’s March 2nd event did too. The fact that Steve showed up sent the stock up. iPad2 was announced as expected, the Smart Covers stole the show. iOS 4.3 was kinda bonus. But the phrase that was used during the presentation had me thinking: “Post PC Era”.

This catchy phrase has a huge impact on the industry. It essentially declares the death of philiosphy of selling to customer via tech spec alone. It basically says that in new world the technology has to be sold to masses and to geeks and different strategy has to be used.

Post PC world is the world where the tech or specs alone will not get the job done. Its the whole package that the consumer is looking for. Product companies can no longer rely on “geekiness factor”. The old adage that if you build it they will come is no longer true. In post PC world, the common man on the street is target, customer and not the geek of the household. In this world, the tech gadgets are sexy, exciting and inviting they are not scary or elitist anymore.

The focus of the successful companies in this era should be to make gadgets that are exciting, easy, inviting to an average consumer. Making them the fastest, biggest, or packing them with features alone will not cut it. That shouldn’t even be the focus. The focus should be on making the case that the gadget gives the superior experience to the consumer by making the routine chores fun, easy and delightful. The gadget should offer the best user experience for the use cases it supports. Technology alone is meaningless to the consumer, they relate to experience.

for example in the PC world you tell the customer to buy your gadget because it has two cores, in post pc world you tell the customer that your gadget is superior because it can do Video calls with lifelike pictures. Telling the consumer that you have a NFC chip that they can use some day doesnt mean anything to the user, But having an app and an eco system to take advantage of it does. Consumer doesnt know what 256KB ram is, but they can relate to the fact that the gadget will allow them to compose and record music.

So in an Post PC era when apple releases a phone with an camera, it is accompanied by facetime, a complete average men’s Video Conferencing system. When they see the beautiful tablet in an ugly case, they up the bar by designing a smart cover for the next version of the tablet. When they release a tablet with the next generation of technology, it has the next generation of apps to go with it to make a case for why that technology make sense for you.

Thus in this era hardware with superior spec is not enough, it has to be accompanied by an matching software, apis for the app developers and an eco system for after market accessories and an distribution framework to reach the consumers directly.

The Post PC era has risen the stakes, the barrier to entry is high. All the pieces of puzzles have to come togather, being the best in just one of the pieces is no longer enough. and as Jobs likes to say its the intersection of technology with liberal arts.

I think this Post PC world is all about me the consumer and I am loving it. Its good to see the product companies working their tails off to seduce me and I like being the center of attraction for a change ;)