tutorials
Jun 01, 2010
Sorrento Sprint Summary - collective.amberjack progress report
RedTurtle is participating each year in Sorrento's Plone sprints. We were there also last week. It was an amazing time of brainstorming and coding. I will try to make a summary of what we have archived.
Symposium
We have started collective.amberjack presence in Sorrento with Massimo's presentation at the European Plone Symposium.
Sprint
Then we had two sprinting days. We have started day one with brainstorming. We had three objectives/questions:
- collective.amberjack sandbox
- refactoring the code - how to simplify collective.amberjack tour definition and registration
- translations - how to manage tour/steps translations
thanks to a fruitful discussion (garbas, dukebody, gborelli, miziodel, shywolf9982, sorry if I forgot your name ;-) we have right now answers to all of our dilemmas.
SanDbox
First idea of having a sandbox for collective.amberjack came up at last Plone Conference in Budapest. We have collected a lot of ideas for different use cases. We have had also some internal brainstorms in RedTurtle about it. Finally after confronting all the concepts - during Sorrento brainstorming - we will have a simple solution which should satisfy most of the users:
- simple Plone site deployment (like demo.plone.org)
- open registration for all users
- collective.amberjack preinstalled and ready to use
- user will try-out Plone using amberjack in his member folder
- nightly restart with fresh Data.fs
Code refactoring
We have started refactoring collective.amberjack. There are 3 areas of interests: javascript, tour definition and tour registration. Luca was doing a great job trying to simplify javascript part. He also prepare a good startup for future enhancements. I was refactoring tour part. We have decided to use a
configuration baseD tour definition,
which looks like that:
[amberjack] steps = 0_create-a-new-folder 1_fill-out-the-fields 2_publish-the-folder 3_all-done title = Add and publish a Folder [0_create-a-new-folder] blueprint = collective.amberjack.blueprints.step title = Create a new folder url = / text = Folders are one of .... validators = python: isManager python: isNotFolderCreated microsteps = 0_0_microstep 0_1_microstep 0_2_microstep [0_0_microstep] blueprint = collective.amberjack.blueprints.microstep description = If you don't want to perform the ... automatically done by your browser. [0_1_microstep] blueprint = collective.amberjack.blueprints.microstep idstep = menu_add-new description = Click the [Add new...] drop-down menu. [0_2_microstep] blueprint = collective.amberjack.blueprints.microstep idstep = new_folder description = Select [Folder] from the menu.
This concept is well known across the community. I hope it will be also more human readable comparing to python dictionary ;-). We have a working version in the trunk. For new tours we have also
new tour registration
- comparing to old approach (registration only using ZCML) you can now use also TTW registration. Other important change is that tour doesn't need to be a python package any more. Because it's a simple .cfg file right now you can simply zip it into an archive (zip, tar) and register it. We have a working implementation for web source and local file system registration (which you can find in the trunk). Archive file can be shipped with multiple tours and with
translationS
which right now are still just a concept that need to be implemented. We would like to make a use of i18ndude tool but because it was designed for ZPT this could be a wrong approach. Overall idea is to keep all the files (tour and the translations) together, something like:
- mytours.zip |- tour1.cfg |- tour1_en.po |- tour1_it.po |- tour1.pot |- tour2.cfg |- tour2_en.po ...
Fixing bugs
Mirco and Federica were working together and did an enormous job fixing most of the 1.1a release bugs. Thanks to Rob we have solved also some TinyMCE problems that we have had. We have still some open issues, like 'new portlet creation' tour that need some attention so we still need your help!
What's next?
The current development focus is on 1.1 release, which includes:
- new tour definition (python dictionary based tour will still work until 1.2)
- new tour registration (old registration will still work until 1.2)
- finish translation implementation
- fix last bugs
- deploy sandbox probably on demo.plone.org
- collective.amberjack.windmill - which should become default interface for creating and editing tours; we have right now something more then just proof of concept:
May 31, 2010
Sorrento Sprint: collective.amberjack
Come ogni anno da 4 anni abbiamo partecipato al Sorrento Sprint. Quest'anno abbiamo deciso di andare in forze (8 persone) allo scopo di portare avanti lo sviluppo di amberjack di cui ci siamo presi carico nei confronti della comunità.
Gli obiettivi
Abbiamo una milestone da raggiungere: quella del rilascio della versione 1.1a. Questa comprendeva:
- la risoluzione di alcuni bug o problemi di interfaccia
- il refactoring del codice javascript
- il brainstorming su come evolvere il sistema
Abbiamo risolto i bug, introdotti ulteriori miglioramenti all'interfaccia e rifattorizzata buona parte del codice javacript. Rimane qualcosa da finire, nel complesso è stato un successo.
Inoltre, sono stati introdotti cambiamenti strutturali alla definizione del tour.
Luca, Federica, Mirco ed Andrew hanno fatto un gran lavoro.
Il punto focale però è stato il confronto con la comunità. Avevamo preso alcune decisioni che ci è sembrato opportuno sottoporre al vaglio dei presenti e abbiamo ottenuto ottimi suggerimenti e conferme sulla strada intrapresa.
Windmill
Windmill diventerà l'interfaccia principale di creazione di un tour. E' il modo più semplice per crearlo, aggiornarlo, tradurlo. E' di enorme efficacia sia per un end-user in quanto servirà poco addestramento che per uno sviluppatore che potrà creare al tempo stesso un tutorial per i suoi add-on e un test funzionale che verifichi che l'introduzione di modifiche non inficino il comportamento generale del sistema.
Questa conferma ha portato ad alcune riflessioni e variazioni di indirizzo.
formato dei tour
Il formato cambia. Non più complessi dizionari scritti in python, ma file di configurazione altamente leggibili. qualcosa del tipo:
[amberjack] steps = 0_create-a-new-folder 1_fill-out-the-fields 2_publish-the-folder 3_all-done title = Add and publish a Folder [0_create-a-new-folder] blueprint = collective.amberjack.blueprints.step title = Create a new folder url = / text = Folders are one of .... validators = python: isManager python: isNotFolderCreated microsteps = 0_0_microstep 0_1_microstep 0_2_microstep [0_0_microstep] blueprint = collective.amberjack.blueprints.microstep description = If you don't want to perform the ... automatically done by your browser. [0_1_microstep] blueprint = collective.amberjack.blueprints.microstep idstep = menu_add-new description = Click the [Add new...] drop-down menu. [0_2_microstep] blueprint = collective.amberjack.blueprints.microstep idstep = new_folder description = Select [Folder] from the menu.
Sarà ovviamente possibile salvare i tour, in questo nuovo formato, direttamente dall'interfaccia di Windmill.
Ovviamente è necessario avere un sistema di conversione dei vecchi tour: è stata creata l'utility "tour_converter" (in collective.amberjack.core) che migra vecchi dict-based tour in nuovi cfg-based tour.
I tour saranno quindi semplici file. Questo significa che la sorgente da cui verranno "pescati" non sarà più un package scaricabile da pypi, ma potrà essere salvato in locale, messo su un server condiviso, scaricato da sorgenti eterogenee (svn, http server, ftp, ecc.). Ovviamente abbiamo una registrazione "classica" via zcml oppure una più "cool" via pannello di controllo di plone.
E' già pronta e funzionante una versione experimental che funziona con questo nuovo approccio e i 12 plonetour sono stati già convertiti e pronti per l'uso.
Un discorso a parte per le traduzioni: dobbiamo reimplementare il meccanismo in quanto ora non abbiamo più file .py. Contiamo di definire una modalità di traduzione simile alla precedente, ma in qualche modo occorrerà effettuare qualche variazione al sistema di generazione dei file .po.
sandbox
Il brainstorming pre-serale in giardino è stato molto utile anche in questo caso.
L'idea che ne è scaturita è quella di fornire un folder personale dedicato ai tour all'interno del quale l'utente abbia tutti i diritti necessari per poterli eseguire completamente. Questo copre il 90% delle situazione secondo le previsioni della maggior parte dei presenti.
Con questa sandbox 1.0 si potrà già creare un "demo.plone.org": chiunque potrà provare Plone senza doverlo scaricare.
Inoltre è semplice per ogni sviluppatore di add-on montare un'istanza in cui includere il proprio tour ed eventualmente richiedere alla foundation il dominio: "demo.myaddon.plone.org"
Assolutamente semplice sarà fornire un sistema che ogni notte ripristini il portale ad una situazione "pulita".
Non sembra interessare, almeno in questa fase, un sistema che automaticamente crei un'istanza on-the-fly che permetta all'utente di provare plone in completa autonomia. quel 10% di target-user possono tranquillamente utilizzare un comodo UnifiedInstaller
May 17, 2010
rilasciato collective.amberjack 1.0
Questa è la prima versione per Plone 4
abbiamo un team di supporto!
Dalla 1.0x RedTurtle ha deciso di supportare il progetto.
Questo non significa che collective.amberjack sta diventando un progetto aziendale, ma semplicemente che avremo un team che ne porterà avanti lo sviluppo.
Il team, oltre a me, è composto da Mirco Angelini, Federica D'Elia, Andrew Mleczko e Luca Fabbri. All'ultimo sprint a Ferrara abbiamo avuto il supporto di Jacopo Deyla e il ritorno di Giacomo Spettoli (tra i primi contributori) entrambi della Regione Emilia Romagna.
Ora, sei ancora di più il benvenuto se vorrai partecipare allo sviluppo, supportare l'iniziativa o semplicemente utilizzare il sistema. Il tuo contributo sarà ancora più utile ora che qualcuno lo porterà avanti sistematicamente.
what's new?
Questa prima release 1.0x supporta completamente Plone 4:
- i 12 tour sono stati completamente rivisti
- è stato introdotto il supporto per TinyMCE
- abbiamo un piano di battaglia
what next?
Dicevo di un piano di battaglia. Il piano prevede che al prossimo sprint a Sorrento si concludano le operazioni che ci porteranno ad una versione 1.1 rifattorizzate e ulteriormente migliorata.
Nel frattempo predisporremo una serie di step che ci porteranno ad avere un sistema più solido, usabile e soprattutto estensibile.
Contiamo di introdurre Windmill come tool di creazione di tour via web. I primi tentativi sono molto promettenti. Andrea Benetti sta portando avanti la parte di studio che verrà integrata successivamente in collective.amberjack.
Dove puoi seguire il progetto?
Se sei interessato a partecipare, i posti dove ci incontriamo sono questi:
- launchpad, per la gestione del progetto (blueprint, bug, ecc.)
- coactivate, ci è utile per documentare il tutto attraverso il suo wiki e per gestire la mailing list
- il codice è tutto rilasciato su collective.
Se, viceversa, vuoi utilizzare il sistema, pypi è il tuo amico:
collective.amberjack 1.0 released
This is the first plone 4 compliant release
we have a support team!
Starting from 1.0 release, RedTurtle decided to support the project providing a 4 person team.
It doesn't mean that collective.amberjack is going to be company branded - quite the contrary - it means that we have a stable team that is going to enhance and mantain the tool.
Except me, the team contains: Mirco Angelini, Federica D'Elia, Luca Fabbri e Andrew Mleczko. During the last Ferrara' sprint, we were glad to have Jacopo Deyla's contribution and the Giacomo Spettoli's return (former contributor) both of them from Regione Emilia Romagna.
You are even more then welcome to participate in the development, in supporting the initiative or just in using and testing the tool. Your contribution will be more useful since, from now, there will be someone that will take care of it.
WHAT'S NEW?
This 1.0 release supports Plone 4:
- the 12 tours has been completely revised
- the TinyMCE support has been added
- we have a battle plan
WHAT NEXT?
I talked about a roadmap. It assumes that during next Sorrento sprint we'll complete the tasks that will refactore the code and improved 1.1 release.
In the meanwhile we're going to schedule a set of steps that move collective.amberjack in a more solid, usable and mostly, extensible tool.
We are also confident to introduce Windmill as the TTW tool for creating tutorials. Andrea Benetti from University of Ferrara is starting to extend it. Then we'll integrate it into a collective.amberjack.windmill package.
how could you get involved inTO the project?
If you are interested in contribution, the places where we meet are these:
- launchpad, for the project management (blueprints, bugs, etc.)
- coactivate, extremely useful for documentation through its wiki and for the mailing lists
- the code is obviously release on collective.
Otherwise, if you just want to use the system, pypi is your friend:
May 04, 2010
New collective.funkload releases
I have recently released a new version of collective.funkload and collective.recipe.funkload. There is one major improvment - funkload recorder is now working properly with collective.funkload scripts.
Here @RedTurtle we are heavily using funkload for acceptance and benchmarking tests. We have started using it in 2008 just after Bristol Performance Sprint. We have found even more useful with buildout recipe. The only missing part was the recorder. It's built-in Funkload itself, but it was not enabled in the recipe. Well - now it is ;-)
/ If you want to know how to include funkload in buildout project - check my previous blog /
Starting a recorder is quite easy:
$ ./bin/funkload record -p 8080 MyTest
for full usage call:
$ ./bin/funkload record --help
This will start proxy on 8080 port and save all your browser requests to MyTest funkload scenario. Now open your browser, change proxy configuration to localhost:8080 and click-through test case. When you finish - stop the proxy with Ctrl-C. Funkload will generate a test_MyTest.py file and notify you where you can find it. It should be now collective.funkload compatible - you can lunch:
$ ./bin/funkload test /path/to/test_MyTest.py
To test it.
Another small improvement is a PloneFLTestCase. It extends default funkload test case, implementing two additional methods helping with Plone content creation. Right now instead of using this approach:
folder_portal_factory = self._browse(server_url + "/coreloadtests/Members/" + self.user_id +"/createObject?type_name=Folder",
method='get',
follow_redirect=False,
description = 'Get folder portal factory')
folder_edit_url = folder_portal_factory.headers.get('Location')
folder_id = folder_edit_url.split('/')[-2]
folder_created = self.post(folder_edit_url, params=[
['id', folder_id],
['title', 'folder'],
['description', ''],
['description_text_format', 'text/plain'],
['subject_existing_keywords:default:list', ''],
['last_referer', 'http://localhost:8080/coreloadtests/Members/' + self.user_id + '/view'],
['form_submit', 'Save']],
description="Post /coreloadtests/Members/user...280843853/atct_edit")
new_folder_id = folder_created.url.split('/')[-2]
you can just do:
new_folder_id = self.addContent(
server_url,
portal_type='Folder',
params=[['id', 'id'],
['title', 'testing title'],
['description', 'testing description'],
['description_text_format', 'text/plain'],
['form.submitted', '1'],
['last_referer', ''],
['form_submit', 'Save']],
description='Create folder')
It doesn't do much, but for sure it helps you keep you test case readable.
Nov 13, 2009
How to write funkload test in few minutes
After PloneConf2009 I noticed interesting changes in collective.recipe.funkload. Right now writing a simple test for funkload is just few steps.
After Plone Conference 2009 I noticed interesting changes in collective.recipe.funkload and in collective.funkload itself. Right now writing a simple stress test for funkload is much easier - you can do it in few steps.
Let's start with creating a simple package called mytest:
$ ls ./mytest boostrap.py buildout.cfg setup.py src $ ls ./mytest/src/mytest __init__.py tests $ ls ./mytest/src/mytest/tests __init__.py test_Simple.py Simple.conf
buildout.cfg is also simple:
[buildout]
develop = .
parts = funkload
[funkload]
recipe = collective.recipe.funkload
url = http://www.plone.org
eggs = mytest
where www.plone.org is the url to the site you want to test (it doesn't need to be on you localhost)
Now the funkload test configuration file (Simple.conf):
[main]
title=Simple
label=Simple test for blog.redturtle.it
description=Simple test scenario
[test_Simple]
description=Simple test scenario
[ftest]
log_to = console file
log_path = Simple-test.log
result_path = Simple-test.xml
[bench]
cycles = 5:15:30
duration = 100
startup_delay = 2
sleep_time = 2
cycle_time = 2
log_to = file
log_path = Simple-bench.log
result_path = Simple-bench.xml
sleep_time_min = 2
sleep_time_max = 2
In this example most important bench configurations:
- cycles = 5:15:30 - contains 3 cycles: for 5, 15 and 30 concurrent users
- duration = 100 - duration of one cycle in seconds
- startup_delay = 2 - time to wait between starting-up threads in seconds
- sleep_time = 2 - time to wait between test in seconds
- cycle_time = 2 - time to wait between cycle in seconds
And the funkload test scenario (test_Simple.py)
import unittest
from collective.funkload import testcase
class Simple(testcase.FLTestCase):
"""Simple load test scenario."""
def setUp(self):
"""Setting up test."""
self.logd("setUp")
self.label = 'Simple test'
self.server_url = self.conf_get('main', 'url')
def test_ReadOnly(self):
self.get(self.server_url + "/",
description="Get /")
self.get(self.server_url + "/login_form",
description="Get /login_form")
self.post(self.server_url + "/login_form", params=[
['came_from', self.server_url],
['form.submitted', '1'],
['js_enabled', '0'],
['cookies_enabled', ''],
['login_name', ''],
['pwd_empty', '0'],
['__ac_name', 'admin'],
['__ac_password', 'admin'],
['submit', 'Login']],
description="Post for login a user /login_form")
self.get(self.server_url + "/folder/document1",
description="Get /folder/document1")
self.get(self.server_url + "/logout",
description="Get /logout")
def tearDown(self):
"""Setting up test."""
self.logd("tearDown.\n")
def test_suite():
return unittest.makeSuite(Simple)
additional_tests = test_suite
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')
It's a very simple scenario in which we are:
- opening plone site (get /)
- opening login_form (get /login_form)
- sending a post with login credentials (post /login_form)
- opening a document (get /folder/document1)
- logout (get /logout).
Now you need to bootstrap the buildout:
$ cd mytest $ python bootstrap.py
lunch the buildout:
$ ./bin/buildout
and lunch the bench:
$ ./bin/funkload bench -t mytest.tests.test_Simple
final report you can find in your buildout directory:
$ ls ./var/funkload/reports/2009-11-11-19-40-20 test_Simple-20091111T194020 $ ls ./var/funkload/reports/2009-11-11-19-40-20/test_Simple-20091111T194020 funkload.css index.html index.rst tests.data tests.gplot tests.png
For more information please check:
Oct 30, 2009
redturtle@ploneconf2009
alcuni riferimenti ai talk che abbiamo tenuto alla plone conference in corso in questo momento
I talk presentati sono stati 2:
- Carneade, dar vita alle relazioni del mondo reale: Plone come gestore di organizzazioni
- collective.amberjack: Plone come piattaforma per i tutorial
Tutto il materiale è già in linea.
Carneade
- La presentazione (su slideshare)
- un video di presentazione del sistema (su youtube)
- l'intero talk in streaming video (su ustream)
collective.amberjack
- La presentazione (su slideshare)
- un video di presentazione del sistema (su youtube)
- l'intero talk in streaming video (su ustream)
Sep 03, 2009
NSD, il tuo compagno di viaggio quando Domino va in crash
NSD (Notes System Diagnostic) è uno strumento Lotus per raccogliere informazioni a fronte di un crash o di un hang di sistema. Vediamo la sessione presentata durante DominoPoint Day 2008, l'evento italiano della comunità Lotus.
Tra qualche mese ci sarà il terzo appuntamento con il DominoPoint Day, ripartiamo da dove ci eravamo fermati: la sessione su NSD presentata nel 2008. Scarica la presentazione su Slide Share.
Aug 31, 2009
Amberjack on Plone: first steps
collective.amberjack project just released the first tours
What's that?
Amberjack is a tool that allows you to create tours on your site. The purpose of the collective.amberjack project is to improve its functionality and to provide a way for creating not just tours but something more: tutorials.
What does it provide?
The actual implementation provides 4 packages:
- collective.amberjack.core
- collective.amberjack.portlet
- collective.amberjack.plonetour
- collective.amberjack.metatour
collective.amberjack.core
This one contains all the basic functionalities:
- it lets you add tours via ZCML,
- it manages and validates tours and steps,
-
it draws the tour box and it manages all the UI interactions via javascript
collective.amberjack.portlet
this package provides two portlets:
- a one shot tour portlet
- a portlet with a set of tours
collective.amberjack.plonetours
this one contains the first released tours:
- Add and publish a Folder
- Add and publish a Page
- Add and publish a News Item
- Add and publish an Event
- Format a page using the visual editor
- Create internal links
- Create external links
- Upload an image
- Insert image on a page
- Using the Display menu
others will be released soon.
collective.amberjack.metatour
the idea is to provide a TTW way to create new tours. You can translate them via LinguaPlone and can be used by a non-technical user.
A next step is to export the TTW created tours as packaged that can be shared for example via pypi.
how simple adding a tour IS?
First of all you need to define the tour:
add_folder = {
'url': u'/',
'xpath': u'',
'xcontent': u'',
'title': _(u"Create a new folder"),
'text': _(u"Folders are ..."),
'steps': ({'description': _(u"Click the [Add new...] drop-down menu."),
'idStep': u'menu_add-new',
'selector': u'',
'text': u''},
{'description': _(u"Select [Folder] from the menu."),
'idStep': u'new_folder',
'selector': u'',
'text': u''})}
ajTour = {'tourId': u'basic01_example',
'title': _(u'Add a Folder'),
'steps': (add_folder,
)}
then you have to register it
<collective.amberjack:tour
tourdescriptor=".example_tour.ajTour"
/>
If you need a complete example, please refer to the code.
Where can I find infos and code?
- The project home page, with a mailing list and wiki pages
- The code:
- there is also a PLIP and a to do list


