Wednesday, November 19, 2014

We are "Mobile-friendly"

Google announced a new mobile search feature yesterday. Here's the gist: "we’re adding a 'mobile-friendly' label to our mobile search results". We're proud to say the U of M Libraries' website is indeed "mobile-friendly". Here's a picture of how our site will appear in mobile google searches. Enjoy!

Friday, September 26, 2014

What we're working on

About a month ago at one of our departmental stand-up meetings, I proudly proclaimed that I was going to start posting weekly updates to this blog about what we're working on. I'm making no promises or excuses, but here's a taste of what we've been up to:

Web Development is now in possession of the lib.umn.edu domain. For years, we've only controlled www.lib.umn.edu, and any request to lib.umn.edu was redirected to www.lib from an aging Solaris server on the 5th floor of Wilson Library. This wasn't a problem unless (as has happened with a number of times over the past year) that server was down. Then tickets would roll in about our site being down. Now lib.umn lives on our dedicated redirect VM.

Michael and Paul have been troubleshooting a nasty networking bug that made it impossible for some of our apps to talk to one another on our development server... but only sometimes. Some combination of private (192.168...) IPs for our dev servers, and our load balancer's sticky sessions meant that we had about a 50-50 shot at proper inter-app communication between apps. Super-duper frustrating.

In addition to his work with Web-People and the University's Drupal User Group, Gabe has now joined the Enterprise Drupal advisory group, a body that will suggest and approve changes to OIT's enterprise Drupal.

Paul issued a request that OIT power down six physical servers, side01-06, so named in the "cuts of meat" era of our server naming (I knew of "chop", and I think there was also maybe a "brisket"). These servers dutifully hosted our production, development, and staging environments for the better part of six years. I kind of want to visit them in the OIT data centers (some are in the West Bank Office Building, and others are in the Church St. data center under Morrill Hall) to give them a proper send-off. These were the last physical servers in use by the Web Development dept.

Michael has been working with the open-source EZPaarse project (https://github.com/ezpaarse-project/ezpaarse) as part of our ongoing efforts to build a comprehensive set of tools for analyzing electronic resource usage data based on our EZProxy logs. EZPaarse is a node.js app that's intended to be a simple tool for a not particularly tech-savvy user to run locally on their machine. EZPaarse spins up a web server, and gives users a browser-based interface for turning EZProxy logs into COUNTER-compliant .csv files. Pretty interesting, and there seems to be a fairly active community of users contributing vendor-specific parsers. We'll be using it headless along with a number of custom tools that should give us better data on our electronic resource usage than we've ever had.

Jen and Eric launched a new Upper Midwest Jewish Archives site (https://www.lib.umn.edu/umja) that is the first Archives & Special Collections site in our new responsive theme. The UMJA site is fairly simple, and thus was a handy test case for transitioning an existing sub-site to the new theme. Their work included creating the new responsive search form, further customizations to which are already in the works for the University Archives site. Look for Jen's responsive revision to the Borchert Map Library site coming soon as well.

David took a well-deserved vacation last week after completing work on a new open-source release of the ETL system he created for ethicshare.org in anticipation of the transition of that site to Johns Hopkins University sometime later this year or early next. You can peruse his code here: https://github.com/UMNLibraries/ethicshare-etl Now he's on to what may be our second node.js tool, a mysterious beast that currently goes by the cryptic name URL-PHP.js.

Eric has been wrapping up work on the redesigned University Digital Conservancy (DSpace), which will be launching in a week or two. He took this as an opportunity to take the design patterns we established during last fall's redesign of the Libraries' main website and generalize them for use on other sites and apps. The UDC sports a new responsive theme that echoes the look and function of the main site while retaining a distinct identity. We'll have much more to say about these design patterns soon.

Related, Eric and Jen worked with a subgroup of the Web Presence Management Group to run our first monthly usability test. This was initially intended as a dry run for the process and technology. The group recruited three Libraries' staff members to evaluate the redesigned UDC, and the testing worked so well that the UDC managers gained some important and actionable insights into their new design. In fact, they have already dramatically simplified the upload form in response to findings from usability testing. We'll be running usability tests the third Thursday of every month. If you have a site or app that you'd like to get in front of some users, let us know. WPMG will be managing a calendar, and we'd love to work you in.

Speaking of responsive redesigns, Gabe is neck-deep in theming the Health Sciences Libraries' sites. Thus far he's successfully stripped their theme back to bare bones, and is busy plugging all the pieces into a vanilla Bootstrap theme, which we'll then paint with our custom styles. Much more to come here.

Jen's been pushing out updates to the front page every week, with new features, videos, and images from our digital collections. With the help of WPMG, she's been chasing down great timely content to promote. We've got a lot more in the pipeline for this fall, but as always, if you've got something you'd like to promote on www.lib, contact your WPMG rep, or Jen.

And me? Meetings, mostly. In the meantime, I've been working with LibData. Late this summer, Michael added a field to Libdata's resource database that allows staff to add streaming videos as resources. Thanks to his clever parsing of standard embed code, staff can add videos from YouTube, Vimeo, Media Mill, and even Vine to LibData and thus to subject guides, course guides, etc. Seemed like a fine excuse to polish up the template we've been using to publish PageScribe pages. I got it about halfway to where it needs to be, so that at least it has our current styles, header, and footer.

It also was recently brought to my attention that links to print resources from LibData guides haven't been behaving as expected. Presently, a print resource added to a subject guide will be listed properly, but won't present a prominent link to the catalog. Instead, to get the link, users need to click through to the More Info screen. This is not intended behavior. The fix is relatively simple. However, intrepid staff have in the meantime worked around this problem by adding catalog links to the URL field for these resources. This gets the job done, but will prove fragile if (when) the syntax for linking to items in Primo changes. For sustainability's sake, we'd much prefer LibData hold the catalog number, which we can wrap in a URL programmatically. This way, when the link structure needs to change, we can make one edit and fix all print resources. This is how we'll proceed, but it leaves open the question of how to handle those resources with both a catalog number and a value in the URL field. Which wins? My inclination is to say the catalog number always wins, but this may have the undesireable effect of leading to the creation of duplicate entries if a formerly print resource gains an electronic counterpart. Or, in cases where a resource has a print and electronic version in the same LibData record, this may mean we point to print instead of electronic. My head hurts.

Tuesday, April 22, 2014

I, Spammer

Averaged over the year, our Assignment Calculator web app sends about 500 email messages a month. I know this off the top of my head because thanks to some file system maintenance last Friday, the Assignment Calculator's email function is working properly for the first time in almost 14 months. Which means that in the wee hours of Saturday morning, the Assignment Calculator sent the approximately seven thousand messages that had been queuing up.

Seven.

Thousand.

Oops.

We messed up. If you are one of the people we first let down by failing to send promised notifications and then annoyed by flooding you with useless email, I hope you'll accept my apology on behalf of the Libraries.

Sadly, our only recourse to apologize directly to the over 700 users we spammed with much-delayed notifications is to email them again, which we did promptly once we realized what had happened.

We're asking ourselves some hard questions raised by this incident. Namely:

  1. Why were we unaware that these messages were not being delivered? (The standard convention of piping cron errors to /dev/null is the immediate answer.)
  2. How can we ensure that we're notified in future if this or similar jobs fail?
  3. What is the future of this application, considering:
    • We've likely broken faith fairly spectacularly with anyone who tried to use the app over the past year, and
    • Despite being broken for over a year, we got no such reports from users.
We'll be discussing these issues internally in the Web Development department and with the Web Presence Management Group. If you have questions or concerns, please feel free to comment here or get in touch directly.

Friday, March 14, 2014

Making Single Sign-On, well, "Single"

Here's a common scenario:


Yep, that's the login screen.
A member of the UofM community, we'll call her "Alice," wakes up in the morning and checks email... That requires logging into the familiar blue UofM login screen. She types her username & password and is sent on her way to read her waiting messages.

A few minutes later Alice visits our website https://www.lib.umn.edu intent on looking over her list of checked out items and maybe registering for a workshop.  She still sees a "Sign in" link at the top despite logging into email just a moment earlier.

Alice clicks the "Sign in" link on our website, her browser window refreshes a couple of times and she's suddenly signed in. "Wait, I thought we had a single sign-on at this university. Why did I have to click "Sign in"? She didn't need to type her password again, at least.


"Hmm, I just signed in. Ok, whatever." *click*

If Alice had been required to sign in before ever visiting our website, this wouldn't be a problem.  We could have just redirected her browser a couple of times before landing on the Libraries' homepage, collect login credentials if needed, and she'd be all set, but since we want users to be able do almost everything on our site without logging in, it's more complicated.




"Finally...I thought this was supposed
to be single-sign-on."
I won't bore you with the technical details of the UofM's central authentication system to explain why the situation is this way, or how it differs from what we had a few years ago (I started to, and deleted it when it reached three paragraphs), but suffice it to say it's inconvenient for our users and that bugs me tremendously.

We can do better.


I mentioned it might be possible to just redirect the browser a few times before landing on the homepage and be logged in.  Well, that's certainly possible and it works well even. But when our web design team undertook the Libraries' site redesign last fall, one of the driving principles behind the work was that the new homepage must be fast. Not just fast, but the fastest of any CIC library. according to Google's PageSpeed Insights metrics.

Delaying the homepage load for up to two seconds for users on campus or even three to four seconds for users off of the campus networks while login status is verified is out of the question. So how can we guarantee users who have already logged in elsewhere in UofM services get logged in here without slowing down the experience?

Ok, now a little more technical.

In order to know whether or not Alice has logged into any UofM systems, our web server needs to  communicate with the central server and check her status. However, our server still has no idea that it's Alice looking at the screen. Our server generally isn't allowed to know Alice has logged into her email (that could enable all sorts of security problems between unrelated websites), so her browser has to briefly visit a URL the central login service to see if her earlier login is still valid. If it is, she is sent back to our website, validated for our server too (and if not, she'll get the login screen again). All told, the web browser will be redirected four to six times in this communication, and it takes a few seconds.

We don't want to do any of that in the web browser window where Alice is already viewing https://www.lib.umn.edu. After all, so much effort went into making it load quickly.  Instead, the Libraries' website will create a hidden window, invisible really, to load the URL communicating with the central login service. All those redirects take place out of sight, while Alice is presumably scrolling the page or scanning for the "My Account" link she came to find.

After a second or two, if the central login service responds that she has a valid session, our web server suddenly gains some knowledge about her: her name, her UofM Internet ID, library barcode number, among other things.  Armed with this data, the invisible window's landing place is on a URL which completes her login to the Libraries' website, updating some info about her in our database, and gathering some statistics for the Student Success Project, among others; all the same things occur now which would have occurred if she manually clicked the "Sign in" link.
Magic! Though less chaotic than pictured...

The last thing the hidden window accomplishes is to communicate what it knows about Alice back up to the screen she was viewing.  When that data has been received, the "Sign in" link disappears, and Alice's username (mine, pictured) fades in place of it, along with the relevant "My account" and "Sign out" links in a dropdown menu. It's now as if she'd been logged in all along, and she didn't need to do a thing. She'll remain logged in until her central credentials expire a couple of hours later.

What do we get out of this?

Since most of our website is accessible to the public, without requiring any authentication, you're probably wondering at this point why any of this matters. Why not just require users who need to be signed in to sign in, and not worry about those who don't need it right now.  Well, we can get much better statistics on E-Journal and Database usage, affinity strings, and generally valuable data from signed in users which is unavailable to us otherwise.

Plus, with the visual feedback of a user's Internet ID appearing on the screen, we hope it will send our site visitors the positive message that "we know who you are, and we can meet your needs here."

Wait, I don't see this on the site yet.

Right now, the auto-login feature is only available on our development website. We want to spend a little longer putting it through its paces since it has a lot of "moving parts". Hopefully we will be able to put it onto the live website early this spring.

Thursday, January 2, 2014

Redesign status update

Been a while since we last rapped at ya.

It's not because we haven't been busy. Quite the opposite. We reached a point in November where it was time to cease prototyping our redesign at our /beta site and begin implementing the design on our development server. Unfortunately, it's much more difficult to make our work visible to you when we're working on our development server. We've been giving demos to the Web Presence Management Group, but seeing as how we're a little over a week from our launch date, it seemed only right to provide a more public picture of where we're at.


The biggest challenge we've had in the past couple of months has been to graft our speedy hand-crafted prototype design onto our Drupal 6 CMS. Drupal serves us well as a system for delegating content creation and maintenance, but speedy it ain't. We ended up with a hybrid solution. Our home page remains largely bespoke code, using many of the latest and greatest tricks to speed load times and optimize performance across devices. We leverage Drupal only on secondary pages, where we've created a custom theme using the same assets, styles, scripts, and responsive design logic as our home page.


In effect, we've gained remarkable speed on our home page, but have lost the ability to use Drupal to publish content to the home page. Instead, we're building the home page by hand, and using some clever asynchronous publishing to get current info like hours and workshops onto the home page without bootstrapping Drupal. We feel strongly that these tradeoffs are worthwhile. Over 50% of pageviews on our site are of our home page. The next most-frequently viewed page garners just two percent of page views, and it's the default browser home page in most of our computer labs. Minute improvements to the home page, fractions of a second, can accumulate into huge gains for our users. If our home page had loaded a half-second faster, we would have saved our users over 135 hours over the course of fall semester 2013. We're hoping to meet or exceed this savings with the redesigned site in spring semester 2014.


But what about those secondary pages? The ones driven by Drupal? They're looking pretty great. We've completely restyled our subject guides and our A-Z list for greater scan-ability, and to be touch-friendly. Along the way, we've simplified More Info pages for electronic resources, and accounted for changes as a result of our move from Aleph to Alma, and from MNCAT Classic to MNCAT Discovery. We'll have even more to show you soon.