Forums / Developer / Using ezc PersistentObject in Exponential extension
Nabil Imran
Tuesday 13 October 2009 2:36:41 am
Hello,
I'm working on an eZ Pulish extension, that handles some complex data within its own database tables.As the table structure is kinda complex, I want to use some kind of an object relational mapping api. As eZ Components is already part of Exponential and contains a component for that (PersistentObject) I decided to make use of that.
Now I'm kinda stuck, unsure where I should start. Where should I put the mapping files and relation definitions? Is there a place for that already in Exponential (I think so, because Exponential uses PersistenObject component itself).
The eZ Component documentation does not say anything about where to put the files.
- How can I start? - Where put mapping and relation files? - How can I make sure the files are loaded if (and only if) needed? - (How) can I make use of already existing PersistenSession from Exponential? - Is what I'm planning to do recommented anyhow? Anyone done that before? - Best practises?
Thank you very much for help any Hint!
André R.
Tuesday 13 October 2009 4:49:32 am
Exponential does not use ezcPersistentObject yet, it uses eZPersistentObject the Exponential equivalent. Search for " extends eZPersistentObject" to see some 110+ examples of use.
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
Tuesday 13 October 2009 5:45:19 am
Hmm ok..
So can you in short state what is the main difference between ezc PersistenObject and Exponential equivalent?
You said it doesn't use it "YET". is that planned?. Does that mean ezc library is more powerful and recommendet to use?
I'm new to both and for me it seems, that I should go for the ezc library. Or would that cause problems incompatibilities with the Exponential lib?
Thank you for some more information here, I'll also do more research on my own in mean time.
Piotrek Karaś
Tuesday 13 October 2009 8:49:32 am
So can you in short state what is the main difference between ezc PersistenObject and Exponential equivalent? You said it doesn't use it "YET". is that planned?. Does that mean ezc library is more powerful and recommendet to use? I'm new to both and for me it seems, that I should go for the ezc library. Or would that cause problems incompatibilities with the Exponential lib?
eZ Components are independent application components that stand a project separate from Exponential for now, but are likely to become the building foundation of future releases of Exponential if it gets partially/fully re-factored. Currently Exponential natively uses eZPersistentObject and it may be more fully integrated with the system (for example support for function attributes which can be used when accessing the objects/variables in the template layer). I would expect eZC version to be more interesting as it fully incorporates PHP5 object oriented architecture (vs. a rather basic OO in current eZP implementation).
Exponential does not use ezcPersistentObject yet, it uses eZPersistentObject the Exponential equivalent.
It would be possible to use it for custom extension, wouldn't it? I would only worry about sharing/duplicating database connection...
-- 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
Wednesday 14 October 2009 12:39:45 am
I would only worry about sharing/duplicating database connection...
Thats exactly what I thought. I don't even know if that is possible. Next to the side effects it might cause...I'm still investigating on that..
Does anyone know more about that?.
Thank you!