Lecture0 PDF
Lecture0 PDF
David J. Malan
[email protected]
web apps v. native apps
<!DOCTYPE
html>
<html>
<head>
<title>hello,
world</title>
</head>
<body>
hello,
world
</body>
</html>
viewport
<meta
name="viewport"
content="width=device-width"/>
viewport
height
initial-scale
maximum-scale
minimum-scale
user-scalable
width
<!DOCTYPE
html>
<html>
<head>
<link
href="styles.css"
rel="stylesheet">
<title>hello,
world</title>
</head>
<body>
hello,
world
</body>
</html>
frameworks
jQuery Mobile
PhoneGap
Sencha Touch
...
apple-mobile-web-app-capable
<meta
name="apple-mobile-web-app-capable"
content="yes"/>
apple-mobile-web-app-status-bar-style
<meta
name="apple-mobile-web-app-status-bar-style"
content="black"/>
apple-touch-icon.png
<link
rel="apple-touch-icon"
href="custom_icon.png"/>
apple-touch-icon-precomposed.png
<link
rel="apple-touch-icon-precomposed"
href="custom_icon.png"/>
apple-touch-startup-image
<link
rel="apple-touch-startup-image"
href="startup.png"/>
<!DOCTYPE
html>
<html>
<head>
<link
href="styles.css"
rel="stylesheet">
<script
src="scripts.js"></script>
<title>hello,
world</title>
</head>
<body>
hello,
world
</body>
</html>
JavaScript
Building Mobile Applications
Computer Science S-76
prerequisites
iOS device
expectations
1 on web apps
5 on native apps
Mobile Local
Evil Hangman
correctness
design
style
grades
<html>
<head>
<title>My
title</title>
</head>
<body>
<a
href="">My
link</a>
<h1>My
header</h1>
</body>
</html>
<!DOCTYPE
html>
<html>
<head>
<title>My
title</title>
</head>
<body>
<a
href="">My
link</a>
<h1>My
header</h1>
</body>
</html>
JavaScript
<script>
...
</script>
<script
src="file.js"></script>
break
const
continue
do
...
while
for
for
...
in
function
if
...
else
return
switch
throw
try
...
catch
var
while
...
Arrays
[]
Objects
{}
localStorage
.clear
.getItem
.removeItem
.setItem
navigator.geolocation
.getCurrentPosition
jQuery
jquery.com
ajax
source unknown
Objective-C