Friday, May 02, 2014

WDC 2.8 ImProve ur ajax app

what is reliable service?

it is context dependend

reliable ajax service
99% time
doesnt get stuck
handle required number of request

but many fail
- bad input
- connectivity and timeout
- encoding
- server error
- client abort

--
clientside error
server error
error after processing

--
demo
error in client no one knows
solution
use window.onerror and handle the error
u can debug using print stack
angularjs errorhandler


-- handle server handler
give info with error obj.

-- status code
avoid 404 coz u can't differntiate whether it hit ur server or not instead using error obj

--
use angularjs error interceptors

--
put notification if there is no internetconnection 

- offline storage
use firedb or couchdb

---
handle error is not only tech thing bust all decision maker need to get involved

--
increase reliable also increase complexity

summary
- log errors
- handle errors

No comments: