and me you
Dave Dash // Spindrop.us // 2007 September 7
* Beginner’s track: Ajax + symfony
* Who’s used symfony/other frameworks/ajax? Who’s a novice?
* Who can tell us what Ajax is?
* AJAX makes web pages more responsive by exchanging small amounts of data with server behind the scenes
* interactions are recorded quickly
* AJAX is secretly DRY (=
you at yo eat y peat ep
urs ours your
don lf. do elf. d elf. s
’t re n’t
rep pea repe t rep t
you eat yo t y at y eat
rse urs our
don lf. do elf. d self. self
on’ don’ .
’t re n’t
eat peat repea t rep t rep
you you t yo eat y
lf. d rself. rself urse ou
don don . don lf. do
’t re on’t
eat peat repea ’t rep ’t rep n
you you t yo eat y eat
lf. d rself. rself urse ours
don don . don lf. do el
’t re on’t
rep pea repe ’t rep ’t re n’t r
you eat yo t y eat peat e
rse our you you
lf. d elf. elf.
don don . do rself.
rep ’t rep t re do
’t re ’t r n’t
eat pea epea repe
you t yo
you t yo t yo at
lf. d elf. ursel urse
you on’ lf
don f. d
rse t re ’t re on’t
lf. d pea pea pea r
t re t you t you t yo
* coders don’t repeat self, we use DRY, we make functions to do work that’s been done already
pea rsel u
* server should be no different, why re-serve content again. Just sent what needs updating
* how revolutionary!
t yo f. do lf. do
* AJAX instrumental to my introduction to symfony
* 2 years ago Gmaps API caught my attention
As easy as riding a bike
* Google Maps API
* I started biking (not like Amsterdam in Minneapolis)
* Bike Routing over Google Maps
* AJAX interactions to retrieve/set the route coordinates
* Soon, digg posted a tutorial about creating a digg like interactions using a PHP framework
* creating a digg like interactions
* This was my gateway to the askeet tutorial for symfony and I was sold immediately
* AJAX has been around a while
* Gmail, g-apps made it very popular, pushed envelope
* Open to a whole new world
* Digg meaningless w/o AJAX
* 849 people aren’t going to wait for a form to submit
* Cope with info-overload.
* Many articles to digg!
* Increase in responsiveness/usability opens door to new features/apps
* getting a perspective into web2.0 users mind
* web apps > collection of database driven modules/actions
* each page fully featured interactive tools
* pull/push data as needed
* Francois suggested we can turn pages into static and using AJAX to populate the dynamic parts
symfony and AJAX
* AJAX manually = slow
* sf bundled with Prototype/Script.aculo.us
* helpers make AJAX in symfony easier
* coding consistent = no JS required
* There is an object
* It has an event
* The event triggers an AJAX call
* The response usually replaces the content of a target div.
* There's plenty of useful variations on this theme pattern
* Everything so far relies on Prototype and Script.aculo.us
* Some of us don’t like being boxed in.
* symfony does not box you in.
* helpers, bundling libs are great
* prototype/script.aculo.us no for everyone
* jQuery, YUI (like Dustin in the other talk), mooTools, dojo
* lots of good libraries, more than one way to
* sf is decoupled, dependencies are minimal if any.
* even the ORM swappable
* As for using other libraries, you can ﬁnd plugins to do your job, and if none exist Fabien tomorrow
will show you how to write your own.
* all it takes is writing a helper and bundling the library and you can be prototype free in no time.
* Don't go home thinking you have to learn proto/scrip
* any more questions, or demos?