Deprecated template language elements

Author Message

Piotrek Karaś

Sunday 15 April 2007 12:27:05 am

Hello,

I stood my first eZ publish steps already in 3.8's and in its documentation I found a number of template language elements marked 'deprecated'. Now 3.9's are already out there with a solid amount of such elements still being used. The major one is <b>section</b> control structure. So I started to wonder if it was actually a good idea to have avoided all the deprecated items in my templates? How come 3.9 still uses <b>section</b>? Is it just the matter of time and energy consuming transcription, or are there any other reasons? Is there any instruction on how to understand 'deprecated' in the eZ publish context?

Just wondering...

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

kracker (the)

Sunday 15 April 2007 1:15:07 am

<i>Do as we say not as we do ... </i> ?:P or <i>Pay no attention to the man behind the curtain!</i> ;D

Seriously though for a moment. The stock design templates still do contain deprecated template operators. I'd imagine these are kept in place until the next big thing hits the scene, 'eZ Publish 4'. Which at the least might have an opportunity to consider maintaining backwards compatibility or moving forward. I'd imagine we will see eZ moving forward...

Deprecated often refers to features which are no longer recommended for use yet may still be included in an effort to provide compatibility for users of older versions of eZ Publish. While it is best not to rely on deprecated functionality, eZ provides the users with a lot of freedom to slowly adapt their own compatibility with the latest supported features as it makes sense to the end user. Compatibility like content can be King.

Stay tuned ...

//kracker

<i>Sole : mansbestfriend : Judges Ain't Nothing But Guts With A Halo</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Piotrek Karaś

Sunday 15 April 2007 12:48:29 pm

Yes, I agree, backward compatibility is very appreciated and I have nothing against it as well as I understand why new standards aren't incorporated at once. It just feels weird when you modify (recode) most of the out-of-the-box templates :)
Greetings!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Monday 16 April 2007 1:35:54 am

For the 3.x series the rule has been to use the new syntax on new templates, like in ezwebin / Website interface.
Even if the template component syntax is closer to the 'new syntax' then the 'old', its still differences:
http://ez.no/doc/components/view/trunk/(file)/Template_syntax.html#template-language

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Monday 16 April 2007 1:35:06 pm

@André R.: The components syntax looks promising at first glance. Can you just please explain how are eZ publish and eZ components exactly related (maybe a link)? I'm considerably new to eZ world and I haven't figured it out yet. Will future versions eZ publish port to eZ components? Sorry for silly questions :)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Monday 16 April 2007 3:39:48 pm

Re: eZ Publish and eZ Components
eZ Publish 4.0 will be php 5 ( probably 5.1.1 and up like eZ Components ) based and use eZ Components:
http://ez.no/community/news/community_newsletter_2_9th_february_2007

Note however that not all the components will be used for eZ Publish 4.0, some will have to wait for later versions either because of time constraints or missing features in the component them self.

Using components have clear advantages, the have a clear api, well documented and are unit tested as individual components(building blocks). On top of that they are written purely for php5+.

Expect more on this during the summer conference :)

So to sum this thread up, there are no plan to this day to remove deprecated template elements in 3.x lifespan, but writing code in new syntax will give you two adwantages:
1. It's easier to read and maintain
2. It's give you an edge when you some time next year start migrating existing code to eZ Publish 4.0

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Monday 16 April 2007 3:56:07 pm

No further doubts ;) Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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 31 2025 06:24:02
Script start
Timing: Jan 31 2025 06:24:02
Module start 'layout'
Timing: Jan 31 2025 06:24:02
Module start 'content'
Timing: Jan 31 2025 06:24:02
Module end 'content'
Timing: Jan 31 2025 06:24:02
Script end

Main resources:

Total runtime0.0155 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.0079 588.1484151.2109
Module start 'layout' 0.00790.0029 739.359436.6484
Module start 'content' 0.01070.0037 776.0078102.1250
Module end 'content' 0.01440.0011 878.132845.9922
Script end 0.0155  924.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002214.4504140.0002
Check MTime0.00106.1886140.0001
Mysql Total
Database connection0.00106.606610.0010
Mysqli_queries0.004327.682130.0014
Looping result0.00000.167510.0000
Template Total0.00085.410.0008
Template load0.00074.260010.0007
Template processing0.00021.089610.0002
Override
Cache load0.00042.893810.0004
General
dbfile0.00031.727380.0000
String conversion0.00000.055340.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