Archive for September, 2009

Receiving web content in a composite application

September continues to be composite application month here at dadams.co.uk, and to round off this exciting set of posts I’m going to show you how to easily grab content from a web page and publish it into a Notes form. It’s also possible, and just as easy, to publish into a Symphony spreadsheet, but we’ve done that one to death already.

First thing to do is create a blank composite application. Then go into Domino Designer and add a simple form containing three fields – Following, Followers and Tweets. Yes, we’re going to grab some information from Twitter (at this point IdoNotes, also known as Chris Miller, has become extremely interested).

Open the composite application for editing and drag a Managed Browser component into the empty page. We’ll come back and configure the component later. Then drag in a Notes Document Container, and configure it to open the Twitter details form you created earlier – this is done by editing the component properties, going to the Component Settings tab, and hitting the Browse button next to the Notes URL field. Select Form as the object kind, the current database, and then the name of your form. Click OK to complete the configuration.

Now let’s head back to the web browser component. We’re going to grab details from a Twitter account – you can use your own or anyone else’s, but for this example let’s start with Stephen Fry. Enter http://twitter.com/stephenfry into the address bar and retrieve the page.

On the toolbar above the web page you’ll see a small finger-pointing hand – the tooltip says ‘Toggle DOM element inspection’. Click this on to reveal the elements declared in the document object model, and you’ll then find that moving your mouse around the web page places a blue box around the available elements. Select the number of people that Stephen Fry is following, and the element (id:following_count) will appear in the toolbar. Ensure the action is set to Publish and in the next box declare a new landmark – call it something like sourceFollowing – and click on the cog icon. Repeat this for the number of followers and the number of tweets.

Publishing Twitter info

The next part is important – go into the browser component properties and select the Landmarks tab. You’ll see the landmark is set to http://twitter.com/stephenfry – change this to http://twitter.com/* – this will ensure that the data transfer works on everyone’s Twitter page, not just Mr Fry’s. Click OK.

Now head over to the Notes Document Container which contains your form. Click in the first field (named ‘Following’ in my example) and use the toolbar to set the landmarks. Ensure the action is set to Recieve, enter a new landmark name (something like targetFollowing) and click the cog icon. Repeat for the other two fields. You can inspect the generated landmarks by looking at the component properties, but it’s not necessary.

Receiving Twitter information

Now you just need to wire the two components together – this can be done by clicking the yellow plug icon of the browser component and using the dialog box to set the wires, but it’s easier to go into the wiring view and drag from browser component to the Notes Document Container component.

Integrating Twitter with a Notes formAs in the previous examples, you can now tidy up, name the components, set the application icon and set the dimensions of the two components. To see this simple and quite frankly rather pointless application (but hey, it’s a proof of the technology) working, simply change the Twitter URL and watch the figures change. Yes, that’s all it does, but I’m sure you can take the basic principle and come up with better uses. Click on the image to see a full-size example.

Post to Twitter Post to Facebook

Lotus Connections 2.5 press coverage

IBM Lotus ConnectionsIn a week where Lotus general manager Bob Picciano hit out at Microsoft for spreading “ridiculous and fabricated” information (go Bob), here in the UK we’ve seen some press coverage of Lotus Connections 2.5 in Computer Business Review and Computerworld UK.

No surprise to see Jeff Schick quoted, as he heads up the social collaboration business unit. But in Computerworld UK there’s Mr Picciano again…

We have been using it internally at IBM … especially at the end of the business quarter it is amazing how much value it is to me personally. I keep my finger on the pulse of the IBM organisation; who is meeting with who and how those meetings go. It is like having a stream of conscience throughout the organisation.

This is no hollow testimony of Connections’ capabilities. I’m in Mr Picciano’s Connections network, and I can promise you that he is an avid user of this technology. Here’s a senior IBM executive, quite a few rungs of the ladder above me, yet he’s sharing his activities and thoughts with his network throughout the day, and interacting with team members who comment and ask questions. Yes, Bob does understand and make use of the technology, and advocates it strongly. He goes on to say…

There is not an answer from Microsoft for these capabilities.

Bearing in mind that we gave Microsoft a pasting at last year’s Enterprise 2.0 event, they’ve shipped nothing since and now we’ve shipped Connections too, I think Mr Picciano is spot on.

Post to Twitter Post to Facebook

Joint IBM Lotus / Canonical event in London

UbuntuCheck your diaries folks – on 16th October 2009 IBM Lotus and Canonical (the providers of the popular Ubuntu Linux platform) will join forces to deliver an event designed to help businesses understand and realise the benefits of open source collaborative solutions.

Adam Jollans, IBM’s Linux and Open Source Strategy Manager, will kick off with a session about open source solutions revolutionising the IT market. Then we have someone called Darren Adams (who is apparently very good) talking about Web 2.0 collaboration and the desktop of the future (today), followed by more information about Ubuntu and freeing yourself from the Microsoft Windows and Office lock-ins. After a free lunch, there’s a hands-on technology workshop which will allow delegates to experience the IBM Lotus collaboration suite running in a Ubuntu Linux environment.

With organisations continuing to look for ways to drive down costs, Ubuntu and solutions such as IBM Lotus Symphony offer the potential for cost savings – just ask the French Police. So why not invest a day to see how your business could benefit?

The event will take place at IBM South Bank. A page for registration will be available soon. In the meantime mark it in your diaries and check back here for a link in a couple of days.

Update: the link for registration is now available.

Post to Twitter Post to Facebook

More composite application and Symphony goodness

In an attempt to completely alienate everyone who just comes to dadams.co.uk for humour and pedantry, here is the third part of our look at Notes 8.x composite applications. Our previous look at integrating Symphony spreadsheets with a composite application was a simple example publishing individual field values. Today we’ll get a little more complex. Just a bit. Please note that this example is hopelessly ripped off from this article from the Composite Application wiki – I make no apology for that as I’ve learnt some things by following that example and building my own.

This example features an employee database with the following details can found in the form and view:

  • Employee name
  • Country (set to a choice of England, Scotland, Denmark, Finland, Norway and Sweden)
  • Department (Sales, Marketing, Finance and Technical)
  • Age
  • Salary (recorded in $s to keep it uniform across the countries)

As in the last example I created a blank composite application and then added one form and one view, so basic stuff to this point. I then added a variety of records to bring into the results in the Symphony spreadsheet (which I also needed to create and make available in the file system). The spreadsheet itself can be modified as you build the composite application, there’s no need to do everything up-front. I created individual sheets to hold a table of Notes records, analysis of salaries and ages (maximums, minimums, averages and the size of the record sample), and counts of how many employees in each country and department – and then set up charts to show the results graphically.

As before, open the application in the composite application editor and drag in a Notes View Container – edit the component properties to select the view and set it to Java rendering. Then drag in a Symphony Spreadsheet Container and set the initial file to be the spreadsheet created earlier. Now, as in the previous example, we need to set the Selection Output from the Notes view – the difference this time is that we’ll be using some functions as well as straight field values. For example, we’ll be counting the employees from each country and department, and finding the minimum, maximum and average ages and salaries… like so:

Selection output example 2

Next we will decide where the outputs will sit in the Symphony spreadsheet. This is no different to the previous example – using the toolbar at the top of the Spreadsheet Container to assign the landmarks – apart from one clever trick. In this example we’ll be able to select multiple Notes records and see them reflect in Symphony. This is what creates the sample to find minimums, maximums and averages, and counts from the sample. These landmarks are created in the same way as before, the results landing in one cell each. But the data table needs to repeat, a spreadsheet row for each Notes record. To make this happen, for each Notes field you need to select a range… the values will then list downwards. Repeat for each of the available fields.

Spreadsheet container example 2

After setting up the Spreadsheet Container you just need to wire the two components together, as in the previous examples. This can be done via the dialog boxes, although with the greater number of wires required in this example it may be quicker to use the drag and drop functionality of the wiring view.

Wiring view

With the wiring done your application is finished, bar the finishing touches of page titles, icons and final layout of the spreadsheet. In previous posts I omitted details of how to set an application icon. This is easy to do, simply add a 16×16 .PNG image as a resource using Domino Designer. You can then edit the properties of the composite application and select the image. Bear in mind that if your composite application has multiple pages you can set an icon for each page.

Employee recordsHere endeth the lesson. As always, here’s a finished application (note the customised icon breaking the 16 colour limit of a standard Notes application icon) – just click on the image to reveal the big picture.

Post to Twitter Post to Facebook

Lotus Notes and Symphony composite application

My previous post on composite applications turned out to be a bit of a mix-up because composite application guru Bob Balfe spotted that although I was using the new view container, I was still defining the wiring properties the old way. The good news is that now I’ve found out how to do ‘the new way’ it’s even easier.

So, today’s lesson in composite applications involves taking Notes data and pulling it into a Symphony spreadsheet, all within the neatly-packaged environment of a Notes 8.5.1 composite application. Hang on, I hear you say, I’m an Excel user… that’s okay, the spreadsheet can be an Excel file. Right, propeller hats on? Then we shall begin.

Like our last lesson, you’ll need to start with a standard Notes database with a view and a form. For my demo application I picked a scenario that would fit nicely into a spreadsheet, but would also let Symphony do a few extra calculations and display a chart. So mine contains the name of a sales rep, month and year, and targets and actual sales figures for cogs, widgets and bolts. The details aren’t too important but you should make sure that all of the fields you want to use are added to the view. Bear in mind also that you can do the whole thing in one NSF created as a composite application, or you can start with a standard Notes database, then create a new blank composite application and pull the design elements in. I did it all as one application. You’ll also need to create a spreadsheet – design it so there’s places for the data to sit and set up the chart in advance.

Sales view

Assuming you now have a composite application and the form and view ready (don’t forget to add some data), edit the composite application and pull a Notes View Container from the Component Library palette onto the blank application. Edit the properties of this component – under Component Settings select the view from your Notes database and set the rendering technology to ‘Java’. Press OK and let the view appear.

Open up the Component Properties again and go to the Selection Output tab to declare the data that you want to pull from the view into the spreadsheet. Add a new property, name it (e.g. Month for the first one), select ‘Formula’ as the type, and then in the Formula column select the Notes view column to grab the data from. Add another property, and repeat until you’ve included all of the Notes view columns. At this point you can go to the Advanced tab and check that all of these new assignments are set to be wireable – by default they should be. Click OK.

Selection output

Now you can add a Symphony Spreadsheet Container – drag it into the application workspace, place it wherever it will fit best and open the Component Properties. Set the name of the spreadsheet file (including the path) and click OK. Now comes the clever bit… we’re going to specify where the data from the view is going to land on the spreadsheet, and this involves the bar along the top of the Spreadsheet Container. For each data element specify a name and then the cell where the data will land, and then click the cog-shaped button. It will look like this…

Spreadsheet container

Repeat for all of the values. After doing this, look at the Component Properties and go to the Landmarks tab – you’ll see all of your new landmarks created and listed. All that needs to be done now is to wire the two containers together. Click on the yellow plug icon at the top of the Notes View Container. Select your first available property (say SalesRep) – the target component will already say Symphony Spreadsheet Container – set the action to ‘Set SalesRep’ and click Add Wire. Repeat for all of the properties, then click OK.

Sales figuresThat’s it… you can now tidy up with page names and making sure your spreadsheet looks okay. In true Blue Peter tradition (us Brits will understand that), here’s one I created earlier with not a scrap of sticky-back plastic in sight… click on the image.

Post to Twitter Post to Facebook

Creating a simple Notes 8.5 composite application

Crikey, this is a bit technical, isn’t it? Well no, actually it’s not, but I’m not going to pretend that I know this stuff to anywhere near the depth of fellow Lotus guys Steve Castledine or Bob Balfe. If you want deep technical stuff on Notes composite applications, I suggest you visit their blogs or hunt down their articles on DeveloperWorks. This is really just to show how to take a simple standard Notes application and give it a bit of the composite treatment. Please note that I’m using Notes 8.5.1 so you’ll have to wait a month or so to get the full effect (although the functionality now be achieved now with 8.5).

Step #1 is to create a Notes 8 widget that associates a post code (or zip code) with Google Maps. If you don’t know how to do that, forget the rest of this and go and read Dilbert.

Wiring propertiesStep #2 is to create a simple Notes database to supply the data. I’ve used a mix of customer and product details – in my sample application some schools are the customers and they’ve bought telescopes. The two important things are the post code (or zip code) in the customer details and the product they bought expressed as a product code. All you really need is two forms, two views (customers and products) and some data.

Step #3 – create a blank composite application in Notes. We’ll come back to it later.

Step #4 – open your Notes database (the one with the forms and views) in Domino Designer and create a new set of wiring properties. You’ll then need to add two new properties which match the field names in the customer form for post code and product code – it’s best to give the same name to ‘Name’ and ‘Title’ and ensure the option for ‘Automatically generate an action for this property’ is selected.

Step #5 – go to the design of the view which will list the customers. This view should include the post code and the product code. For each of these columns pull up the properties box, go to the last tab (the propeller hat) and look to the bottom. Under ‘Composite Settings’ the property value should be set to the property you just created for the wiring in step #4. Save the view and close it.

Step #6 – open the blank composite application and select Actions, Edit Application. The application opens in the composite application editor. Notes 8.5.1 provides some new containers – from the Component Library palette look for Containers, grab a Notes View Container and drag it into the big empty space.

Step #7 – you need to configure this container to display the customer view from your Notes database. On the left you’ll see your new Notes View Container in the application hierarchy (there isn’t anything else on the page at the moment). Right click and edit the component properties. Go to Component Settings – you can change the name and description, and then hit the Browse button to find your Notes customer view. Select ‘view’ as the kind of object, choose the source application, and then select the view. After pressing OK, select ‘Java’ for the rendering. Click okay, and you should see your view.

Step #8 – repeat step #7 but this time pull in the product view. It doesn’t matter where you place the second view, and you can move it later.

Step #9 – change the palette to ‘My Palette’ and drag the Google Maps widget onto the page. Again, positioning isn’t critical but bear in mind that this frame will demand a bit of space.

Step #10 – now you’re ready for wiring. Click on the wiring icon (the yellow plug) at the top of the customer view. The available properties will list ‘postcode’ or whatever you named that property in the wiring properties in step #4 – select that. Then select Google Maps as the target component and leave the available action as the one which it suggests (which by default is ‘q’ – that’s what the Google Maps search uses as it’s parameter). Click Add Wire and then OK.

Create new wire

Even now in the previewing within the composite application editor you will see that clicking on different records in the customer view plots the location on the Google Map.

Step #11 – now to wire the customer view to the product view. Again click on the wiring icon at the top of the customer view. Select the other property that you created in step #4, the one for the product code. Select the product view container as the target, and select ‘Search in View’ as the target action. Add the wire and click OK. Now you’ll see that selecting a record in the customer view causes one product record to appear in the other view. Size the preview pane to get a full preview of the product information.

Top of composite applicationStep #12 – close the composite application editor and save your work. Effectively you’re done but you can add action buttons to the views and tweak the forms to polish up the application.

You can also go back into the composite application editor to define an application icon and make sure everything is named correctly for display. Click on the image here to see a screenshot of the finished application… well, until I find some other things I can add to it.

Addendum – I spoke with the aforementioned Mr Balfe and he said that I probably had some unnecessary steps in this process because the new view container takes away the requirement to define the wiring properties in Domino Designer. So it shouldn’t be necessary to go through steps 4 and 5, and there’s something else that can be done in the configuration of the view container. As soon as I work out the right way, I’ll post an update.

Post to Twitter Post to Facebook

Unfair

The wife says I’m not always impartial on these matters, but sometimes I really do believe the collective world of football (note, the game played by kicking the ball with the feet, not throwing it with the hands while dressed in layers of body armour) have it in for Arsenal. Take Saturday’s game against the South East’s favourite team, Manchester United – ManUre committed 21 fouls but had just 3 players booked. Arsenal committed 15 fouls but had 6 players booked. ManUre were awarded a penalty, while Arsenal’s penalty claim (just as clear-cut) was waved away. And the perpetrator of the foul got away with that one and two other bookable offences, so should have been off the field.

Yes, Arsenal did concede a penalty and an own goal, and therefore lost fair and square, but many were in agreement that Arsenal were the better side. An injury-time goal was disallowed for offside, and yes it was the correct decision… but don’t you wonder what would have happened if the situation was reversed, if ManUre were 2-1 down and scored a dodgy last-minute goal at home?

Now consider the fate of Eduardo. In February 2008 he suffered a broken leg during a match against Birmingham, an injury so horrific that a surgeon’s first reaction was that amputation was a possibility. Of course that didn’t happen and he was playing again within 14 months. Last week Eduardo ‘dived’ during a game against Celtic, winning a penalty in the process. Whether he did dive intentionally to win a penalty, or whether he was making an evasive move to get his legs well out of the goalie’s way, only he will know. The question is, why would UEFA choose this incident to start a witch-hunt against the art of diving? I’ve seen far more blatant examples of diving and play-acting that have received nothing more than a booking. If UEFA have condemned Eduardo to a 2-match ban, are they going to go back over all of the other alleged diving incidents over the past few years? If so, a certain Mr C Ronaldo had better get his defence case ready… perhaps the ManUre fans, when they shouted “cheat” at Eduardo, had forgotten that that the greasy winger often went down like a sniper victim if someone coughed within 3 yards of him.

Post to Twitter Post to Facebook