Best way for ever growing content fields

Author Message

Dakke Kadded

Thursday 25 February 2010 12:41:07 pm

I most likely need some feedback from experienced users, since this is a fairly tricky thing to do.
The website will have content that is extensible. Take the following example:
Website has profile of user and cars.
Initially the profile stores:

Name

  • first name
  • last name
  • age

Cars

  • Brand
  • color

For some reason, after a while we would also like to store the wife of the user and info about his pets. So the fields become:

Name

  • first name
  • last name
  • age
  • married to

Cars

  • Brand
  • color

pet

  • name
  • breed

After a while... and so on.
This thus tends to become fairly complicated as such, with fields being added along the way. Provided that there is something like a CCK, I initially thought that CCK would be very good, since it allows a user with not a lot of tech background to easily create fields and reorganize the whole list as such. However, I believe that when creating fields +100, the performance will go down rapidly. In other words, maybe that's not such a good idea.
I'm very new to eZ, so I might have overlooked some options. One vague option I heart of was to create different nodes for each of these fields and link them together (using e.g. ID's or whatever) and present them to the end-user.
So the main question is: with content that will be expanded with sub-tables and sub-sub-tables and so on, is CCK a viable solution or have I been overlooking what is a core feature of eZ?

Gaetano Giunta

Thursday 25 February 2010 3:30:29 pm

Would using a single xml field ina custom datatype be an option (think ezoe)? You would have to develop a lot of validation and display/edit code, but having nested content trees can incur in long development time, and you have to think about relations between objects caches.

Otoh the single-ez-class-with-100-attributes approach can slow down pefrs, but maybe not as much as you fear. It boils down to how many of those there are, and how often they're edited...

Principal Consultant International Business
Member of the Community Project Board

Dakke Kadded

Thursday 25 February 2010 3:42:31 pm

I presume this is what you're referring to:

http://projects.ez.no/ezoe

If so, this sounds indeed quite interesting indeed. Will check it out and thanks for the reply.

Gaetano Giunta

Friday 26 February 2010 6:49:41 am

yes it is - note that by default it is included in every ezp install: it is the main editor for rich text content.

As such:

- it stores a lot of xml ina single attribute

- it is highly extensible in the xml it accepts as valid (but it still validates it)

Otoh it might be overly complex as a starting point...

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 19:47:44
Script start
Timing: Jan 30 2025 19:47:44
Module start 'layout'
Timing: Jan 30 2025 19:47:44
Module start 'content'
Timing: Jan 30 2025 19:47:44
Module end 'content'
Timing: Jan 30 2025 19:47:44
Script end

Main resources:

Total runtime0.0299 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.2734151.2266
Module start 'layout' 0.00770.0042 739.5000220.7188
Module start 'content' 0.01200.0161 960.21881,002.4297
Module end 'content' 0.02800.0018 1,962.648433.9922
Script end 0.0299  1,996.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00309.9695140.0002
Check MTime0.00113.6455140.0001
Mysql Total
Database connection0.00134.490510.0013
Mysqli_queries0.00299.613130.0010
Looping result0.00000.114010.0000
Template Total0.00144.710.0014
Template load0.00113.541110.0011
Template processing0.00031.120010.0003
Override
Cache load0.00072.233710.0007
General
dbfile0.00113.820980.0001
String conversion0.00000.035940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs