JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

A

Aahz

I'm pleased to announce the new version of Porcupine Web Application
Server, a Python based framework that provides front-end and back-end
technologies for building modern data-centric Web 2.0 applications.

[...]

QuiX, the server's integrated JavaScript toolkit, has reached the
major milestone of supporting all the popular browsers including
Opera, Safari 4 and IE8. [...]

Out of curiosity, are there any JavaScript toolkits that generate code
that degrades gracefully when JavaScript is disabled?
 
D

D'Arcy J.M. Cain

On 20 Jul 2009 09:00:33 -0700
Out of curiosity, are there any JavaScript toolkits that generate code
that degrades gracefully when JavaScript is disabled?

I understand what you want but I can't see how a toolkit can do that.
How do you program "graceful?" It seems pretty application specific.
 
A

Aahz

I understand what you want but I can't see how a toolkit can do that.
How do you program "graceful?" It seems pretty application specific.

Presumably the JS toolkit generates both code and HTML. Actions that
normally get executed by JS should degrade to plain HTML links and form
submits (or possibly not display at all if it's a pure convenience).
 
D

D'Arcy J.M. Cain

On 20 Jul 2009 17:10:55 -0700
Presumably the JS toolkit generates both code and HTML. Actions that
normally get executed by JS should degrade to plain HTML links and form
submits (or possibly not display at all if it's a pure convenience).

As I said, I do understand what you are after but I still think it is a
judgement call. What defines "convenience?" How does the library know
what is essential and what is pretty?
 
P

Paul Boddie

Out of curiosity, are there any JavaScript toolkits that generate code
that degrades gracefully when JavaScript is disabled?

You mean "Web toolkits which use JavaScript", I presume. I have
written (and use myself) a toolkit/framework called XSLForms (part of
the XSLTools distribution) which supports in-page updates (AJAX,
effectively) that degrade to vanilla whole-page requests if JavaScript
is switched off:

http://www.boddie.org.uk/python/XSLTools.html

I've been meaning to have a few example applications running on that
site to illustrate the point. Some people complain that by
constraining the JavaScript functionality to merely enhance vanilla
HTML/HTTP functionality, one is not using the full potential of the
medium, but having used sites whose JavaScript has failed, thus
preventing the use of those sites almost completely, I think that
stacking AJAX-like stuff on top of normal stuff helps the majority of
developers offer an accessible solution.

Paul
 
A

Aahz

As I said, I do understand what you are after but I still think it is a
judgement call. What defines "convenience?" How does the library know
what is essential and what is pretty?

Presumably a JS toolkit designed for this purpose would have an API to
specify the handling of such issues.
 
P

Paul Boddie

Thanks!  I'll take a look after OSCON.

The JavaScript parts of the framework are a bit complicated, I'll
admit: you have to write some nasty-looking function calls with
awkward arguments to send AJAX-style requests to the server. I've been
meaning to employ a more declarative "signals and slots" approach so
that you don't have to write in the page templates where the in-page
updates should be expected: it's really the server code that
determines this kind of thing, and so the server code should be able
to say where it wants the page to be updated.

Again, I'll try and put up some examples in the relatively near future
that will make it easier for you to see if it's your kind of thing.

Paul
 
L

lkcl

Out of curiosity, are there anyJavaScripttoolkits

or python-to-javascript compilers
that generate code
that degrades gracefully whenJavaScriptis disabled?

http://advogato.org/article/981.html

you'll need to do a little bit of work - use a state-machine-based
framework (such as twisted, from what i can gather), or use fastcgi,
or solve the problem of storing the state of the pyjamas application
"in between" web requests - but yes, pyjamas-web is a port of pyjamas
to the web server.

so, by writing an app that conforms to the pyjamas API, you get to
compile it to native javascript, to run in the web browser; you get to
run it as pure python using pyjamas-desktop (python-hulahop underneath
or pywebkitgtk) and then, if you want to finish off the experiment
that i started, you get to run the _same_ python app server-side on
behalf of the users.

all quite quite mad, to be honest :)

l.
 
L

lkcl

You mean "Web toolkits which useJavaScript", I presume. I have
written (and use myself) a toolkit/framework called XSLForms (part of
the XSLTools distribution) which supports in-page updates (AJAX,
effectively) that degrade to vanilla whole-page requests ifJavaScript
is switched off:

yeahhh.... i remember doing something like that. each portion of the
page i did as a separate AJAX load, and then there was some loader-
infrastructure where you could, if javascript was switched off, do a
tree-walk-reconstruction of the page.

if anyone's interested i can provide source code.

l.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top