Extend the content object model

Author Message

Alain Sahli

Wednesday 01 December 2010 1:11:11 am

Hello,

Did you ever think to extend the content object model ? I mean OO can be much more. For example one could imagine inheritance between content classes. Or create specific methods related to one content class.

A concrete example : A content class Page with classic attributes like "Title" "Tags" "Keywords" "Author" etc.. and all the other "pages" could inherit from this one :D

Another one : Define a method getVCS on the user content class. This method return all the user infos in a VCS format.

For me it sounds great but I can imagine that it's really not easy to implement and handle :D

http://www.wess.ch
eZ Publish Certified developer : http://auth.ez.no/certification/verify/272583

Igor Vrdoljak

Wednesday 01 December 2010 2:58:56 am

Hi Alain

We often think about these ideas also, especially when developing a more complex "custom" solution in eZ Publish (one that involves many custom classes and relations between them to model the business case).

For creating hierarchical relations between classes we usually fall back to using standard eZ features like positioning of objects in content tree and/or defining custom relations between related classes. Although, as you say, sometimes it would be great to these features baked in.

I suppose that this is just a feature that proportionally small number of installations really need, and it would (I suppose) simply take too much effort to develop.

http://www.netgen.hr/eng
http://twitter.com/ivrdoljak

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 01:02:12
Script start
Timing: Jan 30 2025 01:02:12
Module start 'layout'
Timing: Jan 30 2025 01:02:12
Module start 'content'
Timing: Jan 30 2025 01:02:12
Module end 'content'
Timing: Jan 30 2025 01:02:12
Script end

Main resources:

Total runtime0.0162 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1328151.2109
Module start 'layout' 0.00530.0030 739.343836.6719
Module start 'content' 0.00830.0064 776.015690.0625
Module end 'content' 0.01470.0015 866.078133.9766
Script end 0.0162  900.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002716.4673140.0002
Check MTime0.00127.4127140.0001
Mysql Total
Database connection0.00063.958410.0006
Mysqli_queries0.002314.058130.0008
Looping result0.00000.167610.0000
Template Total0.00117.010.0011
Template load0.00095.388610.0009
Template processing0.00031.572810.0003
Override
Cache load0.00063.501310.0006
General
dbfile0.00159.197180.0002
String conversion0.00000.061740.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