How to implement a Facebook-like feed page in Mendix to display post text and images?

0
Hi everyone,I want to display posts in a Facebook-like feed layout, where each post shows the post text (description) and the images associated with that post in a vertical feed.I would like to know if there is a better or recommended way to design this type of feed page in Mendix.Any suggestions or examples would be helpful.Thank you.
asked
1 answers
1

Yes, this is definitely possible in Mendix, and the usual approach is to model it as a Post entity with a 1- association to an Image entity*.


A simple structure would be something like this: one Post entity that stores the post text or description, author, created date, and so on, and a related PostImage entity that stores the images linked to that post. This gives you a clean and flexible setup, especially if one post can have multiple images.


On the page side, the most common approach is to use a List View or Gallery for the feed itself. Each row in the List View represents one post. Inside that row, you can place the post text, timestamp, user info, and then another nested List View or Gallery for the related images of that specific post.


So the layout usually becomes:

outer List View = list of posts

inner List View / Gallery = images belonging to the current post


That is usually the easiest way to build a Facebook-like vertical feed in Mendix without overcomplicating the page.


If you want a better user experience, I would also recommend keeping the feed data source simple. For example, retrieve the posts in a microflow or XPath ordered by created date descending, and then let each post show its related images through the association. That is usually easier to maintain than trying to build everything in one complex retrieve.


One thing to be careful about is performance. If you expect many posts and many images, loading everything at once can become heavy. In that case, pagination, lazy loading, or limiting the number of posts shown initially can help a lot.


So in short, the recommended design is usually: Post + PostImage entities, a List View for posts, and a nested image widget/list for the related images. That is the most natural Mendix way to build this kind of feed.


If this resolves your issue, please mark the answer as accepted so it can help others facing the same problem.


answered