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 ďŹelds
⢠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
19. Jaxer: The new guy in town
⢠Write entire web applications in JavaScript
⢠MySQL, SQLite, SMTP, File system access
⢠Server process stays alive
20. Jaxer: Why not?
⢠No Linux version yet Jaxer also works with
(Cake)PHP
⢠Might not scale
⢠No Framework yet
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 deďŹne JS includes
⢠Only one reference to each JS ďŹle
⢠Simple rules for inclusion on a per action
basis
28. Rule based JS inclusion
app/conďŹg/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
36. PostTask.com
⢠Personal time management
⢠Next step: Becoming the best project
management tool
⢠After that: World Domination l Break
e rcia
Co mm
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
58. jQuery Selectors on steriods
Select all tasks with the name âNew Taskâ
Select all tasks that are more then half done
59. jQuery Selectors on steriods
⢠Find all Posts
⢠That have at least one Comment written by
Felix
⢠Only return posts that visible (not hidden)