The Primo GUI – Critique and
improvement suggestions

1. The University Library Bolzano

The University Library Bolzano

… Bolzano?

The University Library Bolzano

Multilingual region/university

The University Library Bolzano

Some numbers from 2013

The University Library Bolzano

Our Setup

Alma

Primo

2. Our experience with the Primo GUI redesign

Our experience with the Primo GUI redesign

We started the standard way …

Our experience with the Primo GUI redesign

… but after some time …

⇒ We wanted a lighter and more maintainable solution.

Our experience with the Primo GUI redesign

User expectations regarding page load times

Studies* in the context of e-commerce found that:

* Sources: Akamai (2006) Retail Web Site Performance - Consumer Reaction to a Poor Online Shopping Experience and Akamai (2009) Press Release - Akamai Reveals 2 Seconds as the New Threshold of Acceptability for eCommerce Web Page Response Times

Our experience with the Primo GUI redesign

Weight of assets of Primo default GUI – initial page load

Primo home page (top) and Primo search results page (bottom)

Subsequent requests are much lighter ⇒ JS/CSS assets are cached

Our experience with the Primo GUI redesign

Download times of all Primo GUI assets with different connection speeds

Weight 512 kbit/s 1 Mbit/s 2 Mbit/s 4 Mbit/s
Conversion: 1 Mbit = 125 KB
Primo default home page 854 KB 13 sec. 6 sec. 3 sec. 1 sec.
Primo default search result page 841 KB 13 sec. 6 sec. 3 sec. 1 sec.
Our experience with the Primo GUI redesign

Distribution of connection speeds – cable and WIFI

< 4 Mbit/s > 4 Mbit/s > 15 Mbit/s
Source: Akamai - State of the Internet Report, Q1 2014.
Netherlands 12 % 88 % 22 %
United Kingdom 20 % 80 % 17 %
Germany 24 % 76 % 8 %
France 32 % 68 % 4.2 %
Italy 58 % 42 % 1.6 %
Our experience with the Primo GUI redesign

Distribution of connection speeds – mobile

< 4 Mbit/s > 4 Mbit/s
Source: Akamai - State of the Internet Report, Q1 2014.
France 34 % 66 %
United Kingdom 47 % 53 %
Italy 53 % 47 %
Germany 89 % 11 %
Netherlands 83 % 17 %
Our experience with the Primo GUI redesign

Connection speeds – bottom line

⇒ Primo GUI assets need to be optimized for speed (there is no faster Bit than no Bit).

Our experience with the Primo GUI redesign

Primo GUI is not mobile ready

Certain changes to GUI are induced via Javascript when two conditions are met:

Our experience with the Primo GUI redesign

Why is the Primo GUI not mobile ready?

Mobile changes will never fire for mobile devices with a vertical/horizontal resolution larger than 500 px such as:

Our experience with the Primo GUI redesign

Other problems with the Primo GUI on mobile devices

3. Our solution

Our solution

Reduction of Http Requests

Image assets

Our solution

Reduction of Http Requests – Results (Homepage)

Requests before Requests after Comments
Html 1 1
Javascript 4 5 Four default JS files + our custom JS file ⇒ Concatenation possible?
CSS 2 3 Our custom CSS files + add2Home.css ⇒ Concatenation possible?
CSS Images 16 0 Mostly icons ⇒ replaced by icon font; no CSS bg-images used to simulate gradients etc.
Images 3 5
Fonts 0 1 Icon font ⇒ replaces CSS images
Favicon 1 1
Total 27 18
Our solution

Rewriting CSS from scratch with the following in mind

Our solution

Using a dynamic stylesheet language

New Workflow:

  1. Write LESS code in *.less files
  2. Preprocessor compiles *.less files to (minified, concatenated) CSS
  3. Upload CSS to server
Our solution

Using a dynamic stylesheet language – some advantages

Split CSS/LESS declarations to different files using LESS partials

Our solution

Using a dynamic stylesheet language – some advantages

Metaphor for the division of style declarations (Thanks to Robin Rendle)

Our solution

Using a dynamic stylesheet language – some advantages

// Excerpt from Primo_unibz_britta_v2.less

@import "utils/mixins.less";
@import "config.less";

@import "main/quarks/normalize.less";
@import "main/quarks/box-sizing.less";
@import "main/quarks/forms.less";
@import "main/quarks/iframes.less";
@import "main/quarks/images.less";
@import "main/quarks/links.less";
@import "main/quarks/typography.less";

@import "main/atoms/button.less";
@import "main/atoms/carousel.less";
@import "main/atoms/data-table.less";
@import "main/atoms/drop-down.less";
@import "main/atoms/grid.less";
@import "main/atoms/icon.less";
@import "main/atoms/nav.less";
@import "main/atoms/overlay-and-popup.less";
@import "main/atoms/search-forms-elements.less";
@import "main/atoms/slider.less";
                
Our solution

Using a dynamic stylesheet language – some advantages

Creation of a central configuration file

Our solution

Usage of a CSS preprocessor – some advantages

Creation of a central configuration file

// Excerpt from config.less

@base-font-size   : 16px;
@base-line-height : 24px; 
@base-font-family : Tahoma, sans-serif;
@secondary-font-family: Trebuchet MS, sans-serif;
@line-height-ratio: (@base-line-height / @base-font-size) * 1em;

// Excerpt from /molecules/page-skeleton.less

html {
    background-color: @brand-color-1;
}

body {
    font-family: @base-font-family; 
    font-size  : @base-font-size;
    line-height: @line-height-ratio;
    color      : @brand-color-5;
}
            
Our solution

Usage of Media Queries

Our solution

What is still missing?

Our solution

Pro & Contra

Pro Contra
CSS is lighter (around 90 KB minified vs. 200 KB minified) Rewriting the whole CSS was time consuming
CSS is easier to maintain CSS preprocessors and OOCSS have a certain learning curve.
You don't work directly with the CSS anymore ⇒ tools like Firebug can't be used (source mapping for preprocessor files not yet implemented)
Primo GUI is responsive CSS declarations for new objects need to be added manually to preprocessor files (e.g. date slider)

3. Object Oriented CSS in detail

Object Oriented CSS in detail

The DRY principle

In terms of CSS;

Object Oriented CSS in detail

Goals & Principles of OOCSS

Goals

Principles

Object Oriented CSS in detail

Separation of Structure from Skin

Structure completed (four walls, roof, holes for windows and doors)
Object Oriented CSS in detail

Separation of Structure from Skin

A little bit of skin added (red roof and black windows)
Object Oriented CSS in detail

Separation of Structure from Skin

Skin completed (red roof, white wall, black windows, green lawn)
Object Oriented CSS in detail

Separation of Structure from Skin

Same skin and same objects (from an abstract point of view).
Object Oriented CSS in detail

Separation of Structure from Skin

Same skin but different object
Object Oriented CSS in detail

Separation of Structure From Skin

Structure = the elementary properties that constitute an object

Skin = visual features of an object (colors, font sizes, shapes, border styles, etc.)

In terms of CSS …

Object Oriented CSS in detail

Separation of Containers and Content

A toolbox - our content
Object Oriented CSS in detail

Separation of Containers and Content

The toolbox in the house of commons
Object Oriented CSS in detail

Separation of Containers and Content

The toolbox in the Queen's office/living room (?)
Object Oriented CSS in detail

Separation of Containers and Content

Whatever the container/context, the properties (color, shape, size etc.) of the toolbox don't change.

In terms of CSS

  • wherever (Header, Footer, Popup, etc.) we place an element (e.g. a Button) its properties should not change/depend on its container/context.
  • Try to avoid contextual selectors to style an element. For example:
    .header > .myButton { }
    .header .myButton { }
Object Oriented CSS in detail

Example: The Simple/Advanced Search Buttons

Object Oriented CSS in detail

Comparism Default CSS and OOCSS for Simple/Advanced Search Buttons

Size (minified) Maintainability
Default CSS 758 Bytes Structural/design changes to logically related element made at more places in CSS.
DRY/OOCSSS 414 Bytes (-45%) Structural/design changes to logically related elements made at one place in CSS.
DRY/OOCSS (atomised skin classes) 462 Bytes (-39%) Structural changes to logically related elements made at one place in CSS. Design changes are made by adding desired classes to elements in Html markup.
Object Oriented CSS in detail

Other objects in Primo GUI that can be optimised

Object Oriented CSS in detail

Don't reinvent the wheel

CSS frameworks that implement DRY/OOCSS

Object Oriented CSS in detail

Good reads

OOCSS & Atomic CSS

Stylesheet structure

4. Miscellanea

Miscellanea

Using smaller external Javascript Libraries (?)

Used for Weight (minified) Possible Alternatives
jQuery carouFredSel 6.2.1 Virtual Browsing ~ 53 KB slick.js (~ 27 KB minified) / jCarousel (~ 18 KB minified)
qTip 2 (Basic features) Add notes to items saved in e-Shelf (?) ~ 44 KB Tooltipster (~ 17 KB minified) / Opentip (~ 34 KB minified)
Slider (as part of jQuery UI library) Date slider ~ 23 KB noUISlider (~ 11 KB Basic minified, ~ 17 KB Full minified) / Ion.Range Slider (~ 13 KB minified)
jQuery Fancybox Opening/Closing Lightboxes (Find Databases etc.) ~ 15 KB Featherlight (~ 4 KB minified) / Colorbox (~ 12 KB minified)
jQuery Datepicker ??? ~ 16 KB Datepickr (~ 6 KB minified)
Miscellanea

Conditional loading of Javascript code (?)

Miscellanea

Optimize Html

Miscellanea

iFrames

Miscellanea

Layout Editor in Primo Admin GUI

Miscellanea

Layout Editor in Primo Admin GUI

Miscellanea

Default markup of e-Shelf, Queries and myAccount is different than other views

/* Skeleton Html Markup of Home Page, Brief Display, Full Display */

<html>
...
    <body class="EXLCurrentLang_en_US">
        /* An overall wrapper is present here */
        <div id="contentEXL" class="EXLCustomLayoutContainer EXLContent EXLBriefDisplay">
            <div id="exlidSkipToContent" class="EXLCustomLayoutTile EXLSkipToContent">...</div>
            <div id="exlidHeaderContainer" class="EXLCustomLayoutContainer EXLHeader">...</div>
            <div id="exlidHomeContainer" class="EXLCustomLayoutContainer EXLHomeContainer">...</div>
            <div id="footerEXL" class="EXLCustomLayoutTile EXLFooter EXLClearBoth EXLFooterTile">...</div>
        </div>
        ...
    </body>
</html>

/* Skeleton Html Markup of Home Page, Brief Display, Full Display */

<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
    ...
    <body class="MyAccount EXLCurrentLang_en_US">
        <div id="exlidSkipToContent" class="EXLSkipToContent">...</div>
        <div id="exlidHeaderContainer" class="EXLHeader EXLClearFix">...</div>
        <div id="exlidHeaderSystemFeedback" class="EXLCustomLayoutTile EXLSystemFeedback">...</div>
        <div class="EXLMyAccountTabsRibbon">...</div>
        <div id="exlidMyAccountContainer" class="EXLMyAccountContainer">...</div>
        <div class="EXLFooterTile">...</div>
    </body>
</html<

            
Miscellanea

Default markup of e-Shelf, Queries and myAccount differs from markup of other views

5. Last but not least

Last but not least

Some examples of great Primo GUIs

My wish for next year

A completely new Primo GUI which is optimized for speed, maintainability and mobile readiness. It is furthermore based upon well established best practices/standards of the Web Development Community.

Thank you