Should I use Collections or an app?

With more Perchers choosing to build sites on Perch Runway and trying out Runway with a Developer license on their personal sites, we thought it would be worth discussing more of the features and capabilities.

An interesting question on that topic came up in the forum this week. Phil asked:

“If I’m using Runway, is there any real advantage to using the Blog app over Collections?”

If you’re not familiar with them, Collections are big containers in Perch Runway for storing content items. For example, a ‘News’ collection would contain news articles. Articles can then be categorised, filtered and sorted for display wherever needed on your site. They’re like supercharged multiple item regions, and they’re not tied to a specific page in your site.

The aim with collections is to make them as flexible as possible so you don’t need dedicated apps for handling different types of content. We can’t possibly imagine every type of content a site might need to handle, so the best solution for a CMS is to provide flexible tools that can be turned to any purpose.

The challenge, as always, is doing this in a way that the user experience isn’t compromised. Very generic tools can be hard for a non-technical site editor to get to grips with. That’s why collections have some clever ways to make the editing experience as intuitive as possible.


So what about our question – could a collection be used in place of the Blog app? It’s interesting because the Blog app does lots of different things. Let’s look at them in turn.

Posts

This is the simplest case, as a collection is ideally suited to storing posts. Each item would need a title and a date, and when displaying the collection, a filter could be added to only show posts whose publish date was in the past. Collections have drafts and preview by default.

Collection items can be put into categories just like regular region items, so category listings would be simple to create using the built in Categories app.

Authors

The Blog app automatically creates authors based on Perch user accounts. This functionality can be useful, but honestly, some people also find it annoying and would rather have independent control over the authors. How would we handle this with a collection?

Collections don’t have anything to automatically create authors based on user accounts, but they do have another neat trick – relationships. Within an collection item, relationships can be created to items in other collections.

For our blog, we’d create a second collection of Authors. Within a post, we’d add a relationship to the Authors collection so that a post can be attributed to one or more authors. When the post is displayed, the author information is automatically made available in the template for display. Posts can also be filtered on the relationship, so we could produce a list of post by author, for example.

Comments

One thing that collections won’t help with is comments. Collections are all about displaying content stored within the system, not capturing content from site visitors.

All is not lost, however. We have a dedicated Comments app which can perform this job admirably.

With all that in mind, I think that yes, collections could be used quite easily in place of the Blog app. The needs of each project are different, and what might be a trade-off in one case is an advantage in another.

More important are those cases where a dedicated app doesn’t exist. Collections are perfect for property listings on a real estate agent site, for course listings on a university site, for product listings for an online retailer. All these cases where you’d otherwise think a dedicated app might be required, collections might be just the job.