skeuomorphs, databases, and mobile performance
TRANSCRIPT
![Page 1: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/1.jpg)
Skeuomorphs, Databases, and Mobile PerformanceArchitecting for performance with devices & APIs
Sam Ramji @sramjiApigee
groups.google.com/group/api-craft
![Page 2: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/2.jpg)
SKEUOMORPHS
![Page 3: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/3.jpg)
A brief history of architecture
![Page 4: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/4.jpg)
Banister FletcherA History of Architecture
![Page 5: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/5.jpg)
![Page 6: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/6.jpg)
![Page 7: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/7.jpg)
“ Greek columns and their entablatures were at first entirely of timber, with terra-cotta decorations in the upper trabeation, but were converted into stone quite early in the [Hellenic] period, about 600 BC. The translation was quite direct, timber forms being imitated in stonework with remarkable exactness. For this reason, Greek architecture sometimes has been called a ‘carpentry in marble’…
Banister FletcherA History of Architecture
![Page 8: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/8.jpg)
![Page 9: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/9.jpg)
![Page 10: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/10.jpg)
![Page 11: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/11.jpg)
![Page 12: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/12.jpg)
![Page 13: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/13.jpg)
Skeuomorphs and metaphors
![Page 14: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/14.jpg)
Skeuomorph
A skeuomorph is a design feature found on an imitation, pastiche or homage that was necessary only to the original. Often used for the sake of familiarity, they are details that have moved from function to form.
Tom Pettyhipstercheerleaders.com
![Page 15: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/15.jpg)
Metaphor
In cognitive linguistics, conceptual metaphor, or cognitive metaphor, refers to the understanding of one idea, or conceptual domain, in terms of another, for example, understanding quantity in terms of directionality (e.g. "prices are rising").
Wikipedia.orgConceptual Metaphors
![Page 16: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/16.jpg)
“ The concepts that govern our thought are not just matters of the intellect. They also govern our everyday functioning, down to the most mundane details. Our concepts structure what we perceive, how we get around in the world, and how we relate to other people. Our conceptual system thus plays a central role in defining our everyday realities. If we are right in suggesting that our conceptual system is largely metaphorical, then the way we thinks what we experience, and what we do every day is very much a matter of metaphor.
George Lakoff and Mark JohnsonMetaphors We Live By
![Page 17: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/17.jpg)
DATABASES
![Page 18: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/18.jpg)
A brief history of architectureapplication
^
![Page 19: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/19.jpg)
Mainframe
Minicomputer
Integrated
PersonalComputer
Smartphone
Connected Devices
Website
Client/Server
Web App
DCOM
Distributed
CORBA
N-tier
Computing Architectures
![Page 20: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/20.jpg)
Data Architectures
Flat file
Mainframe
Silos
Caching DBs
Domain-specificData APIs
RDBMS
Data APIData
Warehousing
Shared
Private Cloud DBs
![Page 21: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/21.jpg)
![Page 22: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/22.jpg)
![Page 23: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/23.jpg)
![Page 24: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/24.jpg)
![Page 25: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/25.jpg)
![Page 26: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/26.jpg)
![Page 27: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/27.jpg)
![Page 28: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/28.jpg)
![Page 29: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/29.jpg)
![Page 30: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/30.jpg)
![Page 31: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/31.jpg)
![Page 32: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/32.jpg)
![Page 33: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/33.jpg)
![Page 34: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/34.jpg)
![Page 35: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/35.jpg)
![Page 36: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/36.jpg)
API
![Page 37: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/37.jpg)
API
![Page 38: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/38.jpg)
We’ve come back to client-server computing
![Page 39: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/39.jpg)
From the perspective of the mobile client,the Internet is a database.
![Page 40: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/40.jpg)
Is that a skeuomorph or a metaphor?
![Page 41: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/41.jpg)
If the Internet is a database, what have we learned from prior eras aboutarchitecting for performance?
![Page 42: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/42.jpg)
MOBILE PERFORMANCE
![Page 43: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/43.jpg)
The classic client-server problem returns
![Page 44: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/44.jpg)
If the database is slow, the app is slow.
![Page 45: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/45.jpg)
Research shows that people will put up with about 1.5 seconds between interactions.
![Page 46: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/46.jpg)
More than 3 seconds on average and they’ll stop using the app.
![Page 47: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/47.jpg)
This is a problem.
![Page 48: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/48.jpg)
Let’s dig into our client-server history to break it down.
![Page 49: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/49.jpg)
Make the application smarter
Use the network intelligently
Optimize the database aggressively
![Page 50: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/50.jpg)
MAKE THE APPLICATIONSMARTER
![Page 51: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/51.jpg)
What makes the app feel fast to the user?
application
![Page 52: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/52.jpg)
Time to first render
Time to first interaction
Time between interactions
application
![Page 53: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/53.jpg)
Three mutually reinforcing techniques:
Code profiling for performance optimization
Threading/concurrency for user interactions
Client-side caching for everything else
application
![Page 54: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/54.jpg)
Use the profiler to see where you’re slow
Write faster code where you see big gains
Run long operations in parallel
Keep local copies of everything you need
application
![Page 55: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/55.jpg)
Concurrency
application
![Page 56: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/56.jpg)
![Page 57: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/57.jpg)
Anticipation
application
![Page 58: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/58.jpg)
![Page 59: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/59.jpg)
![Page 60: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/60.jpg)
Caching
application
![Page 61: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/61.jpg)
![Page 62: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/62.jpg)
![Page 63: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/63.jpg)
What should you be caching locally?
Security credentials or tokensLast user session dataMRU (Most recently used)MFU (Most frequently used)LFC (Least frequently changed)API write operationsGraceful fallbacks for failed API calls
application
![Page 64: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/64.jpg)
Issues do remain
Can’t hit local cache on first use of appReceiving the right shape of data
application
![Page 65: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/65.jpg)
USE THE NETWORKINTELLIGENTLY
![Page 66: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/66.jpg)
The radio network is a high-latency,
limited-resource environment.
network
![Page 67: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/67.jpg)
![Page 68: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/68.jpg)
Speed and battery usage are both important dimensions of mobile performance
network
![Page 69: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/69.jpg)
![Page 70: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/70.jpg)
Intermittent usage of the radio for
pingbackskeep-alivesanalyticsscreen rotations
will slow you down and burn battery.
network
![Page 71: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/71.jpg)
![Page 72: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/72.jpg)
A better approach:
Bundling, piggybacking, and pipelining
network
![Page 73: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/73.jpg)
Battery cost of a series of small API requests
network
Bundling a set of API requests
Idle
Connectionsetup
Datatransfer
Tailtime
2 sec n sec 15 sec
90 sec of radio use and battery burn
19 sec
![Page 74: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/74.jpg)
Intermittent analytics and keep-alives
network
Piggybacking on a set of user API requests
90 sec of radio use and battery burn
19 sec
![Page 75: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/75.jpg)
API calls in series
network
API pipelining
200 ms 200 ms 200 ms 200 ms 200 ms
1000 ms
![Page 76: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/76.jpg)
Bundling loosely-related requests together
Piggybacking secondary intermittent traffic
Pipelining requests to maximize throughput
![Page 77: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/77.jpg)
OPTIMIZE THE DATABASEAGGRESSIVELY
![Page 78: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/78.jpg)
What were our old database optimization tricksthat we can apply to Internet data?
database
![Page 79: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/79.jpg)
database
Stored Procedures
Queueing
Denormalization
Result Sets
![Page 80: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/80.jpg)
database
What is a Stored Procedure in this world?
Server-side code that executes complex operations
Ones that should happen right next to the data
Where you need high compute and low latency
Could be written in node.js, ruby, java, python, c#
![Page 81: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/81.jpg)
database
Where does a Stored Procedure run in this world?
![Page 82: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/82.jpg)
database
Where does a Stored Procedure run in this world?
Probably in a cloud
![Page 83: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/83.jpg)
Once you’ve built this architectural layeryou gain a lot of control
database
![Page 84: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/84.jpg)
You can deal with queueing, denormalization, and manage result sets properly.
database
![Page 85: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/85.jpg)
Queueing enables you to break the request/response pair into separate pieces
You may even be able to tell the client when to call you back for the result
Making your requests to this queueing layer also lets you serve from a cloud-side cache if you have one
database
![Page 86: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/86.jpg)
Denormalization refers to writing multiple indexes in order to optimize query performance
Where your app relies on your own data, don’t make it wait for slow queries
Remember, in the cloud, storage is cheap and easy to obtain – write data as often as needed to improve query speeds.
database
![Page 87: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/87.jpg)
Managing result sets to save bandwidth and response time means limiting cursor size by default
This can be complementary to the caches you keep around, since a massive API result is cheap to manage in the cloud
and can be trickled back to the app in bite-size chunks.
database
![Page 88: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/88.jpg)
Managing result sets to save processor time for the client is an option as well.
What would happen if you could focus onapp-shaped data?
database
![Page 89: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/89.jpg)
var parseXml; if (typeof window.DOMParser != "undefined") { parseXml = function(xmlStr) {
return (new window.DOMParser()).parseFromString(xmlStr,"text/xml"); }; } else if (typeof window.ActiveXObject != "undefined" && new window.ActiveXObject("Microsoft.XMLDOM")) { parseXml = function(xmlStr) { var xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = "false"; xmlDoc.loadXML(xmlStr); return xmlDoc; }; } else { throw new Error("No XML parser found"); }
var xml = parseXml("<result>true</result><count>1</count>"); alert(xml.documentElement.nodeName);
XML in Javascript
![Page 90: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/90.jpg)
JSON in Javascript
var json = '{"result":true,"count":1}', obj = JSON.parse(json);
alert(obj.count);
![Page 91: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/91.jpg)
INCLOSING
![Page 92: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/92.jpg)
There are a few things we can borrow from the pastto help us right now
![Page 93: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/93.jpg)
Make the application smarter
Use the network intelligently
Optimize the database aggressively
![Page 94: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/94.jpg)
What did you decide about the statement
“The internet is a database”?
![Page 95: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/95.jpg)
Carpentry in marble?
or cognitive tool?
![Page 96: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/96.jpg)
Skeuomorph?
or metaphor?
![Page 97: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/97.jpg)
groups.google.com/group/api-craft
![Page 98: Skeuomorphs, Databases, and Mobile Performance](https://reader035.vdocument.in/reader035/viewer/2022070315/554f29a1b4c9058b388b55eb/html5/thumbnails/98.jpg)
THANK YOUQuestions and ideas to:
@sramji
groups.google.com/group/api-craft