Personal tools
You are here: Home   Blog  
 
Document Actions

Blog

Proceedings of KSS project development

2009-11-27

kss.core new release

Filed Under:

We released kss.core 1.4.8 with a new client action to control server actions timeout.

We added a new client action setActionServerTimeout:

It allows to setup timeout separately for each server action. You call it in the stylesheet just before the server action. It has a value parameter where you specify the timeout in milliseconds:

div.timeout:click {
action-client: setActionServerTimeout;
setActionServerTimeout-value: 10000;
action-server: bla;
}

You can also use it to change the global default timeout value at body load time:

body:load {
action-client: setActionServerTimeout;
setActionServerTimeout-value: 5000;
}

http://pypi.python.org/pypi/kss.core/1.4.8

The relase is compatible with Plone 3.3 at least.

2009-05-24

Firekiss for Firebug > 1.3

Filed Under:

The new release fixes compatibility with Firebug 1.3. Further, it comes with a new feature : it allows to control production mode and development mode from Firebug.

At last, a new Firekiss release.

It fixes compatibility with Firebug 1.3.

It includes a new feature. You can now control development mode and log level from Firebug itself, iow without accessing the @@kss_devel_mode/ui URL (how many of you could recall that long URL ;-)

When the KSS or Ajax panels have the focus, the options menu that sits at the right of the toolbar might show two sections :

  • Production-Development
  • Debug-Info-Warning-Error

The first section allows you to toggle between both modes.

The second section allows you to select the log level you wish to see in the console. As it is only meaningful in development mode, it is not shown when you are in production mode.

Enjoy !


2008-05-15

KSS 1.4 released

Filed Under:

Better performance and syntax in release 1.4 of KSS.

KSS now uses base2 (which is significantly faster than CSSQuery) for css node selection: it provides among others much quicker page loads.

The release comes with several syntax improvements:

  • Multiple selectors are allowed in the same rule.

  • Value providers can be recursive.

  • url() and alias() value providers.

  • Node selection can be specified together with client actions.

  • Full form submits can be specified together with actions.

We provide improved demos and testing.

More details can be read in the release notes.


The following packages have been released, to be used with both Zope 2.10 or higher, and Zope3.

package
version
download
kss.core 1.4 cheeseshop
kss.demo 1.4 cheeseshop

There is a howto available that answers common setup and usage questions.

Plone 3.1 includes KSS 1.4. The Plone specific version of the same howto is here.

Many thanks to anyone who worked on the KSS code, and made this new release possible.

2008-04-08

plone.app.kss sprint in Sorrento

Filed Under:

We had a great time in Sorrento this year. The KSS work was centered around testing Plone and the PSPS #7841 topic.

  • Simone Deponti, Tom "Spanky" Kapanka, and Balázs Reé worked on extending the kss.demo testrunner to deal better with application level selenium tests. Besides testing Plone itself, it also aims at enabling testing of applications written with Plone, Zope or Grok.
  • Beppe Zizza wrote documentation that explains how to install the test running environment, how to run the existing tests, and how to write new ones, The document is targeted towards Plone developers but is also meant to be generic with respect to other Zope based frameworks.
  • Simone Deponti and Massimo Azzolini championed the review of the Plone tests we wrote last year. They fixed those and tried to write new ones. During this, we identified and solved important problems, such as site creation (adapting the code written by Davide Moro at the last Sorrento sprint), login and logout as different users (test suite layers). We also realized it is sometimes difficult to carry out the tests we want with Selenium.
  • Sylvain Viollon worked on Funittest integration. After discussing the topic, we agreed that this method should live in parallel with the already existing one that uses prerecorded tests. Because of platform dependency problems and the challenge of the different testing models, the evaluation and adoption of Funittest might be a longer process. As a first step, Sylvain made a buildout that contains all package dependencies, and wrote example tests for Plone with the help of Massimo Azzolini. We also explored the possibility of converting Funittests testrun snapshots into a sequential format that can be played directly with Selenium IDE and thus used with the existing KSS testrunner.

We also looked into future possibilities. We started with the help of Robert Niederreiter the evaluaton of Cornerstone, the ajaxian widget framework of Devilstick. We definitely need more time to evaluate this component, and consider the possibility of adopting code and/or ideas for widget support into KSS.

Balázs and Malthe Borch also discussed the possibility of integrating z3c.resourceinclude with KSS. This might lead to finally drop the resource handling part of kss. That would improve the developer experience of KSS on Plone as well.

Check out material

The documentation that explains how to install the test running environment, how to run the existing tests, and how to write new ones, can be found here. Check it out!:

http://kssproject.org/docs/tutorial/kss-testing-how-to-for-plone-3.1

The ploneout branch that enables selenium testing of Plone 3.1 is here:

https://svn.plone.org/svn/plone/ploneout/branches/3.1-kss-test

The kss.demo extensions are still subject to change, but you can simply drop new tests inside plone.app.kss, under the selenium_tests directory and they will be picked up automatically.


Funittest

The experimental Funittest integration buildout is here:

https://svn.plone.org/svn/plone/ploneout/branches/3.1-funittest

Actual tests are in funittest.plone, in the lib/plone/kss directory. More information on using Funittest is available on OpenPlans, together with more technical reports as well.

2007-10-27

kss.base first alpha released

Filed Under:

We are happy to inform you that we have released the first alpha of kss.base. This new library will be the base library for all pythonic web frameworks that choose to support KSS.

The predecessor of kss.base is the kss.core package, which depends heavily on the Zope 3 component architecture. Our new library only depends on Python and setuptools. This will widen our support for integration with other frameworks. We have already seen some fruits of the new approach in experimental support for both Pylons and Django.

kss.base is alpha, and at the moment not compatible with Zope or Plone. For those platforms, kss.core is still needed, as previously. Later, we will improve kss.base to also support Zope and Plone: we will introduce the kss.zope package. kss.base and kss.zope together will replace kss.core, which will be phased out in the end (with keeping complete backwards compatibility).

We suggest to test kss.base to anyone interested in KSS integration on Pylons, Django, or any other pythonic platform.

2007-10-20

plone.app.kss sprint in Naples: one step further

We were sprinting on applying KSS in Plone after the Naples conference. During this sprint we made a lot of progress which will further establish the KSS project.

One main focus was making it easier for people to write KSS plugins. We arrived with the new kss.templates component that eases the creation of custom plugins. Thanks to Godefroid Chapelle we also have FireKiss that will bring a revolution to debugging KSS.

During the sprint we also started to use new technologies such as bazaar for version management and we also created the kissbooth project area on Launchpad. Launchpad offers repository storage for bazaar branches and a web interface for project management.

Sprinters were working on various topics:

  • Jan Murre was working on enabling drag-and-drop in Plone, together with Jeroen Vloothuis and Balazs Ree. We failed to finish this: after realizing that more Javascript work is needed than the time available for us, we turned our focus to other subjects.
  • Jan Murre started to integrate jQuery effects with KSS.  He also made a working demo of it in Plone.
  • Massimo Azzolini was working on code to KSS that will enable the correct handling of browser history through AJAX operations.
  • Daniel Greenfeld and Carsten Rebbien were creating a new KSS tutorial that is based solely on Zope3 technologies on the contrary of the existing ones that present using KSS TTW (through the web).
We also helped other teams to apply KSS:
  • Jean-Paul Ladage and the XM team were working on the KSS application part of the eXtremeManagement tool and plonehrm.

We also made a big step forward with our platform support. Before the sprint we had KSS integration for the following platforms:

and by the end of the sprint we were proud to present that

  • Manuel Saelices has integrated KSS with Django!
He made this work by building on top of kss.base (which is also used for the Pylons integration, and will be for Zope). If you want to know how to use it head on over to the tutorial on Django and KSS.

There was also experimental work going on with a large potential impact on the future of KSS:

  • Georg Gogo. Bernhard continued the work he started on the last SnowSprint on the eventPush project. His demonstration spoke for itself: we have seen a proof-of-concept application pushing KSS commands from the server to the client (as opposed to the traditional poll-style AJAX).

We would like to thank everyone involved in making this happen. It was a fantastic sprint!

2007-10-15

New website skin for kssproject.org

Filed Under:

We now have a new theme for KSS project website. This finally gives KSS a specific style.

The design started with a new logo designed by Thijs Jonkman.

After this was approved, Linda Verhagen designed a draft theme for the website.

Jola Hyjek helped to choose the main color of the site.

At Plone Conf 2007, Jarno de Wit and Thijs pulled together to finish the theme.

Balazs Ree and Jeroen Vloothuis have put it in production.

We want to thank everyone who helped, especially all the nice people at Pareto for having worked for the project.

2007-09-03

Louvain-la-Neuve sprint

Filed Under:

There was a KSS sprint in Louvain-la-Neuve. Developers produced speed improvements, new syntax for KSS style sheets and refactorings for easier development with both client-side Javascript and server-side Python code.

One week after the release of Plone 3.0 - the first official release of a project which includes KSS engine, we had a development sprint for KSS. The sprint lasted three days (August 27-29, 2007), in BubbleNet offices in Louvain-la-Neuve, Belgium.

The focus of the sprint was threefold :
  • Changes of KSS stylesheets syntax,
  • Refactorings in client-side engine,
  • Refactorings of server-side support in Python.

Four developers joined me to work on KSS project :

  • Balazs Ree (from Greenfinity - Hungary),
  • Jeroen Vloothuis (from Pareto - Netherlands),
  • Jean-François Roche (from Pyxel - Belgium),
  • Laurent Lasudry (from Netitbe - Belgium).
Additionally, Guido Wesdorp (of Pragmagik - Netherlands) joined us for one day. We could introduce Guido to our framework and get help from his experience gained among others when developing Kupu, the default visual editor of Plone and Silva CMS.

Let's get a bit more into the details of the work done during the sprint.

Changes of KSS style sheets syntax


We discussed and agreed on the following changes for the KSS syntax.

1) Declarations like the following were previously forbidden :
input.blurrable:blur, select.blurrable:blur {
action-server: kssValidateField;
kssValidateField-fieldname: kssAttr('atfieldname', true);
kssValidateField-value: currentFormVar();
kssValidateField-uid: kssAttr('atuid', true);
}

Multiple CSS selectors are now allowed, both when events that should be bound are similar like above or different like below.

form.inlineForm input[name=kss-cancel]:click,
form.inlineForm input.blurrable:keypress(inlineescape) {
evt-keypress-keycodes: '27'
evt-click-preventdefault: true;
action-server: replaceWithView;
replaceWithView-fieldname: kssAttr('atfieldname', true);
replaceWithView-macro: kssAttr('macro', true);
replaceWithView-templateId: kssAttr('templateId', true);
replaceWithView-uid: kssAttr('atuid', true);
replaceWithView-edit: true;
}
2) Value providers are now recursive. In other words, parameters of value providers can now be other value providers.
... {  
...
saveField-value: currentForm(kssAttr('variableName', true));
...
}
3) Value providers will be allowed in event binder ids. In other words, value providers will also be used for the selectors.
form.inlineForm input.blurrable:keypress(kssAttr('binderId', true)) {
...
}
4) kssParameters (action parameters which have a name starting with 'kss') will be allowed in the action name declaration. They will be space separated. In other words,
... {  
...
action-server: replaceWithView url(http://host/object/replaceWithView);
...
}
will be equivalent and will coexist with
... {  
...
action-server: replaceWithView;
replaceWithView-kssUrl: url(http://host/object/replaceWithView);
...
}
that works currently.

Changes 1) and 2) have been developed during the sprint and are NOW in the trunk and tested.
Change 3) is available in a branch developed before the sprint by Balazs : it will be merged as soon as possible.
Change 4) will be developed later.

We are very happy that Jean-François and Laurent could join Balazs and myself in developing those features : they have made their first steps in the knowledge of the Javascript code of the KSS engine. This implies that the number of developers able of supporting the engine is growing !

Refactorings in client-side engine


1) KSS is now 4 to 5 times quicker !

This is the result of integrating base2 (new library from Dean Edwards of cssQuery fame). Selection of nodes with base2 is much quicker than cssQuery because a native XPath engine is used when available in the browser instead of only slow Javascript code.

The work was started in May by Balazs and Jeroen during a week-end in Rotterdam. Balazs and Alec Mitchell spent another few days in June to benchmark and test the integration. Finally, Balazs and Jeroen made the last needed refactorings during the sprint.

2) Exception infrastructure does not swallow anymore the place where exceptions have been throwed.

Thanks to Jeroen and Balazs that did the refactoring, debugging of exceptions will be easier.

3) The KSS parser code has been refactored.

This allow for better readability and thus better extensibility or maintenability. (We need ...abilities.)

4) The Javascript unit tests page in kss.demo has also been improved. The parser code unit tests still run in IE, Firefox, Safari, Opera and Konqueror.

Thanks to Jean-François and Laurent that did 3) and 4) with me.

Refactorings in server-side Python code


1) kss.base allow us to distribute Javascript plugins as Python eggs !

Jeroen had written Python code for server-side integration of KSS : he presented his integration of KSS in Pylons at EuroPython in July 2007.

During the sprint, Jeroen refactored his code into the new kss.base module. It will serve as the base implementation for server-side integration of KSS in Python frameworks. One of the features of kss.base is the registration of KSS Javascript plugins by extracting metadata from Python eggs.

kss.pylons has already been refactored to use kss.base. In the future, we will build also build kss.zope above kss.base; it will replace kss.core that is now distributed in Plone 3.0.

2) Distribution of Javascript engine is now a step further !

As Laurent had worked with Jeroen on kss.base, he could also use it to develop kssconcatjs command-line utility. This will allow to easily produce the various flavours of KSS engine in a single Javascript file : development or production, with or without concatenated plugins.

Developers from frameworks built on Java or PHP will integrate the whole engine by integrating a single Javascript file.

All in all, a lot of work was achieved. Long life KSS !

--
Godefroid Chapelle

2007-04-04

Report from the Sorrento sprint

Filed Under:

/blog/sorrento1.jpgWe spent a nice week in the beautiful region of Sorrento, Italy. For KSS, the sprint was a great success, even more than we had anticipated.

We arrived with a lot of to-do tasks and open bugs to the location. Since we recently realized that we are fixing the same bugs over and over again, the motto of this sprint was "tests, tests, tests". This means that we extend the selenium tests to cover the entire Plone application part of KSS and soon we will be able to run these tests in an automated manner with our kissbot.

We introduced KSS to a lot of developers, most of whom encountered the technology for the first time. After a one day tutorial, they were immediately able to start fixing issues and developing new functionality themselves. In addition, this time we also required that for each fix the corresponding tests must be written as well.

Writing selenium tests was a lot of fun and sometimes we encountered difficulties. It seems that we will soon need to make our life easier and improve this process. But we do not even stop here. We will make the creation of selenium tests as mandatory developer policy, accompanied with tests on different levels:

  • functional doctests to test if a given html class or id, that is needed to activate kss, is present in a template,
  • unittests that simulate the client's call to a kss server action, and check the command response that would be marshalled to the client.

A lot of issues were fixed or had a good progress, including the following ones:

  • Enter and Escape works correctly for in-line editing, including Safari! (Simone Deponti, congratulations.)
  • The zope3 event handling to refresh screen regions if content is edited, is fixed to work with the portlets engine again. (Rosario Di Somma, Simone Deponti)
  • Fixed issues with the links in the body view of content. For this a new option created that can be used to prevent the bubbling of events. (Fabrizio Reale, Davide Moro)
  • Fixed issues with the content menus to change the review state and the default display view (Massimo Azzolini, Rosario Di Somma). This involved improving the refresh of the content menu. (Jean-François Roche)
  • Improved our test infrastructure which now use layers correctly (Daniel Nouri)
  • Made the first functional doctest to check html ids and classes (Fabrizio Reale, Daniel Nouri)
  • Kss-ify Contentrules; this involved using macros from a Zope 3 view (David Convent, Daniel Nouri)
  • Kss-ify locking support (Jean-François Roche)
  • Refreshing screen regions with viewlets (Jean-François Roche)

