C5-8.4* What's better: pages with attributes vs express objects with attributes?

Permalink
I need to set up a car rental database with cars, car properties, car attributes, car manufacturers etc. - basically something like the Community Store products. However they mostly use attributes, then each product has its own page, then a page list filtered by attributes.

Having read about the Express objects, looks like it does the same thing but without thousands of pages. I don't actually need pages as long as all the data is in the DB. I'll just need a list block and then a page to show details of each car from the DB. Can C5 actually do this? Can I show data from a DB on a dynamic page without having actual pages?

So, what's better to use: pages with attributes or express objects with attributes?

linuxoid
 
mnakalay replied on at Permalink Reply
mnakalay
How about a third alternative? Since you are talking about Community Store, why don't you do what it does and create your own attribute category and attach attributes to that? Community Store does it for products and orders.
linuxoid replied on at Permalink Reply
linuxoid
I'm afraid you misunderstood me.

The Community Store uses pages with attributes for products. An alternative is to use Express objects with attributes without pages for each car. Your 3rd alternative seems to be the former - pages with attributes for cars.

I'm wondering what's better: pages or express objects. Which one is easier to work with?

Will the express objects let me show car details on a dynamic page without actual pages in the DB for each car?

Or did I misunderstand you? Did you mean something else?
mnakalay replied on at Permalink Reply
mnakalay
You are right, that's not what I meant :)

Concrete5 lets you attach attributes to different object types: pages, users, files, express objects... Those are attribute type categories.

Express objects are one type of objects and pages are another. Each has different properties. For instance, pages will show up in the sitemap.

You can create a new category and attach attributes to it. Community store does it with orders and products. You can add attributes to products, they don't get added to a page. They get added to a product object.

There is no better way of doing it. If you're happy with having to generate a page for each object you can use page attributes. If you're ok with using Express and everything that comes with it then use Express.

If you don't want a page and don't want the whole Express overkill stuff you can create your own category and attach attributes to it.

As an example, I've been working on a contact package that allows you to create a list of contacts with names, emails...
One thing was to have a "position" field. Obviously, several contacts can have the same position and instead of forcing users to first create a list of positions and then select from it for each contact, I decided to use a select attribute because the select attribute allows you to add to the list as you type so it's perfect.

So what I did was to create a new attribute type category which was my contact entity and now I can attach attributes directly to my contact without express and without having to create a page.
linuxoid replied on at Permalink Reply
linuxoid
"You can create a new category and attach attributes to it" - now I'm confused even more. Is a 'category' another type of object with attributes?

It's clear with pages, files, express... But where/how do I create categories? These are not Topic categories, are they?

What's the difference between product

- category
- group
- attribute
- option

in Community Store? In Russian the first 2 are more or less the same thing so are the last 2. So speaking about cars, is Toyota a category, group or attribute?
mnakalay replied on at Permalink Reply
mnakalay
Yes, a category is another type of object with attributes.
Here's the doc. The topic of attributes is actually extensively covered in the docs:https://documentation.concrete5.org/developers/attributes/advanced-c...

As for community store, attributes are there if you want to add extra information to a product for some reason. Community store doesn't offer a way to use them though, it's up to you to do so in code:
$myProduct->getAttribute('my_attribute_handle');


Options are variations on products like sizes or colors and each option can have its own price and stock levels.

Categories are mostly a convenience thing to filter, order and generally organize products. But you can do whatever you want with them through code. products

I am not 100% clear on the difference between categories and groups. What I know is they allow a different level of categorization/grouping.