Skip to main content

Pagination: An old web 1.0 solution

·379 words·2 mins
UI
Alejandro Duarte
Author
Alejandro Duarte
Alejandro Duarte is a Software Engineer, published author, and award winner. He currently works for MariaDB plc as a Developer Relations Engineer. Starting his coding journey at 13 with BASIC on a rudimentary black screen, Alejandro quickly transitioned to C, C++, and Java during his academic years at the National University of Colombia. Relocating first to the UK and then to Finland, Alejandro deepened his involvement in the open-source community. He’s a recognized figure in Java circles, credited with articles and videos amassing millions of views, and presentations at international events.

A pagination component

A few days ago, an Enterprise App user asked me if lazy loading is better (particularly in a buisiness application) than pagination. My answer: Totally! Pagination is an old, so called, web 1.0 solution. At that time, no AJAX was possible at all.

It’s not very usable to have a lot of 1, 2, 3, 4, 5, 6, …, 100 links. Lazy loading á la Vaadin is not only easier to use but to understand for the end user. If a user sees a scroll bar, they will understand that scrolling that thing will cause the rows to, well… scroll. No need for further explanations about it (is there any explanation to make?). Chances are that pagination will cause some novice users to get lost, at least the first time they use the software.

Sometimes scrolling through the entire data set is certainly necessary and pagination could make that task a pain in the neck. I think pagination is OK if we have, let’s say, seven pages at most ( tanks Miller). If the number of pages is uncertain at design or development time, I would definitely try a different approach. Nevertheless, if the target client devices allow it, I will go with lazy loading.

I don’t know why the heck I used pagination for such a long time. I think I just got used to use pagination in every table with data I created. DisplayTag could be guilty, but even DisplayTag can be configured to use a new appealing and delectable lazy loading mechanism.

Some of you might argue “Google uses pagination”. I must admit there are situations where pagination makes a lot of sense. I can’t imagine an almost infinite page with all the results of a Google search. Also, I feel very comfortable reading online books in a paginated user interface. But a lot of debate is happening out there. Even Google itself prefers view-all search results.

Another, specially but not exclusively, great thing about lazy loading when used in tables, is that it is a good way to get your web applications to appear more modern, more web 2.0. Just note how Facebook, Twitter and other heavyweights use lazy loading to show their data. Go ahead, modernize your web apps by using some lazy loading.

Related

Hello GitHub
·180 words·1 min
News
I have been a ProjectLocker and Assembla user for years. They both offer excellent tools for software projects management.
My brand new web site
·150 words·1 min
News
As some of you already know, I will be making a big noise about Enterprise App and InfoDoc Pro next month.