Personal tools
You are here: Home   Blog   Archive   2006   September  
 

Entries For: September 2006

2006-09-20

KSS sprint in Louvain-la-Neuve (Belgium) is a success

Filed Under:

Report about the achievements and the failures of September 16-19 KSS sprint.

So the KSS sprint in BubbleNet is finished. I am pleased to say it is a real success.

The following objectives had been set, sorted by order of priority :

  • introduce new plonistas to the tool and have them make some development,
  • move on with the development of the PLIPs 121 and 122,
  • improve tests infrastructure and begin to add some where they were missing,
  • refactor the adapter story of Azax, to make it more compliant to the right way.

More Plonistas

Jean-Paul Ladage, David Convent, Daniel Nouri and Wim Boucquaert have shown to Balazs and me that the tool is more than usable. They did implement the following use cases (in PloneAzax and ATAzax) :
  • all standard AT widgets are now validated at blur time in edit view,
  • change of views with display menu do not reload the full page anymore,
  • same for copy and cut of actions menu,
  • and for workflow transitions of status menu,
  • instant edit of text and description fields of the 'page' content type is now implemented, based on a generic archetypes implementation (iow, which will be expandable to all views/fields pretty easily).
I want to insist on the fact that they could achieve this by themselves, depending on Balazs and I only for the fixes needed here and there in Azax or kukit.js.

Plips

Thanks to their work, second objective has been mostly attained as well. Further, the main usability issue until now (the lack of spinner) has been fixed : you know now when you are waiting for a refresh of some parts of the page.

Tests and refactoring

We did quite some work on the third objective : tests coverage has improved a lot. Even though code is still not 100% covered, I could use the current tests as safety belt for my work on the adaptors refactoring. On the last day of the sprint, I merged the work as all tests were passing. I must say I was really satisfied to find out that none of the use cases that had been worked on before were broken, iow that the tests were doing their job.

Now, let's not forget the less positive things.
First, on client side, we found out once again how cross-browser JS/UI is difficult. Lemme explain.
For instance, as we already know, the use of the Enter key in forms is sort of broken in IE (cfr FormController warnings). Well, it is also fragile in Safari.  We will have to explore more in order to enable (cross-browser) to just press Enter to save the Title.
The good news is that we have shown with the other use cases that, when the JS code is already covering the cross-browser issues, the layer that KSS provides really ensure that the developer stays away of those troubles. Iow, if and when we get a solution for the problem just cited above, it will be fixed once. There will be other cases like this and this is the main reason for KSS imo : lets fix things in a central place.

Second, on server side, the ZPT, Python scripts, FormController stack combined with Five views is often in our way when we insist on reusing existing code. In some cases, a lot of time is needed as we all already know. Nevertheless, we can do it, for instance, Archetypes validation is fully supported in the edit actions.

Third, no work was done to refine the effects support... which is not so serious as it is a little task anyway.

So all in all, four very good days. If you want to see it by yourself, checkout the code from svn (do not forget to use Five 1.4 head). If you can wait, you'll get a release asap.

I want to thank all the people that have worked with me on this since already more than one year : to see my dream becoming reality is a great feeling.

2006-09-07

Scriptaculous Effects

Filed Under:

Basic support for Scriptaculous effects has been added to KSS.

As promised a long time ago, KSS has now support for Scriptaculous effects.  The integration was really easy thanks to the overall pluggability of kukit.js (Kudos to Balazs for this.)

Effects can be:
  • bound to events by a KSS resource :
#regionToFade:click {
action-client: effect;
effect-type: fade;
}
  • or executed from a command added to the response on the server :
from Products.PloneAzax import AzaxBaseView
view = AzaxBaseView(context, context.REQUEST)

commands = view.getCommands()
commands.effect('#regionToShow', 'appear')

return view.render()

The support is still very basic : some effects are missing, parameters are not supported... This will be refined during the sprint that will happen next week in Belgium by BubbleNet's offices. If you can't wait, take a look at the online-demo.


This week has been rich in the KSS team :
  • ResourceRegistries 1.2.3 now includes the fixes needed by PloneAzax. (Florian)
  • PloneAzax has now a branch that is compatible with Plone 2.1.3. It works with the Zope 2.8 branch of azax. Bundle will follow. (Balazs)
  • There is now a Vim syntax file for KSS. (Godefroid)
I really enjoy this team work !

I also would like to mention a document describing the development process of ajaxification with KSS and the brand new IRC channel.

2006-09-01

KSS user experience

Filed Under:

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