Martin,

On Mon, Jul 09, 2007 at 12:30:18AM -0700, Martin Aspeli wrote:
> We've just (almost certainly) chosen Pylons for a quick-and-dirty web
> application project. There are just a few outstanding things that we
> need to do, which I'm not sure how to approach. Speed is of the
> essence here, so having examples or documentation would be a huge
> help. I also don't have much time for trial-and-error, so opinionated
> responses highly appreciated.
> 
>   1. We need a fairly heavily AJAXified UI. Is Prototype and the
> Railsish web helpers the best way to go?
> 
> I'm a little wary of code generation in general and Prototype in
> particular, but I'm willing to ignore my instincts if this is the way
> people tend to do things. I haven't seen many tutorials or examples of
> alternative approaches, e.g. jQuery or MochiKit. The front page of
> pylonshq.com suggests other toolkits are supported, but I can't find
> any more resources. :-/

I am no Javascript guru. And I mainly use it for effects and features
like autocompletion or AJAX. Since the webhelpers support
script.aculo.us/prototype I started with that but in the used jQuery.
With jQuery you don't need much (if any) help by the webhelpers.
The Javascript code you write is so short that code generation is
unnecessary.

>   2. Specifically, we need an auto-complete widget. I see
> Script.aculo.us has one of those, but no corresponding web helper.

Just include the Javascript code from the script.aculo.us web site into
your HTML template. However the widget never worked as expected here.
E.g. using backspace and typing other character for a new match cached
too much. Only this plugin for jQuery finally did what I expected:

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

There is just a bug in it that I had to fix myself:

 -> options.matchSubset = options.matchSubset || 1;

You cannot set matchSubset to "0" because it will always be set back to
"1". I mailed the author about that a long time ago but never heard
anything since. Change it to:

 -> options.matchSubset = options.matchSubset || 0;

And set the parameter to "1" should you need it.

> How easy would it be to hand-code the use of such a widget? Should I
> look for other frameworks instead?

I don't think that the webhelpers are really necessary to create
Javascript code. When I started with Pylons I assumed that I had to use
script.aculo.us but switching to jQuery was trivial.

> In fact, we need something even more dynamic: the user should use an
> auto-complete select box to find items and then press Enter or click a
> button to add it to a dynamically growing list, i.e. letting this act
> as a dynamic, auto-complete multi-select widget.

Didn't need that yet but doesn't sound hard.

>   3. Are there any example applications that demonstrate the use of
> AuthKit (with a custom, in-the-app login form, and sensible
> permission/role/user handling and user storage)?

That's not too hard. Custom-made permissions are just Python code. So it
depends on what you put into them. The login form is used when you use
the "forward" method. Authkit - just like Pylons - doesn't hold you hand
here. Just create a database table for your users and store the
passwords (MD5-hashed) in there. Then let the login form verify that the
password matches and then allow the user in.

> I've seen the AuthKit tutorial, but it uses fairly frivolous examples.

I'm not happy with the Authkit documentation either. There are a dozen
copies flying around but they either deal with the not-yet-released 0.4
or speak of configuration parameters that are wrong.

> Maybe more questions later... but so far, what we've seen and tested
> of Pylons has been great.  :)

We love it, too. :)

 Christoph


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to