<< September 2011 | Home | November 2011 >>

Tool of the day: websequencediagrams.com

Today I needed to draw a number of sequence diagrams and since I do not have a program installed for this I decided to look online. My search was successful and I was very happy to find websequencediagrams.com. What sets this tool apart from others is that you do not draw the sequence diagram but you write it. Just up my alley as a developer. Using easy syntax like the below you can quickly stitch a diagram together.

Alice->Bob: Go do it!
Bob->Alice: Okay!
Bob->Charles: Help me please!
Charles->Bob: Done!
Bob->Alice: Done!
The above would yield this diagram.
There's a number of styles to choose between such as napkin, plain UML etc.

There are probably other such tools but this fit the profile and use case for me.

Tags : ,

More on the JavaScript Module Pattern

Annoter good post on the Module Pattern - this one being the original post as far as I can tell. A JavaScript Module Pattern.

The JavaScript Module Pattern - adding namespace

The Module Pattern has as added benefit of allowing you to add namespace to classes. The below extends the previous example to make the class COM.LEKKIMWORLD.ModuleAbc. Very cool in my eyes and reduces the chance for name collisions much like with Dojo classes.

// Create a COM namespace
var COM = (function() {
  return {};
}());

// Create a LEKKIMWORLD namespace
COM.LEKKIMWORLD = (function() {
  return {};
}());

// Add a class called ModuleAbc to the COM.LEKKIMWORLD namespace
COM.LEKKIMWORLD.ModuleAbc = (function(secret) {
  // the object we're incapsulating
  var OBJ = {};

  // private variables (these are truely private and 
  // cannot be accessed from the outside)
  var secret = "my secret is: " 

  // my property
  OBJ.myproperty = "my property value";

  // echo method
  OBJ.echo = function(v) {
    return "Echo: " + v;
  };
  
  // return the object
  return OBJ;
  
});

The JavaScript Module Pattern

If you are like me you like object oriented programming and you try to encapsulate the functionality to the best of your ability. And that goes for JavaScript as well of course. JavaScript pose an interesting problem though as JavaScript objects are as opaque as air that is you can see right through it.

Normally an object in JavaScript - whether declared though dojo.declare or function/json isn't able to hide it's member variables at all. You can try with "this." or using _neverUser naming but fundamentally the "private" variables of a JavaScript class are available from the outside. Consider the below examples:

// enter the dojo
var DojoAbc = dojo.declare(null, {
  constructor: function(secret) {
    this.mysecret = secret;
  },
  myproperty: "my property value", 
  echo: function(v) {
    return "Echo: " + v;
  }
});
var myDojoAbc = 
   new DojoAbc("my little secret");
alert(myDojoAbc.echo(new Date()));
alert(myDojoAbc.myproperty);
alert(myDojoAbc.mysecret);

// plain ol' JavaScript
var PlainAbc = function(secret) {
  this.mysecret = secret;
  this.myproperty = "my property value";
  this.echo = function(v) {
    return "Echo: " + v;
  }
};
var myPlainAbc = 
   new PlainAbc("my little secret");
alert(myPlainAbc.echo(new Date()));
alert(myPlainAbc.myproperty);
alert(myPlainAbc.mysecret);
In both examples the "mysecret" variable is accessible although I didn't mean it to. There is no way in the above example to make the mysecret-variable invisible to the outside. That is a user of your class can access it and see it using a JavaScript debugging such as Firebug.

Bummer I thought. What then? How do I do it? Well I'm glad you asked as there is a way. It's called the Module Pattern. Let me show you but let me also warn you - it is a little conveluted to look at.

The below code starts by creates a class like above but nothing besides the myproperty-property and the echo-method are available (even in Firebug) from the outside. So the last alert will actually say "undefined" as mysecret is available to the outside. It's super cool and it's the way I'm going to do my objects from now on.

var ModuleAbc = (function(secret) {
  // the object we're incapsulating
  var OBJ = {};

  // private variables (these are 
  // truely private and cannot be 
  // accessed from the outside)
  var secret = "my secret is: " 

  // my property
  OBJ.myproperty = "my property value";

  // echo method
  OBJ.echo = function(v) {
    return "Echo: " + v;
  };
  
  // return the object
  return OBJ;
  
});

// use case
var myModuleAbc = 
   new ModuleAbc("my little secret");
alert(myModuleAbc.echo(new Date()));
alert(myModuleAbc.myproperty);
alert(myModuleAbc.mysecret);

More information about the pattern incl. composition, inheritance etc. can be found on the the Adequately Good blog in the JavaScript Module Pattern: In-Depth post.

Have an excellent Friday.

IBM Connections Extension license - how to handle varying user entitlement and which drawbacks I see

As I blogged the other day (IBM Connections Extension license) IBM has released an extension license for IBM Connections to allow customers to buy the remaining features (besides Profiles and Files). It did however beg the question: "So how do I control access to the remaining features for users not entitled to use all features in Connections?". After asking Ed Brill the solution from the IBM Connections team is surprisingly simple and easy to implement. It does however put the burden on you as the administrator is it's not a "checkbox solution". Let me try and explain how to do it.

In IBM Connections (and all other J2EE applications) access to functionality is controlled by roles. That is the container will verify that a user has been mapped to a particular role (either as the user or by virtue of being member of a group) before granting access. In Websphere Application Server this is done in the Integrated Solutions Console (ISC) on a per application basis. The way you restrict access to particular features is the same way you force users to log into Connections and is nicely described in the wiki/InfoCenter. The way you would do it for this scenario is to create an LDAP group of fully entitled users and make sure only these users are granted access to features other than Profiles and Files.

