[Product-Developers] Can KSS help in my use case ?

Nathan Van Gheem vangheem at gmail.com
Fri Feb 20 18:47:07 UTC 2009


>
> But I was wandering whether using KSS would make the whole more clean,
> readable and maintainable.
>
I suppose it might be a little more clean and readable.  I think you can
make non-kss code very clean and readable though too.

I can't speak for all the Plone developers out there, but it seems there is
a growing concern that kss isn't the way to go anymore.  It is too
heavy(lots of extra code for the browser to download and parse).  IMO, kss
became cumbersome to do easy tasks that were just a bit outside its
capabilities and I'm no longer going to use it anymore.  In your use case it
might work though.

Like I said, I think kss was supposed to be designed for those who do not
want to mess with javascript.  Since you're probably good with javascript,
you might not want to worry about using it.

It seems like you're curious about it though.  You could always just give it
a try and see what you think.

-Nathan

On Fri, Feb 20, 2009 at 3:22 AM, Giovanni Toffoli <toffoli at uni.net> wrote:

>  Thank you, Natan
>
> I think you are right.
> What I have to do yet probably is much simpler than what I already did.
> But I was wandering whether using KSS would make the whole more clean,
> readable and maintainable.
>
> Giovanni
>
> ----- Original Message -----
> *From:* Nathan Van Gheem <vangheem at gmail.com>
> *To:* Giovanni Toffoli <toffoli at uni.net>
> *Cc:* product-developers at lists.plone.org
> *Sent:* Friday, February 20, 2009 4:01 AM
> *Subject:* Re: [Product-Developers] Can KSS help in my use case ?
>
> Giovanni,
>
>     If you've done all this with your own js before, you just just do it
> with straight javascript using jquery and a browser view for the ajax
> calls.
>
>     No need to use kss.  It'd probably make it more complicated.  As long
> as you know javascript well, use it.  It'll make your life easier without
> kss IMO.
>
>
> On Wed, Feb 11, 2009 at 6:57 PM, Giovanni Toffoli <toffoli at uni.net> wrote:
>
>> In a product, I have a portlet providing a tree-like visualization of a
>> taxonomic data structure (say, a thesaurus).
>>
>> A number of tree manipulation functions (e.g. sub-tree expanding and
>> collapsing) are implemented with ad-hoc AJAX programming that I did in the
>> Plone 2.1 version of said product.
>> Those functions still work unchanged in the porting to Plone 3 that I'm
>> doing, although I plan to re-implementing them using KSS.
>> Moreover
>> - the tree in the portlet is included in an HTML form
>> - there is a checkbox beside each visible node in the tree, so that the
>> user can select a subset of the nodes by checking the associated boxes.
>>
>> Here is may use case: in the content area of the page, as a separate HTML
>> form, I have a search form for searching Plone contents; the search should
>> take into account:
>> a) the context
>> b) obviously, the values that the user puts inside the input controls of
>> the search form
>> c) the tree nodes selected (checked) in the portlet.
>>
>> In the 2.1 version of the product, when the "search" button was pressed, I
>> managed to get the current node selection by doing a horrible customization
>> of the main template: the tree appeared to be inside a portlet, but in fact
>> it was inside the same HTML form as the (other) input controls of the search
>> form.
>>
>> In the Plone 3 version, where the tree is inside a true portlet, and a
>> separate HTML form, which strategy would you suggest to be able to exploit
>> the node selection in the search?
>> 1) use KSS to build incrementally a server-side image of the current
>> selection
>> 2) associate a KSS event to the pressing of the "search" button; but in
>> this case should I define an ad hoc client-side command and implement it as
>> a plugin ?
>> 3) other (please specify).
>>
>> Thank you very much for any advice.
>>
>> Giovanni Toffoli
>>
>>
>>
>>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-Developers at lists.plone.org
>> http://lists.plone.org/mailman/listinfo/product-developers
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090220/904338ee/attachment-0001.html>


More information about the Product-Developers mailing list