- π Learning Outcomes
- π Welcome to Class
- π Intro Project
- Existing Vs New Projects
- Pagination
- [10m] π΄ BREAK {docsify-ignore}
- Activity: Technical Debate - Picking a Pagination Module
By the end of this lesson, you should be able to...
- Understand how pagination works, and how to implement it
Instructor will walk through the syllabus and answer questions about the course.
Students, remember to join the following:
- Course Slack channel,
##bew-2-1-web-patterns
! - Gradescope: INSERT LINK HERE
Wait a minute, a project already?!
How Not To React:
Instead:
TODO:
- Add project description
- Where code will be written
You may be asking, "why are we enhancing an existing project instead of creating a new one?"
- More common as a junior engineer to be working on an existing project
- You will have to revamp/add features to an existing project at some point in your career
- Improve your existing portfolio projects to make them stand out more
Question: What is the fastest way to speed up a query for 1,000,000,000 (1 Billion) records?
The answer (do not click!)
Use pagination to only return the first 20 records like .... Google does!If you look around almost every website is paginated. Why? Probably because pagination is one of the easiest ways to speed up page loads. If you are loading 1000 records on your index page, that will take 10 seconds to load. Pagination will speed it up by sending only the first 20 records.
What are other benefits to pagination?
- Improved structure and readability: reduced chance of users getting lost
- Separate URLs for pages for ease of reference
- Positive effect on SEO, easier for crawlers to navigate
Throughout your career, you will have many technical debates with your teams. We're going to practice that here:
-
Compare and contrast these modules, list their pros and cons, and decide which one you would use and why.
-
Divide into groups where everyone in the group agrees on which package they would use
-
Now split your group into thirds, one third stay stays, the other two thirds go to another group and try to convince them to use your module.
-
Could you convince anyone to change? What arguments are the most compelling for people? What arguments were most compelling to you?