The solution works and is easy to implement but is has a major drawback in it doesn't change the main menus. At least to the best of my knowledge as the service that returns menu items reads of the general Connections configuration and does not take the access of a particular user into account. A better solution would of course be that the service was aware of the access restriction and only features to which a user has access are presented in the menus. It would also lend itself better to a simpler UI for these casual users of Connections.

Another issue is that the approach doesn't restrict a fully entitled user ("user 1") to share information with a limited entitled user ("user 2") in say communities. "User 1" is free to add "user 2" but "user 2" would be unable to see the information. The user would receive e-mail notifications etc. but wouldn't be able to open the community. The user would try and go to the community, could log in successfully but still be unable to access the the community. Probably unable to realize why. The main culprit here is that the name resolution service isn't aware of the - potentially - limitied entitlement of some users. I see helpdesk calls on the horizon.

So while I really, really, really praise IBM for the Profiles/Files entitlement being added to Notes 8.5.3 I also see room for improvement. The role based approach allows you to manage access and thus avoid problems in the event of an IBM compliance check but there are user experience issues. Hopefully IBM will address these in upcoming released.

Show 'n Tell Thursday: Maximizing tabs in DDE (20 October 2011)

It has been a looooooooooooooooong time since I did a SnTT but I found it fitting for this week. The tip is short and very straight forward but will make it easier and more productive for you to work in Domino Designer on Eclipse (DDE).

If you are like me like the navigator in DDE is on the left, and the outline/controls/data views are on the right. You realize that you do not have much space left for code in the center editor. Bummer! :-( To help remedy that you may either minimize or close the views on the right but that really isn't ideal as it takes time and some times you need the views e.g. for XPages work. As an alternative you could figure out which views you use for what tasks and create custom perspectives in DDE for those tasks which isn't for the Eclipse-superuser. You could also choose the easy solution - simply maximize the editor.

Maximizing the editor is easy. You simply double-click the tab or press Ctrl-M to make the editor go fullscreen. When done you simply double-click the tab again or press Ctrl-M to return it to being "in the middle". Easy and quick.

Hope it works as nicely for you as it does for me.

New IBM Connections Kick-Start offering

IntraVision is happy to offer a fixed price IBM Connections Kick-Start offering to get you started with IBM Connections per the entitlement offered by IBM as part of the Notes 8.5.3 maintenance release. At our Social Business event on Thursday 27 October (there's still time to register) we will be happy to discuss this offering as well as our new OnTime for IBM Connections product with you. More information about event may be found as part of our online newsletter (linked below).

IBM Connections Kick-Start and Social Business event with Stuart J. McRae (in Danish).

IBM Connections Extension license

(Of course) Stuart beat me to the punch but I wanted to blog it anyway.

Today IBM officially announced the IBM Connections Extensions Authorized User license as an easy (and inexpensive) way to buy the rest of the IBM Connections suite of features if a customer is making use of the entitlement for Connections Files and Connections Profiles granted as part of Lotus Notes 8.5.3. I too think this is a great move by IBM but asks the question how I'm going to control what parts of Connections users use if running in a mixed environment where some users are using Connections as entitled through Notes and some use it by virtue of their full license. In Sametime we have policy controls to help us but we do not have that in Connections nor have I heard any mention of it. I guess we will have to see how to approach this and whether it becomes an issue at customer sites.

Anyways still a very nice and clever move by IBM.

Power of the Javascript console

Dmytro Pastovenskyi blogged the other day about the power of the JavaScript console. Now the JavaScript console is a real timesaver for many types of JavaScript debugging but I never realized just how powerful it is. I recommend reading Dmytros blog post (JavaScript: use power of console) and googling "javascript console object".

Deploying XTAF dictionaries to Notes clients via a Widget Catalog

So Vladislav Tatarincev just blogger this as well but I wanted to highlight it as it pertains to plugins and widget deployment which is so dear to my heart. IBM has written up a very nice technote on how to deploy extra dictionaries for use with Sametime and Notes 8 and it's really worth a read. Especially if you write emails and chats in some languages other than English. And yes there are some of us who do... :-)

Now if just there was an easy ways to switch between the dictionaries at runtime and by easy I mean something that does not require the use of the preferences dialog. It really has to be easy as most - if not everyone - installing extra dictionaries write in multiple languages say Danish and English, German and English etc.

Deploying XTAF dictionaries to Notes clients via a Widget Catalog

Configure Eclipse 3.5 for Notes 8.5.3

For completeness sake I just updated my guide to manually configuring Eclipse 3.5 for Notes plugin development to work with Notes 8.5.3 which went Gold the other day. Please find a like to the guide below.

Configuring Eclipse 3.5 for Notes 8.5.3.

IBM Connections wsadmin cheat sheet

Starting with IBM Connections 3 the Websphere wsadmin command is even more important as the only way to deploy Connections is using Websphere Application Server Network Deployment or ND for short. The wsadmin command is used to check out the Connections configuration files and check them back in after modification. Because some commands require different configuration services to be loaded I have started compiling a cheat-sheet of some of the commands one use all the time. I have created a page for them. Expect the list to grow over time.

Of course the Info centers and wikis also list the commands.

Gul Skole (Yellow School) 27 October 2011

On 27 October we'll be hosting another Gul Skole (Yellow School) event where we are fortunate enough to have Stuart J. McRae from IBM come and do a guest lecture. If you're in Copenhagen I highly recommend you stop by. More info below.

Den Gule Skole: Building the Business Case for Social Business (in Danish).