International Business Environments and Operations 16th Global Edition test b...
With jQuery & CakePHP to World Domination
1. CakeFest Orlando 2008
With jQuery & CakePHP to
World Domination
by Felix Geisendörfer
2. About me
• Felix Geisendörfer, 20 years old, Germany
• Blogger / Programmer / Entrepreneur
• Used jQuery & CakePHP in all battle fields
• School projects, small business sites, 300++ DB table
monster project
11. World Domination
Mauryan Empire Persian Empire
Soviet Union Mongol Empire
Macedonian Empire
Roman Empire
Nazi Germany
Ming Empire Portuguese empire
Arab Caliphate
French Empire
Spanish Empire
Habsburg Empire
Japanese Empire
British Empire
American Empire
12. World Domination
Mauryan Empire Persian Empire
Soviet Union
& is
Mongol Empire
Roman Empire ut Macedonian Empire
r
N or Caliphate
p N Arab
Nazi Germany
h Empire
Ming Empire Portuguese empire
P ck
French
Spanish Empire
u Habsburg Empire
hEmpire
C
Japanese
British Empire
American Empire
26. Confusing
wh at
d o es ?
e e
r e fro m
w h m
F,
T de c o
W lu
i nc
27. How to KISS this?
• Have a central place to define JS includes
• Only one reference to each JS file
• Simple rules for inclusion on a per action
basis
28. Rule based JS inclusion
app/config/js_includes.php (custom approach, not in cake core!)
29. The inclusion rule parser
ib le
Fl ex
T he
(Google “33 Lines of Magic Code”)
Will talk about this in tomorrows
talks
30. Automatic JS inclusion
• If “app/webroot/js/views/layouts/{layout}.js”
exists -> load it
• If “app/webroot/js/views/{controller}/{view}.js”
exists -> load it
38. MVC concept
HTML / DOM
Model
CSS
View
JavaScript
Controller
39. Ask audience
Microformats who has heard
about
Microformat
• A collection of standardized HTML
snippets
• Can be parsed by spiders, making your site
semantic in a way thats actually useful
• Examples: hCard, rel-license, adr, geo ...
40. jayDom Microformats
• Usually non-standardized formats, custom
to your application
• Can change as your app evolves
• You are already using them
44. Microformat I/O
• In order to read data from our
microformat, we need to parse it
• If we want to update our data we also need
to be able to write to the microformat
45. Reading Microformat data
Microformat snippet we are interested in
Task.progress
Ask: Anybody who doesn’t
know regex?
How to parse the encoded progress value