RSS

Category Archives: Building Process

The upcoming myWebGate Release 1.2 – some Pictures

It was not on our wish list or requested. But Richie Schmid has found a brand new api in the WebKit of the latest chrome browser. It extends the capabilty of the browser to use a webcam. After a prototype, he has implemented a brand new photo uploader version. Here are some screenshots:

By clicking on “take snapshot” the picture can be cropped and uploaded as your new avatar. Directly from your webcam!
Thanks Richie for this brand new feature.
The upcoming myWebGate release is now in the final testing stage and will bring more than 10 new features.

 

 
2 Comments

Posted by on August 25, 2012 in Building Process, myWebGate, SocialBusiness

 

myWebGate – Social Software Development Process – Lessons learned.

During the lotussphere 2012 I was inspired to build our myWebGate Framework totaly new from scratch. The powere and the energy of the ibm developers and system architects has forced me to rethink my mindset about the whole XPages technologie. But rewriting a one year old framwork, with over a hunder days of manpower investigated, to have the same new made?

A crule idea but our executive board gave us the order to do this, under the focus of training, learning and transforming our development approach. It was a great time.

Yesterday we released the version 1.1 of myWebGate. This version completes some open user stories (see the release notes here) and it also completes a very new way of working together.

Our whole myWebGate development team was at the project start something we called consulting ninijas. High skilled and very talented in any aspect of development and administration of lotus notes domino. At the project start my co-pilot Peter Luder and I decide to change the model. Not a typical vertical approach: We transformed the team to a horizontal development approach. Richard became the role of our UI Guru, Peter does the project controlling and my job was the architecture. Barbara, Arthur and Marco are focused on serveral businessprocesses in the myWebGate Framwork.

This leads us to a better teamplay. Interaction was mandatory and every piece of code we build must fit. This pressure and this model of work, has effected any discussion. Normally you would expect more inefficiency, but it was vice versa. Focussing of the core competence and the delivering of brilliant work, leads to an unexpected effort and more features in the initial release as planned. And also a lot more in release 1.1.

Learn more about myWebGate -> Read This (german) and the documentation (english).

 
Leave a comment

Posted by on June 26, 2012 in Building Process, myWebGate, SCRUM, XPages

 

Tags: , , ,

Accessing Beans from Java Code in XPages (learned by Reading the SourceCode of the ExtensionLibrary)

Hello Java and XPages Fans

During our work for the myWebGate 2.0 OpenNTF Edition i was faced with a very simple Problem. I had to access a public method in one of our managed beans. This managed beans are designed to act as session facade. So the bean name is directory bean and the scope is session. The ClassName is based on our internal guidlines DirectorySessionFasade.

In this class, is a method called getMySelf() witch gives me some information about my current user in context of the myWebGate Framework. The powerfull thing about managed beans is, that the object exists only one time baed on the scope, in this case one time each session.

For our activtystream implementation I have to acces this getMySelf() methode, because all my relations are stored in the returning object. A short google search doesnt help, but I rember that I’ve ready a pattern in the ExtensionLibrary, that maby can help. An voilaz there it was, written by Phillip Riand, I found some thing that I changed to this for my situation:

public static final String BEAN_NAME = “directoryBean”; //$NON-NLS-1$
    
public static DirectorySessionFacade get(FacesContext context) {
        DirectorySessionFacade bean = (DirectorySessionFacade)context.getApplication().getVariableResolver().resolveVariable(context, BEAN_NAME);
        return bean;
    }
    
    public static DirectorySessionFacade get() {
        return get(FacesContext.getCurrentInstance());
    }

This simple codesnipped gives you the capability to execute DirectorySessionFacade.get().getMySelf(). The DirectorySessionFacade.get() Code calls the get( FacesContext context() and there the inmemory Variable directoryBean can be accessed.

What a simple construct to access the same instance in java as in the SSJS and XPAGES. Thanks to IBM for sharing the ExtensionLibrary as OpenSource.

 

myWebGate Building Process – Dojo und Templates

Das Benutzerverzeichnis ist ein Kernteil des myWebGate Framworks. Um dem Benutzer ein besonderes Erlebnis bei der Bedienung zu bieten, ist das Benutzerverzeichnis als “OnePage” Applikation designet. D.h. wir präsentieren alle Inhalte dynamisch. Die Daten werden via REST API direkt vom Server gelesen und dann on the Fly gerendert.

JSON 2 HTML Renderer gibts wie Sand am Meer. Unser Ehrgeiz war aber, dass wir das Problem mittels DOJO lösen (naja auch einige Lizenzfragen sind dann einfach geklärt). Leider ist es mit DOJO so, wie mit manchem genialen Projekt. Irgendwie hat der Dokumentator frei gehabt. Erschwerend kommt dazu, dass im Gebrauch mit XPages noch ein paar Dinge zu beachten sind.

Also zuerst das Kleingedruckte (oder wie krieg ich so ein Design hin, wie es Rechts zu sehen ist).

  1. Wir haben das HTML Template als PAGE erfasst und dort den Contentype auf HTML gesetzt.
  2. Das HTML Template darf nur 1 Root Element haben, sonst hat DOJO ein Problem
  3. Das neue DOJO Modul muss mittels
    <xp:dojoModulePath url=”biz.webgate.mywebgate.person”
    prefix=”mywebgate.Person”>
            </xp:dojoModulePath>
    eingebunden werden.

Tja und dann ist alles ziemlich simpel. Wir erstellen eine Javascript Client -Library, die wir biz.webgate.mywebgate.person.js nenne und schreiben dort folgenden Code rein:

Mittels dojo.provide definieren wir, was dieses File liefert, dojo.require definiert was wir alles brauchen, hier ist dojox.dtl._Templated die Rendering Enginge, die auf django basiert. Im dojo.declare geschieht die Magie. Mittel der cache Anweisung lesen wir das HTML File ein und peron:null erweitert unser Widget um ein neues Objekt.

In der Funktion openPersonTab() fügen wir dann die Person ein. Dabei greifen wir auf ein Spezielles TAB Objekt zu, dass uns das dynamische generieren der Tabs erlaubt. Die Variable xhrArgs definiert den Zugriff auf unser REST Service und lädt von dort das Personen Objekt. Der effektive Aufruf geschicht dann mit dojo.xhrGet(…), aber im Objekt haben wir auch die Verarbeitung des Resultats definiert. load wird dann aufgerufen, wenn wir erfolgreich die Daten abgegriffen haben. Innerhalb dieser Funktion initalisieren wir ein neues Widget und geben die data (das ist das Person Objekt vom Rest Service) direkt an das Widget weiter. dojox.dtl._Template redert dann das Template. Und durch placeAt() hängen wir das Renderresulat an das richtige Ort.

Blicken wir noch in das HTML Template:

Der Zugriff erfolgt über die {{person.____ }} Anweisungen. Wie man aus dem Code erkennen kann sind sowohl IF abfragen, wie auch for Schleifen möglich. Der Sprachumfang von DJANGO wird hier detailiert beschrieben.

Der REST Service liefert übrigens folgenden Code zurück:

Dieses Konstrukt lässt es nun zu, dass wir ohne Rendering Aufgabe für den Server die verschiedensten Personen öffnen:

Der vollständige Code wird im Juni auf openNTF veröffentlicht und ist unter der Apache Lizenz verfügbar.