Flutterby™! : AJAX development

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

AJAX development

2009-07-01 18:32:51.579428+00 by Dan Lyke 4 comments

I have an idea for the evolution of a few scripts and applications that I've been playing with that I think could turn into something larger. I've started doing a little playing around with a browser app, and realized that I need a little bit of structure.

So, a couple of questions:

  1. This app needs to run in a browser, needs to be quick and responsive, and needs to communicate the changes to the document that the user makes back to the server and confirm that those changes got made in a robust way. I could re-invent a bunch of wheels, but I have the feeling that people have already tried to build JavaScript frameworks for this. Anyone got experience with jQuery, Prototype.js, or something else they'd recommend?
  2. I'm planning on using Perl with Apache and mod_perl for the server, just because it'll let me build and deploy fast. Any particular "gotcha"s in architecting something that talks to a JavaScript browser app?
  3. What's the best set of docs for mapping APIs? Google Maps has a lot of bad info and dead ends in their documentation, but at least there's public discussion and lots of development happening. OpenLayers has a lot to recommend it, but their documentation doesn't even mention some of the types of events that I think are critical (ways to get interaction events out of the map to code in the surrounding web page).

And, yes, the flaws in the KML from last weekend's road trip (pan south to the stuff in Monterey) is what's driving this.

[ related topics: Free Software Perl Open Source Travel Maps and Mapping ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2009-07-01 19:52:34.761347+00 by: meuon

PHP or Perl for the backend, actually the backed does not matter much. If it's getting things in and out of a table, whichever you are faster/better with. I find PHP does this stuff very well.

JQuery has a lot of support, it works well..and is fat compared to rolling your own specific variant. You might as well start with XMLHttpRequest() and roll your own if you want it to do tricks.

I've done several of these, it takes me about a day to get my head into Javascript mode and barely make it work, and another day of tuning. and then I easily forget why it works.

#Comment Re: made: 2009-07-02 01:58:29.70316+00 by: mkelley

Yes, Jquery is the boss - lost of help online with the modules. I rebuilt work's home page last year, using Jquery and it was seamless....but actually was around 50% complete using Prototype, but a very bad bug in the module I used, put on the brakes.

We also use iRise for prototyping and it builds Prototype and Y! Grid out of the box.

#Comment Re: made: 2009-07-02 02:31:53.068528+00 by: dexev

I started using jQuery on a project earlier this year, and ended up switching to YUI. There seemed to be three or four jQuery modules for each thing I wanted to do, and half of them were abandonware or hopelessly broken.

YUI had tools for table-based UI (which my app was) and lots of examples (which let me get stuff done first, then go back later and figure out what was really happening).

Now that I've got some javascript experience, I might give jQuery another try (though I do love YUI grids CSS).

#Comment Re: made: 2009-07-02 14:44:14.532051+00 by: ebradway

Maybe I'm missing something - but can't you just use XQuery? OK... Just looked at jQuery - it's trying to be everything to everybody - not just a database interface.

OpenLayers has a big advantage because it's an abstraction layer over all other APIs. There may be reasons down the road to figure out OpenLayers that you can't even fathom right now. (Like WFS-T capabilities to easily create a way for users to add data to your map using GeoServer on the backend.)