NYCPHP Meetup

NYPHP.org

[nycphp-talk] So who's using Ajax anway?

Ben Sgro (sk) skyline at publicmine.com
Thu Nov 9 11:38:57 EST 2006


So, I'd like to look into Ajax.

Any good books you can recommend? I know PHP pretty well, but I dont have 
much experiance w/Javascript, or Java (but I know c pretty well).

- Ben

----- Original Message ----- 
From: "Rob Marscher" <rmarscher at beaffinitive.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Thursday, November 09, 2006 10:33 AM
Subject: Re: [nycphp-talk] So who's using Ajax anway?


I've only replaced a few actions (like rating items) with ajax calls
thus far.  I definitely like it and would like to put it in more, but
developing new functionality is taking a priority right now.  A
pagination system like the google method Mark mentioned would probably
help with database load and web admin productivity.  For example, it
would be great to send a search query via ajax to the database and get
all of the results to the browser.  Then javascript can hold the results
and display say 50 of them at a time in the html.  I feel that browser
memory issues could be a concern with this method if you have thousands
of results... maybe you still need to have a limit on the query.  Anyone
run into browser memory issues with ajax?

I'm also not exactly sure of the best way to deal with the browser back
button and location bar issues with bookmarking.  I'd be interested to
hear what people on this list have found as the best way to do that.

Also... are people using a javascript framework for the ajax
functionality?  I've tried out prototype and jquery.  I like both of
them, although jquery is much smaller and I've been using that over
prototype since it seems to provide everything I need.

-Rob



Mark Armendariz wrote:
> I've used it pretty heavily in my last 2 projects.  One was an internal
> application for a major music company.  Had about 200+ fields (could grow 
> to
> a couple thousand) on one page.  With all the interior page functionality
> needed, it was near impossible to make it a multi-page application while
> maintaining usability and efficiency.  Learned quite a bit about JS
> optimization and client / server communication on that project.  Only 
> other
> headaches were file upload, which I had to use an iframe for.  Though 
> flash
> 8's upload capabilities are interesting (if only I could find an hour to
> look into it)
>
> My most recent project's cms is all JS/Ajax, though it's back-loading.  So
> all the pages are available and all the links on the page (listing, forms,
> etc) are normal.  Then I add the javascript at the end to overwrite the
> links' onclicks and forms' onsubmits and add all the ajaxiferated
> functionality.  The primary headache for that is generating both 'static'
> (well, dynamic, but server-side) and scripted forms for each section, but
> otherwise smooth-sailing (works in all major browsers / platforms) and
> wonderful backward compatibility (static pages with no js).
>
> I'm a big fan of google's method for such a thing in gmail and reader. 
> They
> frontload all the data on the listing and then show it on the subpages
> without hitting the server.  Great for a multi-page application, and I'm
> hoping to implement it into my own projects soon.
>
> I'd been reluctant, but it does do wonders for functionality as well as
> takes a good deal away from server load if done right.  Also allows a 
> large
> form to load a bit 'faster' if you, for instance, load your dropdowns 
> after
> page load.  Also great for making your own caching, if you have say 20 of
> the same dropdowns on the same page.  Load the data for one and fill the
> rest with the same data.
>
> My only gripe now is dealing with adding html to a loaded page.  InnerHTML
> is fastest but 'ugliest', but at least it lets the browser to the dirty
> work, dom gets code-heavy and rather clunky.
>
>
>> -----Original Message-----
>> From: talk-bounces at lists.nyphp.org
>> [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Kenneth Downs
>> Sent: Thursday, November 09, 2006 7:29 AM
>> To: NYPHP Talk
>> Subject: [nycphp-talk] So who's using Ajax anway?
>>
>> Just curious as to who has gotten into Ajax.  Would you say
>> you are in light? Deep?  Use it for nothing? Everything?
>>
>> I'll toss in my answer to get us started.  Andromeda was
>> written first as a non-Ajax framework, so we had to add it in
>> later.  We've got a small library that works very well on the
>> browser, and are currently developing the server-side library
>> of common routines.  We've used it for our report writer, and
>> think it is very cool.
>>
>> Generally we've moved over to doing all custom screens in
>> AJAX, while the "for-free" screens that Andromeda generates
>> are still old-school.
>>
>> I've noticed a curious fact about using Ajax, it tends to
>> enforce a very clean structure for your HTML, and also for
>> the corresponding server-side routines.  It is one of those
>> immediate gratification things where the increased attention
>> to structure pays off as an immediate and visible improvement
>> in the UI.
>>
>> -- 
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.1.409 / Virus Database: 268.14.0/524 - Release
>> Date: 11/8/2006
>>
>>
>>
>>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php





More information about the talk mailing list