In addition, many more developers helped checking bugfixes and writing more tests. We also had a bugday fully dedicated to Internet Explorer, and we also discovered a code clash with kupu concerning the usage of the sarissa javascript library. This is yet to be solved later.

I believe this sprint was a milestone for this year and its success comparable with last year's BubbleNet sprint. I would like to thank to everyone for the great work we could achieve together for KSS and Plone.

/blog/sorrento2.jpg

2007-03-02

Report from Snowsprint 2007 and the Baarn UI sprint

Filed Under:

Work done on KSS framework during Plone community coding sprints.

We have worked on the following areas during Snowsprint 2007:

  1. Godefroid was improving the testing framework, and built the kissbot with help of Andreas Zeidler and Thierry Benita. It is based on buildbot and buildout components. We can now test automatically our Selenium functional tests on a farm of servers.
  2. Balazs and Godefroid made some refactoring on the framework in order to support the drag-and-drop plugin better. The drag-and-drop plugin is still under development.
  3. Jean-Nicolas Bes and Balazs worked on eventPush with the help of Thierry Benita. This is an  experiment based on Twisted and with technology borrowed from the "Comet" library. We tried to enable the server to send asynchronous commands to the clients. With this, we want to demonstrate, for example, that changing the title in one client would simultaneously change the title in all clients viewing the same page. The goal of this experiment was to show a proof of concept and proceed with the exploration of this area. This is NOT targetted for Plone 3.0 or any close release.
  4. After the sprint, Phillipp von Weitershausen refactored the server side event handling, fixed the pending issues and reported that he successfully used KSS with Grok, on Zope 3.

During the Plone 3.0 Baarn UI sprint, some progress was done in the following fields:

  1. Refactoring done to get rid of the "executeCommand" workaround. We can now use a selector with any client action to express on which nodes the action will be executed.
  2. Several bugs were fixed in Plone 3.0 integration, including kupu related ones and the issues about the "Do you want to leave this page ?" query. Most issues were caused by other components that had changed and unwillingly broke KSS. The importance of testing is proven again.
  3. More progress was done on the testing infrastructure. The demo tests are now exercised on Firefox-Linux and IE-Windows platforms. Jeroen Vloothuis worked on a script that generates Python modules (that run the Selenium test cases) from the Selenium HTML recorded with Selenium-IDE.

We would like to thank everyone for providing great work for Plone and KSS, and hope more will join in the future too.

