I am runnig a Symfony 2.8 based webpage and a Wordpress based blog "side by side" (the blog is used to publish articles that are related to the Symfony page).
I would like to automatically add links to the latest blog posts to the footer of the Symfony page. What is the best practice to do this? Is there any out of the box solution (e.g. some third party bundle)?
Solution 1: Fetch RSS feed in Symfony Controller or Service
Of course I could add the code to fetch, parse and render the blogs RSS feed to a Symfony controller and services.
A big disadvantage of this solution would be, that the feed would be process in every request of the Symfony page, which would effect the page loading time. Since a new article is published every one or two weeks, this would not be very effective.
Solution 2: Fetch RSS feed in Symfony Command
Move the processing of the RSS Feed to some command which is than executed by a cron job. Most of the work (parsing, etc.) would be done by this command and the result (latest links) would be cached. A request to the Symfony page would simply load this prepared data. Advantage: Faster page loading compared to solution 1.
Solution 3: Process RSS feed using JavaScript
Move the processing of the RSS Feed from Symfony to JS. Page loading would not be effected since the page loads without any additional work. A JS script would handle loading, parsing, rendering of the feed.
Which of these solutions should be the preferred one? Is there any best practice? Is there any other solution that would work better?