Archives for the ‘Best Practices’ Category

10 Dec 2015
6

Notes Database Performance Tip: Disable Unread Marks

A Quick Summary of this Post

Unread Marks are enabled by default when creating a new Notes Database. In most cases, especially for applications used by multiple users, unread marks are not required and has a significant performance cost when the Notes database grows in size.

To disable Unread Marks:

  1. Right-click on your Notes database and select “Application -> Properties
  2. Click on the last tab
  3. Check the option “Don’t Maintain Unread Marks
  4. Compact the Notes database

A Detailed Overview

Through my years as a Notes developer, I’ve seem many cases where unread marks are enabled for Notes applications. One of the main reasons for this is that unread marks are by default enabled when creating a new Notes database. Many developers ignore this setting and continue developing an application for their client, where unread marks are most of the time not required.

Unfortunately, this comes at quite a cost to performance when the application grows in data, especially if the affected Notes database contains many Views.

In all my time as a Notes developer, I’ve never once required unread marks in the applications I developed. This became even more so the case when I moved to XPages development. I do understand that there are some cases where one would use it, but my recommendation is simple: If you don’t need it, disable it!

There are 3 settings to manage Unread Marks for a Notes database:

  1. Don’t maintain unread marks (Database Property – Last Tab)
  2. Do not mark modified documents as unread (Database Property – Tab 4)
  3.  Manage Unread Marks on a Notes View level (View Property – Tab 5)

It’s important to note that if you want to leave Unread Marks enabled for your Notes database and instead specify in your Notes View that there should be no unread marks, the View is still affected. See below abstract from the Domino Designer Help:

Note: Designing views that don’t display unread marks doesn’t improve database performance because they are still maintained but not displayed.

This means that to improve database performance, you have to implement one of the first 2 options mentioned above, at the very least option 2.

Closing

I can’t stress enough the impact unread marks can have on a Notes database. If you don’t need it…disable it. Depending on the size of your Notes database, the results are almost immediate.

Cheers for now
John
7 Dec 2015
1

John Jardin’s 2nd Session at IBMConnect 2016: Optimus XPages

IBM-Connect-2016

So, to my utter surprise, my second Abstract for IBM Connect 2016 was approved. It’s titled “Optimus XPages: An Explosion of Techniques and Best Practices“. For a reference to my first Abstract, click here. Just so everyone knows, IBM Connect takes place at “The Hilton” in Orlando, Florida. My session “Optimus XPages” is scheduled for Monday the 1st February 2016 at 3:30pm.

I am extremely excited to be presenting this session. Over the past year I have implemented a number of solutions running on XPages, and I got to experience first hand the improvement in performance and overall user experience when comparing these solutions to ones I developed in the past. I feel I have come up with some serious practices that anyone can easily apply to make their applications work and feel fast and responsive, whether running on a local network or in the cloud.

Below is a rundown of my session:

TITLE:

AD-1074 – Optimus XPages: An Explosion of Techniques and Best Practices

SESSION SUMMARY:

Starting a new XPages project but not sure it’s going to be done right the first time? Do you have an existing application that doesn’t seem to have that “X” Factor? In this session John will demonstrate how XPages developers can apply proven techniques and best practices to take their applications to a game changing level.

WHAT WILL ATTENDEES LEARN:

  1. Rapidly develop responsive applications
  2. Improve user experience and response times with background and multi threaded operations
  3. Keep your XPages lightweight with code injection
  4. Create scheduled tasks the XPages way
  5. and much more.

I hope to see you all there :)

Cheers for now :)
John
15 Sep 2015
0

Appcelerator Video Tip: Reduce EventListeners and increase performance

In this video I show you how to eliminate unnecessary Event Listeners in your Appcelerator Mobile App by making use of the Bubble Parent property. This is a great way to increase performance and responsiveness in your mobile app, especially when it requires some advanced processes.

The video below demonstrates the the Bubble Parent technique when using Text Fields inside Table View Rows for an iOS app. I’m sure you’ll immediately understand how you can apply it elsewhere in your mobile application, whether developing for iOS or Android.

As always just a thanks to David Leedy for hosting this video on NotesIn9. Always appreciated :)

Enjoy :)
John
19 May 2014
0

Quick Tip: Lessen your JavaScript code with 1 liner IF Statements

Not many people know this, but for simple JavaScript “If” Statements, there’s a Syntax that allows you to write out the entire condition on one line.

Let’s take a quick If Statement and type it out the most common way:

1
2
3
4
5
6
7
8
var whatAreMondays = "";
var areMondaysBlue = false;
 
if(areMondaysBlue){
   whatAreMondays = 'Blue';
}else{
   whatAreMondays = 'Awesome';
}

Behold…the 1 liner Syntax:

variable = (condition) ? 'value if TRUE' : 'value if FALSE';

By using a question mark and a colon, we can convert the above If Statement to the following:

1
2
3
4
var whatAreMondays = "";
var areMondaysBlue = false;
 
whatAreMondays = (areMondaysBlue) ? 'Blue' : 'Awesome';

Simple, but effective :)

15 Mar 2012
2

Use YSlow to measure your Site’s performance and more

Hi Everyone.  Here’s a quick post that I’m sure will make all the difference in your Web Dev Life.

There is a Browser plug-in called YSlow. You can install it on Firefox, Chrome, Safari, Opera and more. I’m going to use the Firefox plug-in for this example.

NOTE: For Firefox, you need to install Firebug to use this plug-in, as it’s an extension to Firebug.

Once you’ve installed the Firebug and YSlow plug-in, and restarted your Browser, do the following:

1. Open your Website. In my example I’m using my XPages Showcase for this example.

2. Push F12 on your keyboard. This will open the Firebug Window at the bottom of the Browser.

3. Click on the YSlow Tab. You’ll see an introduction Page, and a button at the bottom that says “Run Test”. This takes about 2-5 seconds to run.

 

 

4. Once completed, YSlow returns a set of results. You’ll get an overall Grade with a Performance score. (Please don’t judge me for getting a C. YSlow’s moaning at me for not optimizing CSS and JS files,  but there’s a reason for that…)

5. If you take a look at the 3rd Red Arrow on the Image, you’ll see it’s pointing to the Ruleset List. This is pretty awesome, because you can set the rules and benchmark for how your site should be measured. There is a YSlow Add-On called Web Metrics Framework, which is a ruleset that measures your Website according to Google’s Standards.

6. If you go into each of the sections that’s returned….e.g. Content…..you’ll get a second set of Tabs that Score you according to individual operations….See image below.

 

 

7. YSlow also comes with quite a bit of useful Hints, Tips and supporting documentation.

This add-on is easy to navigate, and very very useful. I hope it helps. Thanks Yahoo.

 

Cheers for now.

John