sdomaradzki
sdomaradzki

Reputation: 55

Should I use Pages or DataObjects for large amount of entries?

I'm wondering what is the best approach or best practice in this situation:

At the beginning, I was thinking that I will create a base page and I'm going to use a holder-page pattern, but now I have some doubts. Isn't it better to use DataObjects and simply use Pages to manage them?

What is your experience with using holder-page pattern for thousands of pages? Does it make sense?

Upvotes: 1

Views: 78

Answers (1)

bummzack
bummzack

Reputation: 5875

It's up to you to decide. Pages are also DataObjects and you can manage them just like you do with other DataObjects. Eg. use a GridField, ModelAdmin or other means such as Lumberjack.

The SiteTree can also handle large amount of pages, so it's not really an issue in that regard.

I think you'd have to answer this purely from an architectural point of view:

  • Do my data-objects have an URL?
  • Do my data-objects need to be versioned?
  • Do I need a hierarchy of objects (parent- and child-pages)?
  • Are my objects being displayed as individual pages, so that they also need metadata, such as meta-title, description, opengraph-tags etc.?
  • Should my objects show up in the xml sitemap?

If you answer most of these questions with yes, then using Pages is probably the better approach as it'll limit the number of things you'd have to implement yourself.

Upvotes: 3

Related Questions