Categories
Java Other Tech

Notes In 9 : 189 Introduction to SonarQube with a side of Docker

In this show Eric McCormick returns to show us how to use SonarQube and Docker to help us improve our code.

Categories
Learning XPages XPages

NotesIn9 188: Adding a “Please Wait” to XPages

In this show I demonstrate a couple of techniques for improving your UI when you have a longer running code process. I show how to add a “Standby” custom control to your application for Partial Refreshes and another technique for when you’re opening a page that needs a few extra moments to process your data.

Big thanks to Fredrik Norling and Vikas Tiwari for their original contributions on this subject.

Categories
Uncategorized

Updated Pages Url Cheatsheet

So I’m working on an update to xpagescheatsheet.com and the first thing I’m going to do is fix my XPages URL Cheatsheet. It’s UGLY. As in really ugly. So I started with that and made a new one.

http://xpagescheatsheet.com/cheatsheet2.nsf/url.xsp

This is for SSJS and I will also be making one for Java code.

Please check it out and let me know if anything can be added or if there are any problems. And if you have any Java snippets or code let me know that as well since I’ve not made the Java page yet. 🙂

Hope this helps.

Categories
Bluemix Well Crap

BlueMix and Spam

Bluemix

Blue Mix and Ham

I am Dave
Dave I am.


I did not sign up for Bluemix today

I did not sign up yesterday.

I did not sign up thirty days ago

I did not sign up with an Eskimo


I did not sign up from a plane

I did not sign up from a train.

I did not sign up for a trial

Most days I don’t even drive a mile.


I did not sign up in the snow

If you’d ask me I’d tell you no.


I did not sign up on a bet

I simply did not sign up yet.


I did not yet build an app

I would rather take a nap.


Someday I might

When the time is right

People tell me it’s actually rather sweet

They tell me in chat, and even via tweet

It actually looks really neat


They’re smarter then me,

So they plainly see,

There’s power in Watson

Which might lead to adoption


I’m sure I’ll give it a try

I mean it, I can’t tell a lie

XPages in the cloud,

Would make me so proud


One day I’ll try Bluemix

Until then, please stop being ___


Well crap, I guess nothing rhymes with Bluemix… This will forever be unfinished now…  Sigh….

====

Way back in November I blogged about getting some similar emails from Bluemix. I didn’t like it then and I don’t like it now. I don’t like the wording, as again, I’ve not signed up, validated an email address or placed any apps or data on Bluemix.  I really wish IBM would cut this out.  People don’t need to be tricked into using Bluemix. It’s a turn off.  Just make Bluemix as great as you can and people will come. I’ve heard a lot of good about Bluemix from the recent IBM Connect conference.  And with new updates into Domino Designer I’m probably getting closer to actually giving it a try which is why getting this in my inbox is extra annoying. If I sign up today I feel like I’m giving into a phishing scheme.  And can I even sign in?  It says my trial period has ended?  I bet there’s a good chance that’ll be a pain to sort out.

Sigh.

update: Changed the title on suggestion from a friend to “Bluemix and Spam”. That sounds better.

Categories
XPages

Alert! Danger! Chrome has a Dojo Bug that affects XPages

Declan Lynch found this bad news today.

ATTENTION

There is a known bug in Google Chrome 48 that is affecting DOJO resource loading which in turn is causing XPages application to stop working.

https://code.google.com/p/chromium/issues/detail?id=570622

End users may see the page freeze and interaction with things like pagers stop working. From a development point of view having the DevTools running and the Disable Cache option enabled means you may not see this issue during development.

 

 

PLEASE go to that issue and sign in with a Google account and star it.  Hopefully the more stars the higher priority it’ll get.  Comments might also be helpful.

 

Categories
Learning XPages XPages

Viewer Question about scoped variables in XPages

So I got this in my inbox :

Dave,

Do you happen to know of a good article or video that talks about scope variables (i.e. applicationScope and sessionScope ) and passing values between different web pages?  Passing information like unid, user name and contact information (i.e. phone and address).

So loading the variables and writing the information to fields on different pages.

Thanks,

I don’t have an article to point to so I figure I’ll just give it my best shot and make one up.

First let’s remember that applicationScope is for the whole app.  Anything you put in there is available to all users. So you would not want to put in anything you listed in your email. The unid, user name, etc…  are all user specific.

Now, sessionScope is an interesting case, and just so we’re clear, sessionScope is often thought to be the USERS session BUT IT’S NOT. It’s really the BROWSERS session. For example, if you are using sessionScope for things and the user logs out and then a different user logs in from the same browser – assuming it’s not been closed…  it’s possible the second user might get some left over values from the first user. So you have to be careful and sometimes you need to manually clear sessionScope.

Often people new to XPages might use sessionScope to hold things like a unid, or maybe other things about the users navigation status like last page or whatever. These are NOT good things to put into sessionScope because if the user opens your web app in another tab and starts doing 2 things at once then putting data like unids and stuff in sessionScope will be a problem.  The users second tab will interfere with the first tab.

What sessionScope IS good for is things like a shopping cart or the user and contact information.  Something that’s for the user and needs to span multiple pages.  Things like UNID’s or keys, I always try to put in the URL itself.  This solves the problem of 2 browser tabs bumping into each other and also makes the pages easier to bookmark for later use if need be.

Personally I used to use sessionScope for EVERYTHING when I started out.  Now I use it much less.  I do much more with viewScope.  Conceptually what I do is in the beforePageLoad event, I’ll grab any parameters I need from the URL and anything I need from session or applicationScopes and then use that to continue loading my page.  In the example of a “company document”.  If I have a main page I’ll pass the unid or key (I use keys more then unids) in via the URL and grab that and load the data that I want.  Now if there’s a link to another page related to the same company I’ll just keep that unid/key in the url and simply reload the company from disc on the next page.  So it’s kind of a bummer to reload the company data for each page, but doing so makes things a lot easier.  If you have a big app there are caching solutions to aid this and we use some in the day job, but I’ve never really found it to be a problem.

So with the information you’ve given me, I’d suggest you keep your unid/key in the url.  UserName should be global really so I’m not sure if you really need to store that anywhere, but yes I’d store the contact information in scope.  If you know Java that could be a small managed bean or other object that lives in a pageController.  If you’re using SSJS you could make several variables – ssAddress1, ssCity, ssState, etc…  and put those in sessionScope.

But I’d probably sooner make a little map and put the map into sessionScope rather then having a ton of variables I need to track… I’ve done this on NotesIn9 several times I think…  something like

var myMap = new java.util.HashMap();
myMap.put(“address1”, ..myValue..);
myMap.put(“city”, ..myCityValue..);
sessionScope.put(“userAddress”, myMap);

then to use the map it should look something like this :

document.replaceItemValue(“address1”, sessionScope.userAddress.address1);

(Note I’m not typing in an editor and testing…  but that should work or be REALLY close.)

Creating and putting your own map into scope will at least let you group the data together.

 

Hopefully that helps a little bit.  If not just let me know.

Good Luck!

Dave

 

Categories
Community

What’s your Christmas Movie Play List?

At this time of year we look forward to watching our “standard” selection of Christmas movies.  Here’s our top holiday movies.

#1 has to be Christmas Vacation.  Good fun for all the family.  We’ll usually start the season with this movie and watch it again on or near Christmas Eve.  Just a great movie. Much better then the original Vacation movie.

#2 is probably the best Christmas movie ever in my opinion.  Unfortunately it’s Adults only, but Love Actually is just a wonderful movie. It’s my wife’s favorite movie of all time.  If it didn’t have the adult only parts it would be #1 on the list.

#3 is pure family movie.  It’s pretty rare so you might not know it.  “A Muppet Family Christmas“. This is just a wonderful family movie. If you like the muppets you need to see this.  Sadly this year I somehow misplaced it..  I can’t find my ripped version or the DVD version which I originally got from a cereal box of all places.  But It looks like it’s on YouTube so I highly recommend checking it out.

#4 is Scrooged.  Bill Murray at his best.

#5 of course is Charlie Brown Christmas.

Those are our top 5.  What’s yours?

 

 

Categories
Other Tech

NotesIn9 187: Highlights from MWLug – Nginx and PageSpeed

In this show, IBM Champion, Eric McCormick, returns with a great show taken from his presentation at the MWLug conference. He’ll be talking about Nginx and PageSpeed and how and why you should care about them.

Categories
Community

It’s back! Come and play the Tree on a Truck Game!!

It’s the time of year again. Every year my family plays a simple game to get into the holiday spirit.  It’s competitive and borderline cut-throat at times but at the core it’s simple.  We count the number of Christmas Trees that we see on cars and trucks.  By count I mean the first one who sees it and calls it gets a point.  And by calls it I mean the first person who shouts “TREE!” get’s that tree as a point.  It’s actually loads of fun while still stressful haha.

So if you’re interested in playing along sign up and give it a go!

TreeOnATruck.com

P.S. The app is pretty basic and a work in progress – but that’s for a future blog post!

Categories
Community

Community Shoutout – Timothy Briley

 

Just a big Happy Birthday to Tim who, unfortunately is a long way from home this week.

Safe travels home buddy!