We have a project where we regularly fetch several hundred job ads via an API and present them on the website: Total overview + details page.
The question I have is how to integrate this the best:
- store jobs in own table and generate the detail pages with friendly url via htaccess and alias or
- create Resources for each job ad
So far we have always solved this with custom tables. The advantage would be the faster and better filtering of the individual fields compared to TVs with resources. The disadvantage is that maybe the little better caching of resources and the little extras like the automatic integration in the sitemap.xml etc.
What are your experiences?
The only disadvantage is it’s a bit more work to set up, but you get a lot more flexibility. When regularly fetching hundreds of items, you’ll want the scalability of a dedicated data model. Can easily add caching in your controller if that’s a concern.
I’d only do the resources approach if there was no budget for something better, and there’s a limited number of items (that wont grow much larger over time either).
It’s not really an either/or situation. You can have a resource for each job to hold idiosyncratic information about a job that you might want to display, but that doesn’t fit neatly into categories. At the same time, you can put all the job characteristics you might use for searching and sorting into one or more custom tables.
The one thing you don’t want to do is store your data in TVs. Anything you’d put in a TV, should go in a custom table, which will speed up searching and sorting by a ton.