Fronteers 2009 Of Hamsters, Feature Creatures and Missed Opportunities

Of hamsters, feature creatures and missed opportunitiesChris&an
Heilmann,
Fronteers,
Amsterdam,
5th
of
November
2009
(remember,
remember)

Hamstering.

h@p://www.flickr.com/photos/codepo8/4066032678/

ID U P ST

h@p://www.flickr.com/photos/atalaya/544843059/

How
we
learnt
web
design
is
not
the
right
way.

WaSP Interact h@p://interact.webstandards.org/

Opera Web Standards curriculumh@p://www.opera.com/company/educa&on/curriculum/

Our
job:
evolving
the
web

Specialists.

Fanboys. * *bleep

Good
 developers
are
 like
librarians.h@p://www.flickr.com/photos/feliciaday/3828388329/

Libraries. (...)

Write
less,
do
more. !=Write
less,
make
it
hard
to
maintain.

Beware
the
feature
 creature.

The
feature
 Simple loop Complex FeedbackFeatures

Shi[ing
our
point
of
view
to
spot
opportuni&es.

Our
technologies
are
shit
 hot.

The
web
is
not
sites.

The
web
is
not
code.

It
is
about
data.h@p://www.flickr.com/photos/22414102@N07/3508671863/

CMS

h@p://www.youtube.com/watch?v=_vJlADxbv4U&

Kobayashi
Maru

h@p://developer.yahoo.com/yql

Photos
from
Flickr?select
*
from
flickr.photos.search
where
text
=
"cat"

Headlines
of
the
New
York
Times?select
*
from
nyt.ar&cle.search
where
query="spontaneous
 combus&on"

Latest
commits
on
a
GitHub
repo?select
*
from
github.repo.commits
where
id='yql'
and
repo='yql‐tables'

Latest
headlines
of
the
Volkskrant?select
&tle
from
html
where
url="h@p://www.volkskrant.nl/"
and
xpath="//h2[@&tle]"

Latest
English
headlines
of
the
Volkskrant? select
*
from
google.translate
where
q
in
(select
&tle
from
html
where
url="h@p://www.volkskrant.nl/"
and
xpath="//h2[@&tle]")
and
target='en'

Upda&ng
Twi@er?use
'h@p://www.yqlblog.net/samples/twi@er.status.xml';insert
into
twi@er.status
(status,username,password) values
(

"In
your
fronteers,
blowing
ur
mindz",











"codepo8",

"didyoureallythinkIshowit?" )

Upda&ng
Wordpress?insert
into
wordpress.post
(&tle,
descrip&on,
blogurl,
username,
password)
 values
("Test
Title",
"This
is
a
test
body",
"h@p://ajaxian.com",
"cheilmann",
"iedoesitright")

Upda&ng
the
internet?delete
from
internet
where
user_agent="MSIE"
and
version
<
8;soz. t ,
 t
 ye N o

Search
one
term
in
Google,
Bing
and
Yahoo?select
*
from
query.mul&
where
queries='select
*
from
microso[.bing
where
query="Jimmy
Hoffa"
and
source
in
("web");select
*
from
google.search
where
q
=
"Jimmy
Hoffa";select
*
from
search.web
where
query
=
"Jimmy
Hoffa" '

1)
Define
your
Query3)
Copy
the
URL.2)
Select
your
output

Or
the
manly
way...h@ps://query.yahooapis.com/v1/public/yql?q={uri‐encoded‐query}& format={xml|json}&diagnos&cs={true|false}& callback={func&on}&env=store%3A%2F%2Fdatatables.org %2Falltableswithkeys

You
can
mix
and
match
whatever
you
want. You
can
sort
and
limit.You
can
extend
with
your
own
data
tables
by
wri&ng
a
schema
and
pu|ng
it
on
GitHub.You
can
store
informa&on
on
the
YQL
servers
(the
cloud,
the
cloud)

Where’s
the
catch?

10k
hits
an
hour
(20k
with
oAuth).100k
hits
a
day.Data
is
cached
for
15
minutes
(soon
customisable).Execu&on
limit
on
the
server
is
30
seconds
(for
now).
 
a ll! at ’s Th

Let’s
bite
into
an
example.

Find
Amsterdam.select
*
from
geo.places
where
text="amsterdam"

Define
Amsterdam
and
get
photos
taken
there.select
*
from
flickr.photos.search
where
woe_id
in
(select
woeid
from
geo.places
where
text="amsterdam" )

Get
all
the
informa&on
about
these
photos.select
*
from
flickr.photos.infor
where
photo_id
in
(select
id
from
flickr.photos.search
where
woe_id
in
(select
woeid
from
geo.places
where
text="amsterdam"))

Get
only
what
we
need.select
farm,
id,
secret,
owner.realname,
server,
&tle,urls.url.content
from
flickr.photos.info
where
photo_id
from
flickr.photos.infor
where
photo_id
in
(select
id
from
flickr.photos.search
where
woe_id
in
(select
woeid
from
geo.places
where
text="amsterdam"))

Select
format
JSON,
define
a
callback
and
copy
and
paste
the
URL. h@ps://query.yahooapis.com/v1/yql?q=select%20*%20from%20flickr.photos.info%20where%20photo_id%20in%20(select%20id%20from%20flickr.photos.search%20where%20woe_id%20in%20(select%20woeid%20from%20geo.places%20where%20text%3D %22amsterdam%22))&format=json&diagnos&cs=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=flickr

Copy
into
a
script
src
and
write
a
few
lines
of
Dom
Scrip&ng.

PROFIT!Too
lazy
to
change
the
demo,
meh.h@p://isithackday.com/hacks/ajaxexperience/flickrgeophotos.html

Also:
FAIL.


Do
not
trust
JavaScript
to
be
available!

So
move
your
JavaScript
server
side!YQL
open
tables
can
have
embedded
JS
that
runs
on
the
YQL
server
(with
Rhino)
and
supports
XML
na&vely
with
E4X.

Flickr
photos
as
ULs
now:use
"h@p://github.com/codepo8/yql‐tables/raw/master/flickr/flickr.photolist.xml"
as
flickr;select
*
from
flickr
where
text="me"
and
loca&on="uk"
and
amount=20

Display
with
JavaScript:

Display
with
PHP:

Join
us!






h@p://github.com/yql/yql‐tables

RTFM









h@p://developer.yahoo.com/yql/

Spend
your
&me
on
making
the
web
fun
for
humans,
not
pleasing
machines.

If
you
are
clever,
you
are
allowed
to
be
lazy.

Replacing
the
web
would
be
tough,
so
use
it
well.


Chris&an
Heilmann
h@p://wait‐&ll‐i.com
 Bedankt!
h@p://developer‐evangelism.com
h@p://twi@er.com/codepo8




Jump directly to slide:

    Easy Slideshare by Christian Heilmann, licensed with BSD License.