Dave Leedy: Drink to 99 at IBMConnect

As many of you are aware – I feel like I owe a personal debt to Dave Leedy because of how he helped support me when I was getting into the community in the last year. Honestly he is fed up of hearing me talk about him (as you are too).

That said this post and subsequent request for help is not about what Dave has done for me – it is what Dave has done for you, and you, and you and the other thousands of YOU!

Notes in 9


XPages cheatsheet

Notes in 9 is over 2 years old and has over 28 hours of XPages related wonderment – if you are reading this blog and have never watched a NotesIn9 video I will be shocked. It is synonymous with the XPages community and is supported by many many contributors.

Not only does Dave invest time and effort into Notes in 9 he also pays for the hosting cost out of his own pocket – that’s right he is paying so that you to become a better developer – the least you can do is to say thank you.

So it is time to say thank you – in the best way we know – BEER

Dave Leedy should not have to buy himself a single beer at IBM Connect this year. Dave needs to get 99 beers to be bought for him to say thank you for the 99 NotesIn9 he has created/masterminded.

I would like to see #DrinkTo99 count=x on twitter so that we can track his progress throughout the week.

As I said on the Dave Leedy Taking Notes Podcast….if you see this man buy him a beer because he has helped you !

Buy this man a beer
Buy this man a beer

Oh and happy birthday mate 😉

Thank you Carl Tyler, Ed Brill and the lotus community.

So it is mid January 2012, somewhere in Orlando, deep in the Dolphin hotel – Gurupalooza is ON. It was my first ever Lotusphere (and last ironically in name at least) and I have to say I was pretty bored of the whole conference by Thursday morning. I was extremely naive about everything which was going on at the conference over the last 4 days. I had attended many sessions but had not learned a whole lot, I had been in bed by 11pm most nights and honestly it was just not what I had been looking forward to for 14 years!!

So I stood up and asked a question of the Gurus – “Why should I come back to Lotusphere next year? I thought this was a developers conference and I didn’t learn anything I couldn’t have learned by reading OpenNTF. Tell me why I should come back next year!” (That’s me middle on the right)

There were some awkward pauses and some comments about how come I didn’t meet new people and experience the conference – and quite frankly I didn’t “get it” – but also hadn’t put in the effort.

Carl Tyler was really the only person with anything positive to say – he was sat right on the left hand end of the stage nearest me and he said “you’ll be here next year because you will be presenting”. Sarcastic or not (I don’t think it was) that was one of two things which stuck out in the conference for me.

The other thing which stood out was my first experience with Social Media. The work colleagues I was with encouraged me to get on Twitter so that we could communicate with each other and see how sessions were going during the day. Earlier on that final day (I think) I happened to be in the session run by Ed Brill with other IBM product managers on the stage – Ed asked for questions from the room and questions from twitter – so I wrote a question on twitter asking if the new web based plugin to run notes client apps spelled the end of the notes client….and amazingly ed picked it out and read it to the room and then he followed me on twitter….my third follower and 1st real one after my work colleagues.

AAAARGH HOLY CRAP ED BRILL IS FOLLOWING ME ON TWITTER !!!! – which lasted for at least 5 minutes until I realized Ed Brill follows thousands of people on twitter. I had pretty much the same reaction about 10 minutes later when Bruce Elgort started to follow me on twitter – HOLY CRAP HOLY CRAP – Bruce…….Elgort…!!! *faints*

So I came away from the conference with a puzzled determination – I really hadn’t enjoyed the conference – but somehow that last morning had unleashed a fire in my belly – I wrote this article as my first blog entry (oh yeah it made me start blogging a few days later)

https://xomino.com/2012/01/22/lotusphere-2012-inspiring-and-not-in-a-way-i-had-expected/

And it started – I made a conscientious decision that I was in control of my destiny and I was going to take it back. As much as I hate to admit it – I like writing, it is cathartic and I love sharing, love teaching – I would be a teacher if it paid half decently. I set myself two goals for the year – to better learn XPages and to speak at Lotusphere next year.

Since this time last year I have:

  • Learned XPages (well a decent chunk of it anyway)
  • Changed jobs to now work for one of the most well known XPage consultancies in N.America
  • Written over 60 XPage related blog articles (this post will probably push me over 50,000 hits in 11 months)
  • Presented a session at MWLUG in Pittsburg
  • Done two Notes in 9 videos (and been mentioned on two others)
  • Been on the Taking Notes Podcast (with Bruce and Julian…OMG OMG OMG)  – twice !
    and most importantly
  • >>> I am presenting two sessions at IBMConnect 2013 <<<

So first of all I have to say thank you to Carl Tyler for challenging me to stop whining, get off my ass and do something about my career (paraphrasing of course).

I then have to say thank you to Ed Brill (who I am yet to meet) for following me and making me realize the possibility of  social media.

I also have to say thank you to a multitude of people who have accepted me into the community with open arms and have been nothing but supportive, encouraging and have become really good friends – to name but a few:  Paul, Russ, Dave, Bruce, Declan, Mike, Jesse, Mark , Mark, Mark, Thimo, John, John, Paul, Paul, Roy, Thomas, Tim, Nathan, Jeff, Colin, Andrew, Imran, Wil, Steve, Brad, Per, Niklas, Ryan, Martin, Graham, Toby, Devin, Frank, Kathy, Troy, Serdar and everyone else I have not listed and clearly offended by forgetting.

 

Thank you – every single one of you. I am presenting at IBM Connect next month – WOW !

 

jQuery in XPages #17 – nanoScroller (game changing – mini scrollbar)

In this article I will describe how to implement and use the nanoScroller jQuery plugin to create discrete, feature full scroll bars within your XPages applications.

Demonstration

The XPages integration of nanoScroller.js is demonstrated here

As the short video demonstrates below – with 5 lines of code you can turn an ugly scrollbar in the middle of the page to a modern looking scrolling capability which is certain to impress clients.

Music: In Flames – Where The Dead Ships Dwell (The Qemists Remix)

Download

The demonstration database can be downloaded from the link above or from here

nanoScroller.js

Introduction

“nanoScroller.js is a jQuery plugin that offers a simplistic way of implementing Mac OS X Lion-styled scrollbars for your website. It uses minimal HTML markup being .nano > .content. The other scrollbar div elements .pane > .slider are added during run time to prevent clutter in templating. The latest version utilizes native scrolling and works with the iPad, iPhone, and some Android Tablets.”

As you can see from the picture below – the nanoScroller allows for a discrete, easy to style/configure scrollbar to be added to a panel within your XPages.

For my personal development, finding this is a game changer – seriously that important – having a normal scrollbar in the middle of the screen is always undesirable and confusing to a user – this is AWESOME !

nanoScroller applied to an XPages viewPanel
nanoScroller applied to an XPages viewPanel

How Does it work?

We add the jQuery library and the nanoScroller.js library file(s) to the database by adding them to the Web-Contents folder accessible via the package explorer.  (Window–>Show Eclipse Views–>Package Explorer) and drag and drop the two libraries from your computer into the “js” folder.

We add the libraries to our XPages like this in the source panel

	<link rel="stylesheet" href="css/nanoscroller/nanoscroller.css"></link>
	<link rel="stylesheet" href="css/nanoscroller/main.css"></link>
	<link rel="stylesheet" href="css/nanoscroller/style.css"></link>

	<script src="js/nanoScroller/jquery.nanoscroller.min.js"></script>
	<script src="js/nanoScroller/jquery.js"></script>
	<script src="js/nanoScroller/overthrow.min.js"></script>

I have to admit that I had some issues implementing the examples myself – so I copied and pasted the example from the nanoScroller demonstration page and then started hacking out the pieces I didn’t need down to the basic shell.

<div id="main">
    <div class="nano">
      <div class="overthrow content description">
            YOUR CODE HERE
      </div>
    </div>
</div>

I then inserted my ViewPanel right int he middle there – nothing more complicated that that.

The basic nanoScroller capability is then created using the following code on the XPages source panel

	$(function(){
	  $('.nano').nanoScroller({
	    preventPageScrolling: true
	  });
	});

Note: for those of you wondering what $(function(){ is…it is just an anonymous JavaScript function same as this….

	  $('.nano').nanoScroller({
	    preventPageScrolling: true
	  });

Except that because it is wrapped in a function it makes it anonymous – frankly IMHO unless you are writing your whole application in JavaScript then who cares – but some very influential people in the JavaScript world do 🙂 Check this video out for a great explanation of why you should use these in Javascript development Paul Irish’s 10 things I learned from the jQuery source

Extra Cool functionality

As you can glean from the documentation nanoScroller has multiple events/properties which you have access to which make this even more of a slam dunk when it comes to replacing the way you have used scrollbars before. Here are two examples:

scrollend

  $(".nano").bind("scrollend", function(e){
    alert('You have reached the end');
    $("[id$='button1']").css('display', 'block')
  });

A simple Use Case for Binding the scrollend event would be when you have some Terms of Service and you wanted to make sure that the user had scrolled to the end of the agreement before they click the “I Accept” option. In the example I just use an alert and used it to make visible the accept button.

iOSNativeScrolling

Enabling this option allows for the iOS5+ native scrollbar on your iPad (for example) to be displayed.

And there are many more – check out the documentation and excellent examples!!

Conclusion

As I said before and hopefully my enthusiasm shows in this article – this really is a game changer for me – sure the example styles need to be played with to fit your OneUI style sheet but that is not hard. The overall effect is so much more pleasing on the eye, takes up less space on the page and significantly improves the overall user experience.

There aren’t any plugins which I use in *every* project – but this may well become the first !