Re: Any tutorials on using direct actions and/or component actions with AJAX
Re: Any tutorials on using direct actions and/or component actions with AJAX
- Subject: Re: Any tutorials on using direct actions and/or component actions with AJAX
- From: Mike Schrag <email@hidden>
- Date: Thu, 3 Jan 2008 17:21:32 -0500
We won't use Wonder because we have an excellent base of frameworks
we developed over the years which has much functionality not in
Wonder.
For the record, that's email@hidden_ ... So yeah, probably a
few decent WO frameworks tossed about. If $email !~ m#[@.]apple.com
$#i your mileage may vary as to the awesomeness of your frameworks.
We will never use Prototype/Scriptaculous because they are massive,
even gzipped and minimized.
I've been considering abstracting out prototype/scriptaculous into a
intermediate API in Ajax framework, actually ... It would force the
components to use Javascript in a cleaner way and it would allow
people to swap out for other frameworks.
We still have users on slower connections, on machines with no proxy
or cache, and downloading 200k+ of javascript is not acceptable. Our
page sizes are all under 80k, with most under 30k. Our javascript
tops out at 32k.
Just to defend prototype's honor here (though not that I care all that
much :) ), prototype.js + effects.js, which is what MOST people end up
actually using, is around 100k uncompressed. With mod_gzip, it's more
like 25k with wonder.js being another 3-4k or so. With a proper cache
-- you seriously have clients with caching turned off? they deserve
slow speed :) -- you're talking a one time hit on the first page, and
with Wonder resource versioning, you can turn on apache mod_expires to
expire that .. never. It's really not all that bad in exchange for a
pretty awesome* set of javascript tools.
If you want to use component actions, it gets more difficult, and
requires a little digging into WO internals to understand it all,
but it is possible, and we are using it heavily in one of our apps.
If you're using WO 5.3, "a little digging" = "a huge pain in the
butt," but you can steal Wonder's code from ERXAjaxApplication and
ERXAjaxSession as the basis to save yourself a large amount of pain.
If you're using 5.4, David's code fragment should give you a
deceptively simple start to your journey :) However, Wonder is
written on top of all of this, so you have examples to go by ideas to
rip off if necessary.
ms
* I really mean prototype.js as being "pretty awesome" ...
scriptaculous is actually kind of crappy ... but it was what the cool
kids were using with rails, so I felt it was a pragmatic decision at
the time.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden