Chapter 9. Let's Read Feeds – A News Reader

It's time to add a new, big functionality on our social network. Right now, users can post a variety of content and comment on each other's content. Of course, they cannot register themselves or log in to the page, but this problem will be fixed in the next few chapters. From the point of view of the product, we want users to spend more time on our social network, and that's why we are going to add a feed reader.

By the end of this chapter, you will know how to use a few components of ZendFeed, which will be used to parse the RSS feeds of the websites to which the user wants to subscribe to. Then we will use the CLI version of the controllers to make a script that will fetch the articles of the feeds every X minutes. Of course, this will be made to run by a cronjob. At the frontend, we will see how to use ZendNavigation in two ways: the default easy way, and the programmatic way. We will also work with the usual suspects, databases, table gateways, and so on. But we will review that really fast because the focus now is on different components.

Note

A cronjob is a tool in Unix-like systems, which allows us to schedule the execution of any program we want.

Overview

On the application, the functionality will look similar to the following screenshot:

Overview

Let's review all the sections as follows:

  1. We will refactor the menu we have on the header to use a simple ZendNavigation.
  2. This will be the menu that the user will use to select the feed they want to read. We will program a ZendNavigator component to populate the pages and detect the element that is active.
  3. This is a small form, which will be used to add new subscriptions.
  4. This button will allow the users to remove the subscription to a feed andalso delete the data we store on the database and the related articles.
  5. This is the main section of the functionality, and this is where we are going to show a list of the articles to be read.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.51.241