We would like to mention that KSS has a FreeNode IRC channel (#kss).

There is a new mailing list on codeSpeak.net : kss-devel. It is dedicated to KSS development issues and generic use cases. There is also a mailing list that monitors the KSS subversion repository : kukit-checkins. Both lists have been subscribed to gmane.org : news:gmane.comp.web.kss.devel and news:gmane.comp.web.kss.scm .

2006-11-29

Naming consolidation: KSS on the rocks

Filed Under:

KSS, Kinetic StyleSheets is the name that will be used from now on for the project.

Recently, we received a lot of comments that we were using too many names for the various parts of the project. This induced confusion within users and developers. We had both historical and strategical reasons for having multiple names. However, the time to clean up the situation has now arrived.

We want to confirm that the framework will be called

KSS

as an acronym of

Kinetic Style Sheets.

This name, already used previously, represents the principal nature of the framework : our behavior stylesheet, which has syntax and semantics similar to CSS (Cascading StyleSheets - hence the similarity between KSS and CSS). The word kinetic insists on the idea that the framework adds dynamicity to existing pages. From now on, KSS will imply the whole system, the stylesheet syntax and the javascript stack.

There is nothing settled today for the pronounciation. Some like to pronounce KSS as it is spelled (Kay-es-es). Some like to say "KiSS" . And some prefer to imitate the "Kssssss Kssssss" sound that the friendly snake called Python likes to make after dinner...

Simultaneously, to simplify things, the following names are deprecated and wont be used anymore.

  • Azax  was used to differentiate the Zope product from our client-side javascript library. "KSS for Zope" will be used instead of Azax, and "KSS for Plone" will be used instead of PloneAzax.
  • Kukit is the original name of the client-side javascript library. It was used as the global project name but we dropped it because of its negative connotations in certain languages. Although it still appears in directory and variable names in our code, it will remain an internal detail.

Merge in Plone 3.0

We will soon merge our Plone specific products into the 3.0 Plone repository. Simultaneously, our products will be moved out of the Zope 2 Products namespace. This will imply some package import changes:
  • Products.azax will become kss.core (class names that have the word "azax" in them do not change for now, but will be gradually replaced in the future, with a proper deprecation policy). The namespace kss will be reserved to hold further packages for the development of the core framework.
  • Products.PloneAzax will become plone.app.kss
  • Products.ATAzax will become archetypes.kss
  • Add-on products will go wherever they otherwise belong to. They do not have to go under any of the kss namespaces : each product can have its own kss stylesheets, command sets and javascript plugins that are activated from zcml and totally agnostic to their subdirectory locations. Those KSS addons are meant to be bundled with the product that uses them.

Since the external products will not need extensive import due to the newest enhancements, the change from azax to kss will not be painful and will affect few places in add-on products (in case there are some already ;-). In fact, there is a single interface that any product needs to import. The merge will happen in the next coming days. However, the package path changes will only affect the repository trunk versions: versions 1.0 and 1.1, working with Plone 2.1 and 2.5 will not  be affected at the moment.

The above information is still subject to small changes, until the merge will have been completed. If necessary, I will post further information to developers currently working on the code.

2006-11-23

Interview at the end of the KSS sprint in Seattle

Filed Under:


A video report summarizing the KSS sprint in Seattle is available from COM.LOUNGE TV.

2006-11-08

Plone conference report

Filed Under:

Report about KSS both at the conference and at the post-conference sprint.

The Plone conference and sprint has finished in Seattle. Lot of people say it was the largest and most interesting conference so far. Well, it was also an important step for the development of KSS.

We gave an introductory tutorial about KSS. We were running at the same time than Philikon and had the same feeling as him that we spoke in front of a not so full room. After all, it was afternon of the last day and people might have grown tired.

Nevertheless, we received lots of positive feedback that reassures us that the initial goals are valid, and that we are moving into the right direction with the implementation. At the sprint following the conference, new developers started to work with and on KSS; once again, we could experience that, after a short introduction, they were able to contribute to the code.

ploneazaxAlthough the sprint lasted for two days only, we made good progress, especially in the following areas:

  • Jan and Massimo have fixed most of the bugs that had crept in after the Louvain-la-Neuve sprint. (They were either the consequence that we are using the development trunk of Plone, or that we provide backports of the software to practically all Zope and Plone versions. - In other words, we have many branches to maintain and that gives a higher chance to dependency problems.)
  • Balazs has refactored the way the plugins use the Zope3 component architecture : as a consequence, all our plugin components are now really independent of their import locations.
  • Jan, with Aaron and Josten, went on with implementing the Plone 3.0 use cases. We can, now, for example,  quick-edit the data rendered in the event summary table.
  • Last, but not least, we have a working version of a solution to the following problem : when some data on the server is modified by an Ajax request, the client should update all parts of the screen that are displaying the modified item. For instance, after quick-editing the title of a content item, not only must the title be updated in the content area, but the navigation portlet, the breadcrumbs, the recent items portlet have also to be updated. We can see how a generic solution is needed for this generic problem : custom portlets might also need to be updated. Jeroen (with Luca, Gotcha and Philikon), has built a Zope 3 event based solution that emits an event (IAzaxEvent) when some state is modified on the server. Handlers can be registered to automatically update all dependent parts of the screen.

There is still a lot to do in the future. Without being exhaustive, the following key points are foreseen:

  • Move our code out of Products. Merge PloneAzax and ATAzax templates into the Plone core. This is now prepared and will happen asap.
  • Tests, tests, tests. We are entering into a stage where testing becomes even more critical. We have to complete our coverage. We need to have Selenium tests for all the Plone UI functionality, and we are also planning to extend our client side framework to be able to load and test DOM content in an automated way.
  • Improve the caching story. We want to be able to differentiate between cacheable and non-cacheable requests, and allow CacheFu to have fine-grained control just as with normal requests.
  • Improve the client-side request queue manager to handle priority queues and the cancellation of requests. This will allow, for example, to have individual "loading" spinners and cancel buttons on each of the page elements whose refreshment is in progress.
  • And most importantly: go on with the use cases for Plone, make a drag-and-drop component and extend the LiveSearch component to be used in a more generic way then before, for the filtering of very large result sets.

We wish to thank to everyone who joined us in our efforts. We believe that if we go on working like this (and of course we will), we are looking forward to a real exciting Plone 3.0 release. Thank you for making this happen.

And of course, as always, there is also a personal side of the story. It involves us Europeans, the trip to America was really amazing. Our private passtime activities like birdwatching, sealspotting in either Seattle or San Francisco, attending some cool Halloween parties (yes, nine were shot just a few blocks away from us) or chasing the Hollywood sign in LA (one of my favs) were truly fun.


Finally, although many have already told it on several occasions, we want to repeat it : big kudos to the conference organizers and to our more then friendly personal hosts.


The KSS team

2006-10-01

Visit to Drupal conference

Filed Under:

Today I took a short visit at the Drupal conference, held in Budapest, Hungary. (Drupal Konferencia 2006, Hungarian link only.) I had the chance to talk with Dries Buytaert, Károly Négyesi and other lead developers of Drupal.

I do not attempt to give a summary or comparison between the two CMFs, because I hardly know Drupal. It was an interesting experience to recognize the same patterns we apply in Plone but in a quite different context. I had an overall good impression and was very welcome by our "rivals". (No, I did not wear my Plone Conference t-shirt. :-) )

I also had a chance to learn about the usage experiences of AJAX technologies in Drupal. Drupal has already adopted jQuery as its  javascript framework and plans to build its AJAX services on top of that. jQuery indeed looks very promising and many developers will agree on this.

This makes me stronger in my position: the core of KSS is currently independent of all javascript frameworks, and it should stay so. The layer that enables access from KSS to any particular framework should not go into the KSS core, but should be implemented as a KSS plugin component (distributable together with the core or separated) instead. This has been our recent practice, and I'm convinced we should continue with that. This ensures not only that we will always be able to deploy simultaneously multiple javascript frameworks if needed, but also that we can always reuse the most stable and best maintained javascript codebase that is available.

I mention this because during the BubbleNet sprint I had an argument with Daniel Nouri who was in favour of depending on Mochikit, and I also understand that others promote the usage of Prototype and Scriptaculous. I believe that the above outlined solution allows us to take the best of all worlds.

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

2006-08-30

KSS bundle for Plone 3.0

Filed Under:

We have prepared a preview bundle for Plone 3.0 that contains examples of KSS usage in Plone and Archetypes.

A long time has passed since our last blog entry and a lot of progress has been made with KSS / Azax.

Previously we mainly concentrated on completing the core framework and working out use cases for Zope. As a result the core KSS framework and its base demos run on a variety of Zope versions including Zope 2.8, 2.9, 2.10 and Zope 3.2. The documentation has also been started; there is a tutorial for startup, and some other documentation. We also had some discussion on the mailing list that gave us a lot of input on what use cases would be important to do first - thank you Martin 'optilude' Aspeli for the lot of work devoted into this!

Next we could start to focus on use cases for Plone and Archetypes. As a result, we already have some use cases working in our review bundle, and our PLIP contains more information about the general picture and how we plan to move on.

In the bundle we decided not to branch off Plone or Archetypes but to offer add-on products instead, thus showing how KSS can add dynamicity to existing applications. We have working demonstration of

  • content tab switching:  if possible we change the content region without reloading the page in an economic way, and if not, we fall back to traditional navigation. This works with all "green" tabs including those in the setup area. There is a problem on loading the kupu editor, which currently either works or not, we hope to solve that soon.
  • autorefresh of portlets: We have a simple portlet autorefresher that in the default setup refreshes the "recent" porltet, any portlet can be refreshed by just adding a corresponding rule to the KSS resource. This could be easily integrated with the portlet engine later.
  • In-place navigation in the calendar portlet
  • validation of AT fields on onblur event (in ATAzax product): On leaving a field the validation of the field is done and the field error message is displayed, this is only implemented for the String widget and will soon be extended for all built-in widget types.
  • validation of the entire AT form when save button is clicked, showing error messages without reloading if there are some errors (in ATAzax product).
  • livesearch is now bound to its input with KSS: in other words, we show how external components can coexist with KSS and existing code can be wrapped with lightweight modifications (in livesearch product). Soon we will also show how the same component is easily reusable for other tasks like autocomplete and other intelligent search fields.

In addition, there is also a live demo site set up which however shows just the Zope-only demos of the azaxdemo product at the moment - which means none of the above stuff yet :-(, nevertheless it gives a quick view into how KSS works.

In September, we will have a 4 days developer sprint in Belgium to enhance further the Plone UI with KSS. We plan to complete existing use cases and introduce additional ones. We also plan to enhance our testing system and provide more effect libraries by wrapping existing javascript libraries for use in the KSS framework.

Although the main system is usable with all Zope and Plone versions, the Archetypes specific parts of the review bundle are prepared for Plone 3.0 and run only on Zope 2.10. You also need to manually replace Five with the svn version of Five 1.5,  (iow, even the svn version of Zope 2.10 is insufficient since that links to a static tag of Five that contain critical bugs). Many thanks to all those people who made this possible and especially Alec Mitchell, Hanno Schlichting  and Philipp von Weitershausen who helped us invaluably to track down a few showstopper issues.

2006-07-03

Report from mini-sprint

Filed Under:

The Azax core developers featuring Godefroid Chapelle and Balázs Reé have had a 3-days mini-sprint on KSS in Belgium, in the BubbleNet headquarters. We would like to report about the work done since the Archipelago sprint.

  1. We were looking for a new name to replace 'kukit" : we have decided to call it officially "KSS" since this is the most visible part of the framework. The Zope support is still called Azax and the Plone product PloneAzax. (The javascript file keeps its name "/blog/kukit.js".)
  2. We revised Balázs's KSS2 format. KSS2 had improvements to the syntax proposed at the archipelago. It had grown out the implementation of the first use cases. We have kept large part of the improved semantics of KSS2 but we have switched back to a syntax closer to the original proposal. We think we have come to a stable KSS syntax.
    We have put the new implementation on the trunk and updated all sample products to work with it. Docs will be brought up to date as well.
  3. We fulfilled our promise made at the Archipelago sprint, and showed how existing programs written with prototype, without any previous consideration to KSS, can be transparently hooked into KSS event binding and KSS's command marshalling architecture. At the moment it just works with a single example. The same can be done with existing Bling components, although we have not demonstrated that yet. The codename of the project is "bluekit".

There is a lot to be done on the framework:

  • refactor the code
  • add missing features
  • evaluate with use cases
  • wrap up scriptaculous and Bling components into kss plugins to have some "effect lib"
  • finalize the plugin API
  • write tutorials, documentation

But it is now finalized to the level that other developers can start experimenting with it. And so the most important part begins: start to use it with real Plone usecases, and find out if additional support is needed from the framework. Also design a consistent look and feel of ajax for Plone.

It would be nice to have a sprint on this subject, where the main focus would be the Plone UI itself, but with the framework developers present to support the different teams. Nothing has yet been decided but it's in the plans.

Please visit this page to have information about the current bundles.

2006-05-29

AZAX status

Filed Under:

Just a few words...

Hello everyone,


I started up this blog and documentation site to keep you informed about the proceedings of the ongoing AZAX development for Plone. You can check out a bit more information here, but at the moment there is not too much material yet. You can expect more things appearing in the near future.

At the moment we are in a bit of transitional state with the KSS description, which means there is preview code available but because of the changes I am currently implementing, I kindly ask everyone who is interested to wait a few days until I can prepare working code and demos, because that would make further discussion and development much easier.

I will make another announcement as soon as possible. Thank you for your attention and patience.