Forums / Developer / Newbie - before choosing right CMS solution.....

Newbie - before choosing right CMS solution.....

Author Message

Aleksander Lech

Sunday 14 August 2005 12:47:31 am

Hi there!

I'm trying to make decission about choosing right CMS solution for my company's client.

ezPublish looks pretty cool, but I have now one question.

Is there possibility to make db queries in "PHP way" - I mean - in some php file I have script line which connects me to the db, than I have an SQL query, which (when executed) stores the result in some resultset variable. I can then use the result in the way I want.

Can I do this in ezPublish the same way or do I have to create classes, objects etc. I'd never had to use php classes and objects before :( And after long hours of ezp forum reading, I'm confused a little.

Greetings
Aleksander

Gabriel Ambuehl

Sunday 14 August 2005 2:21:56 am

You will likely not need to define your own SQL for most tasks. If you need to, you'll most likely have to write an extension (possibly template operator) and that does need PHP knowledge.

Visit http://triligon.org

Aleksander Lech

Sunday 14 August 2005 3:59:19 am

Well, most likely I will need to define my own SQL queries, because there will be a lot of non-ezPublish tables which I'll have to search. So probably there's no easy way to incorporate custom php scripts and pass their results to ezP templates?

I know, that I can create extension/module but - according to this: http://ez.no/products/ez_publish_cms/documentation/development/extensions/module/module_tutorial_part_1
do I really need to create such complicated structure and fuctions to extract data from non-ezP tables?

Greetings
Aleksander

Gabriel Ambuehl

Sunday 14 August 2005 4:25:10 am

If you need custom databases, it's probably necessary, yes.

Visit http://triligon.org

Aleksander Lech

Sunday 14 August 2005 4:45:02 am

Thank you very much Gabriel for ypur quick responses.
I'll start learning ezP soon then.

Aleksander

Bruce Morrison

Sunday 14 August 2005 2:51:39 pm

Hi Aleksander

I know, that I can create extension/module but - according to this: http://ez.no/products/ez_publish_...nsions/module/module_tutorial_part_1
do I really need to create such complicated structure and fuctions to extract data from non-ezP tables?

While it may seem complicated once you get your head around it you will find that most of the functions you require are provided by eZ.

Also look at the eZPersistentObject class
http://pubsvn.ez.no/doxygen/classeZPersistentObject.html

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Gabriel Ambuehl

Sunday 14 August 2005 3:07:52 pm

The fact that functions are provided by eZ doesn't necessarily mean it's easier. In some case one could truly argue it to be much harder if you try to use the integrated API as opposed to just firing SQL against the DB...

Visit http://triligon.org

Bruce Morrison

Sunday 14 August 2005 5:00:05 pm

Hi Gabriel

The fact that functions are provided by eZ doesn't necessarily mean it's easier. In some case one could truly argue it to be much harder if you try to use the integrated API as opposed to just firing SQL against the DB...

Sure and sometimes you have to do that. It all depends on what you need to do and how complex that database structure is.

What I was pointing out is that the eZ framework provides a lot of functionality that if used can save a lot of time. It may seem complicated on the surface but once you get used to using it, it can be quite simple*.

* See paragraph 1 ;)

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

eZ debug

Timing: Jan 18 2025 21:14:46
Script start
Timing: Jan 18 2025 21:14:46
Module start 'content'
Timing: Jan 18 2025 21:14:48
Module end 'content'
Timing: Jan 18 2025 21:14:48
Script end

Main resources:

Total runtime1.4294 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.8438180.8125
Module start 'content' 0.00731.4160 768.6563634.7656
Module end 'content' 1.42330.0061 1,403.421950.0703
Script end 1.4293  1,453.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2181140.0002
Check MTime0.00130.0889140.0001
Mysql Total
Database connection0.00100.068910.0010
Mysqli_queries1.369095.7731750.0183
Looping result0.00090.0612730.0000
Template Total1.385696.920.6928
Template load0.00200.139020.0010
Template processing1.383696.798220.6918
Template load and register function0.00020.011110.0002
states
state_id_array0.00100.067710.0010
state_identifier_array0.00230.160820.0011
Override
Cache load0.00180.1233440.0000
Sytem overhead
Fetch class attribute can translate value0.00190.136330.0006
Fetch class attribute name0.00170.119790.0002
XML
Image XML parsing0.00080.055330.0003
class_abstraction
Instantiating content class attribute0.00000.0019100.0000
General
dbfile0.00130.0885180.0001
String conversion0.00000.000430.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/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
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs