News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Paginating Real-Time Data with Cursor Based Pagination
July 11, 2014 @ 11:52:13

On the SitePoint PHP blog today a new tutorial has been posted introducing you to cursor-based pagination of real-time data, showing the results and allowing for easy click-through functionality.

Pagination is a technique for breaking large record sets into smaller portions called pages. As a developer, you should be familiar with implementing pagination, but implementing pagination for real time data can become tricky even for experienced developers. In this tutorial, we are going to discuss the practical use cases and solutions for real time data pagination and cursor based pagination.

He uses results from the Twitter and Facebook APIs in his examples, grabbing tweets matching the search term "php". He briefly explains some of the issues with real-time pagination and how it compares with standard pagination techniques. He uses the "after" and "before" functionality of each API to only pull the data needed, not the entire list of latest posts. This is added to a list in order and shown when the user view is refreshed. He includes the code for implementing the cursor-based handling and how to echo the results back out to a view.

0 comments voice your opinion now!
cursor pagination twitter facebook api tutorial realtime

Link: http://www.sitepoint.com/paginating-real-time-data-cursor-based-pagination/

blog comments powered by Disqus

Similar Posts

CodeSamplez.com: PHP HTTP Request With Guzzle

SitePoint PHP Blog: Best Practices REST API from Scratch Introduction

Giorgio Sironi's Blog: Practical PHP Patterns

Chris Hartjes' Blog: Tutorial: How to create a thread in vBulletin with a script

PHPMaster.com: Create Digital Tickets with PHP and Apple Passbook


Community Events





Don't see your event here?
Let us know!


opinion library tool voicesoftheelephpant composer list artisanfiles community framework release symfony introduction podcast laravel series interview conference language version security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework