KSS user experience
Christian Klinger, alias goschtl, has given us help in our effort to provide KSS use cases for Archetypes. Besides helping with the in-place navigation of AT edit forms and validation, he also wrote KSSMasterSelectWidget that we included in the review bundle for PLIP171. He has chosen a slightly different approach from our base track and instead of refreshing the entire widget at once, he modifies individual attributes in the HTML DOM. We will further enhance the widget and possibly integrate it with ATAzax during the upcoming KSS sprint.
He has written a mail that I would like to include here with his kind permission. Thank you Christian, for your ongoing help in our efforts.
My Experience with KSS
First, I work with Archetypes since two years I think. I have deep knowledge about Archetypes. For intra and extranet projects, I developed several AT-based objects. I have less experience about Javascript and basic knowledge about CSS.
I came to KSS, because we needed dynamic widgets for a project. Unfortunately, the MasterSelectWidget in the Collective does not exactly match my usecase. I tried to add my extra functionality to MasterSelectWidget but did not get it to work (lack of experience in JavaScript).
Then I looked around for other Ajax-frameworks for Plone. The results of search --> KSS. I read the site http://azax.ree.hu/documentation and worked through the tutorials.
I like the concept of an additional kss which is responsible for binding on elements. The binding stuff goes into seperate KSS files, which are managed by ResourceRegistries in Plone. For the server-actions, it´s possible to use the new Z3-view classes with all their advantages. The syntax of KSS is, with my knowledge of CSS and Firebug (Extension for FireFox), relatively easy to use. With the help of the tutorials and cheat-sheat, I learned to work with the KSS-Server actions (replaceInnerHTML, ...). Additionally, there are some very cool debugging and logging functions which makes it easy to understand what's going on.
For my first test of KSS in RealWorld, I tried to realize the Content view/Edit tab. I had to hack some code to only render the <div fill:slot="main"> part of main_template. But with some help from ree on IRC, it was pretty easy to do the KSS part of this task.
After collecting those first experiences, I developed my DynamicWidget. My aim was to add the functionality of MasterSelectWidget to a new KSSMasterSelectWidget. All in all, it was not difficult to adapt the fuctionallity from the old MasterSelectWidget to the new KSSMasterSelectWidget.
Christian