Dependancy on system generated ID's is bad design

Author Message

Willie Seabrook

Thursday 28 August 2003 2:31:36 am

In my opinion, the dependance on system generated (essentially) random id numbers is bad. This goes for sections, folders, nodes etc.

For example, if your coding to show different things in your main template based upon section, then you must compare with section id. This is fine untill you have to swap over to a new version or someone changes something. You should be able to access a sections name (that can be kept constant) and hence won't need to make changes to template code all the time.

Regards,
Willie

Jan Borsodi

Thursday 28 August 2003 3:59:28 am

A good point, you can already do this for content classes but it should be extended to other areas of eZ publish as well.
For instance being able to give an object or node a unique on the site which can be used in the template would be nice. Makes it easier to move the item around as well.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Volker Lenz

Wednesday 03 September 2003 2:55:43 pm

Isn't the new explicit naming of navigationpart identifiers an approach to resolve this ID-based design from ezp3.2 on (at least in the case of sections ?)

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 18 2025 10:58:22
Script start
Timing: Jan 18 2025 10:58:22
Module start 'layout'
Timing: Jan 18 2025 10:58:22
Module start 'content'
Timing: Jan 18 2025 10:58:23
Module end 'content'
Timing: Jan 18 2025 10:58:23
Script end

Main resources:

Total runtime0.6152 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.4922152.6406
Module start 'layout' 0.00740.0038 742.132839.4766
Module start 'content' 0.01120.6023 781.6094569.8906
Module end 'content' 0.61350.0016 1,351.500012.1250
Script end 0.6151  1,363.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.6313160.0002
Check MTime0.00210.3370160.0001
Mysql Total
Database connection0.00120.187910.0012
Mysqli_queries0.562591.4344590.0095
Looping result0.00070.1127570.0000
Template Total0.579494.220.2897
Template load0.00200.329020.0010
Template processing0.577393.848120.2887
Template load and register function0.00020.034010.0002
states
state_id_array0.00160.261910.0016
state_identifier_array0.00070.118720.0004
Override
Cache load0.00160.2556140.0001
Sytem overhead
Fetch class attribute can translate value0.00100.159830.0003
Fetch class attribute name0.00150.239950.0003
XML
Image XML parsing0.00130.208830.0004
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00140.2230230.0001
String conversion0.00000.001940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs