Server Side Pagination, Front End Implementation - NodeJS, MySQL & EJS

Published: 30 June 2021
on channel: Qixotl LFC
12,696
216

In this video, you will learn how to create a paginated list, where all of the pagination work is done on the back-end, using Nodejs and the front-end simply renders out the results and links, using EJS. For this project, we have stored all of our data in a MySQL database. The database in question, is going to store thousands of rows, because we want our pagination feature to be designed in a certain way that suits a large data-set like the one that we are using.


The pagination style is unique because it always displays 10 paginated links at a time, instead of the more than 100 links that will in turn, take us to each paginated page. When we visit a new paginated page, the paginated links will change to reflect the pages that are closest to the one that we are currently on. And the position of these links will position themselves around the current page, so that things are always even.


As for the pagination effect itself, that will be achieved with query parameters. We will have a page query parameter which will hold a number, and its number will determine the page we are currently on. We will also be rendering out 30 results per page. Although, this number can be easily changed on the back-end.

📚 Materials/References:
Completed project’s GitHub repository: https://github.com/lfcourtney/NodeJS-...

🧠 Concepts Covered:
MySQL client in NodeJS.
Using a loop to render out content in EJS.
SQL’s LIMIT command.
Query parameters and redirects in Nodejs.

💻 Technologies used:
NodeJS.
EJS.
MySQL.

If you enjoyed this video then please consider liking 👍 and subscribing. You would be doing me a huge favour if you did this and it would be greatly appreciated ❤️ by me. Likewise, if you have any queries or comments that you want answered. Then please, don’t hesitate post them down into the comments box below. I would love to hear back from you and will answer all of your questions to the best of my ability.

Stay awesome guys. ❤️

#webdev#backend#frontend#JavaScript#nodejs#SQL


Watch video Server Side Pagination, Front End Implementation - NodeJS, MySQL & EJS online without registration, duration hours minute second in high quality. This video was added by user Qixotl LFC 30 June 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 12,696 once and liked it 216 people.