May
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
Document Actions
May 29, 2010
Alessandro "sauzher" Ceglie presenta Plone@Uniba
Alessandro ha fatto un'ottima illustrazione del loro lavoro presso l'università di Bari. Grandi contenuti, grande strumento scelto per la presentazione e ovviamente tutto con Plone :)
Lui scrive su http://appuntiplone.wordpress.com
Document Actions
May 17, 2010
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:
Document Actions
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:
Document Actions
May 13, 2010
managing replicas on database using Lotusscript
How to manage database replication options using Lotusscript also if user doesn't have manager access
Customer request was:
Disable replication on the database if user never replicate it in the last week
User only has author rights in ACL database (which is a replica of a management deployed on n users laptops)
How to get it programmatically even if the user has no rights manager?
If you try to access the object NotesReplication and try to do something like that:
Dim session As New NotesSession Dim db As NotesDatabase Dim rep As NotesReplication Set db = session.CurrentDatabase Set rep = db.ReplicationInfo If rep.Disabled Then rep.Disabled = False End If Call rep.Save()
You get the following error:
"Error supplied to access product object method"
The key is to use the Notes API, in particular NSFDbReplicaInfo
API in this case exploit user credentials of id who wrote the Lotusscript code, so you should sign the agent with the ID of the administrator or with a user who has manager rights to the database
We must define the following class in the "Declaration" agent
Dim rc As Integer Type DBREPLICAINFO ID AS TIMED flags As Integer CutoffInterval As Integer As cutoff TimeDate End Type Declare Function Lib W32_NSFDbOpen "nnotes.dll" Alias "NSFDbOpen" (ByVal dbname As String, hdb As Long) As Integer Declare Function Lib W32_NSFDbClose "nnotes.dll" Alias "NSFDbClose" (ByVal hdb As Long) As Integer Declare Function Lib W32_NSFDbReplicaInfoGet "nnotes.dll" Alias "NSFDbReplicaInfoGet" (ByVal HDB As Long As retReplicationInfo DBREPLICAINFO) As Integer Declare Function Lib W32_NSFDbReplicaInfoSet "nnotes.dll" Alias "NSFDbReplicaInfoSet" (ByVal HDB As Long As retReplicationInfo DBREPLICAINFO) As Integer Declare Function Lib W32_OSLockObject "nnotes.dll" Alias "OSLockObject" (ByVal handle) As Long Declare Sub OSUnlockObject Lib "NNOTES.DLL" Alias "OSUnlockObject" (ByVal handle) Declare Sub W32_OSMemFree Lib "NNOTES.DLL" Alias "OSMemFree" (ByVal handle) Class NotesReplicationSettings Private hdb As Long As private retReplicationInfo DBREPLICAINFO Private prvdb As NotesDatabase Private flgDBExist As Integer Sub Delete If hdb <> 0 Then Call W32_NSFDbClose (hdb) End Sub Sub New (inpNotesDatabase As NotesDatabase) As String Dim sDatabase As New NotesSession Dim uaesession Dim rc As Integer Me.flgDBExist = False 'Get a valid NotesDatabase to the specified database If inpNotesDatabase Is Nothing Then Error 14104, "NotesUserActivity: Object Database is invalid" Exit Sub End If September prvdb = New NotesDatabase (inpNotesDatabase.Server, inpNotesDatabase.FilePath) If (prvdb.Server = "") Or (uaesession.IsOnServer) Then sdatabase = prvdb.filepath Else sdatabase prvdb.server = + "!" + Prvdb.filepath End If 'Open the target database rc = W32_NSFDbOpen (sDatabase, Me.hDb) If rc <> 0 Then Me.flgDBExist = False End If 'Set the Replication Information rc = W32_NSFDbReplicaInfoGet (Me.hDb, Me.retReplicationInfo) If rc <> 0 Then Me.flgDBExist = False End If Me.flgDBExist = True End Sub DBExist As Integer Public Function DBExist = Me.flgDBExist End Function Public Function Parent As NotesDatabase Set Parent = prvdb End Function Public Function SetDisableReplica (sFlag As Integer) As Integer As Long Dim puActivity If Not Then Me.flgDBExist Error 14104, "Notes DB not opened" SetDisableReplica = False Exit Function End If Me.retReplicationInfo.flags = (Me.retReplicationInfo.flags Or & H4) rc = W32_NSFDbReplicaInfoSet (Me.hDb, Me.retReplicationInfo) If rc <> 0 Then Me.flgDBExist = False End If End Function End Class
get an instance in initialize agent method as follows (db is target database to manage):
Dim nrs As New NotesReplicationSettings (db)
and disable (or enable depending on the parameter that is passed, 1 or 0) replication:
nrs.SetDisableReplica (1)
or
nrs.SetDisableReplica (0)
And that's all