Ziming Yuan: How a Beginner Built an RSS Feed Provider in Volto
Talk by Ziming Yuan at the Plone conference 2024 in Brasilia.
Link to talk information on Plone conference website.
I am studying computer science. This summer I have participated in the Google Summer of Code for Plone. Thank you to mentors Paul, Roeland and Mike!
I have built several full-stack web apps with React, but am new to open source.
What is RSS? It is Really Simple Syndication. It is used by websites to publish updated information, such as blog or news. It lets users decide what they read every day, instead of algorithms.
In Plone the RSS feed should use a catalog query to filter contents, for example a feed of science articles or of events.
For an RSS feed content type we could use a collection behavior or a blocks behavior with a listing block. The listing block is the way to go for Volto. So I did that. Plus extra fields like maximum title length and maximum description length.
I created a view component for the content type. Important is the Express middleware with which we got information from the backend.
We decided on `rss` as Node package for the feed. We looked at another newer one called `feed`, but it did not work for us or was missing features.
There were challenges for me as person new to Plone. Do I really understand the code? Often the answer is: no. For example ZCML? i18n? XML files in the profiles? There is a really nested structure. Create a new project, then you have backend / src / rss / src / rss, at least something very deeply nested. It was always confusing to me as I did not really know what should end up in git or in a release. The worst is that I don't know what are the most important files.
And what if my code fails, it was hard to understand errors on the front end. There are just too many things that may be the source of the error.
Another challenge: what if I want to create something new? The training lets you learn by example. But what does each line of the example code actually do? Are there other options?
Missing documentation: how do prevent the user from removing the title or rss block? We found out about initialBlocks per content type. And prevent adding new blocks? There is a feature disableNewBlocks, that could be set on an individual block, but what about doing this for all instances of this content type?
An overview of the code base would be good. How different components are connected, how different files work together. A guide about how to approach the source code, what files I should look at first.
For developers new to Plone: the source code is your friend, the Plone community is helpful, but be specific in the questions you ask, and tell what you have already tried.
Source code: