On Jan 9, 2009, at 2:15 AM, Alex Marandon wrote:

Pylons is going to drop support for JavaScript and AJAX. If you want
to keep that functionality, you'll have to copy the module and
maintain it yourself.

Well, that's not a very good way to phrase it. :)

There's code in Pylons to ease the use of AJAX, like request.is_xhr, and the mime-types negotiation. The JS helpers are deprecated though.

It seems that the web development community now tends to think that
generating a lot of in-line JavaScript server-side was not such a good
idea after all. From my experience, I'd say the main reasons for that
are that it's hard to debug and it bloats pages with a lot of
duplicate code.

They were also ported from Rails, which makes heavy use of anonymous blocks for some of the JS generation. While I was looking originally at porting some of that, it became increasingly silly as I saw Rails functions 20 chars in length to call JS functions 10 chars or less, so you're actually typing a lot more.... it also uses a rather kludgy form of AJAX UI, where rather than having client-side JS functions that interact with the server, you have JS code strewn back and forth, and executed via client-side JS eval(). That leads to possible security risks, and is slower than having the client load all the JS functions needed for the page *in advance* (and where the JS file can be CACHED!)

That's really the main reason they're being deprecated. I've been thinking of doing a Intro to Jquery for the Python Programmer for awhile now, because its really trivial to do the things people were using WebHelpers JS helpers for, and its a much better style.

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to