Doubt about folders Zend and library/Zend and overwriting

General development questions

Doubt about folders Zend and library/Zend and overwriting

Postby fgsl » Mon Mar 26, 2012 11:18 pm

Hello, friends.

I have a doubt about the purpose of folder Zend in root of tine20.

Tell me, is it there for overwrite original implementation of Zend Framework, right? Because the root folder is before library folder in include_path.

Very well, I have a doubt about where I can put a modified Zend class. In fact, I have found a patch of Zend_Mail that does what I want, but it still not accepted by Zend Framework. I could change Zend_Mail from this patch and put it into Zend folder of root. But I thought about it and it didn't seems a good thing to me.

I think that we must not change the Zend Framework classes, but to extend them. Instead to keep a Zend folder over another, we could to use extended classes like Tine_Something, no?

Perhaps I am saying foolishness, but it's strange to have two Zend folders.

Well, but my doubt is this:
If I want to use a modified Zend Class, and that don't affect the Tine 2.0 working, may I put it into Zend folder of root?
Or should I to create and extension and put it into library folder? Something like Expresso_Mail (Expresso is our customization of Tine 2.0).

Thank you!
Flávio Gomes da Silva Lisboa
BS in computer science
postgraduate degree in enterprise applications using object oriented programming and Java technology

Zend PHP Certified Engineer
Zend Framework Certified Engineer
User avatar
fgsl
Tine 2.0 Community Contributor
 
Posts: 44
Joined: Thu Jul 07, 2011 2:24 pm
Location: Brazil

Re: Doubt about folders Zend and library/Zend and overwritin

Postby lkneschke » Tue Mar 27, 2012 4:48 pm

Hello Flávio!

fgsl wrote:I think that we must not change the Zend Framework classes, but to extend them. Instead to keep a Zend folder over another, we could to use extended classes like Tine_Something, no?


You're right. That would be the best/correct way.

But unfortunately that's not always possible. Some classes include Zend_Mail internal for example. If you fix another class and name it different, your fixes wan't get used.

Other classes need a one line fix in a function of over 100 lines. Also in this case it is more save to copy the whole class, to make sure everything works as expected.

In general we try to fix classes in our repository and place them into the Zend directory. But in the past the patch process was very complicated, so we lost the interest to push the changes upstream.
For ZF 2.0 the rules changed, so we should try again to push our changes upstream and git rid of our own ZF classes.

Does that answer your question?
Lars Kneschke
Head of Tine 2.0

Visit tine20.com for commercial support / consulting / development.
Visit tine20.net for Tine 2.0 hosting.
User avatar
lkneschke
Tine 2.0 Core Developer
 
Posts: 974
Joined: Tue Nov 06, 2007 7:31 pm
Location: Hamburg, Germany

Re: Doubt about folders Zend and library/Zend and overwritin

Postby fgsl » Wed Mar 28, 2012 2:08 pm

Yes, perfectly. Thank you, Lars. It is also good to know that you are already thinking about Zend 2.0.
Flávio Gomes da Silva Lisboa
BS in computer science
postgraduate degree in enterprise applications using object oriented programming and Java technology

Zend PHP Certified Engineer
Zend Framework Certified Engineer
User avatar
fgsl
Tine 2.0 Community Contributor
 
Posts: 44
Joined: Thu Jul 07, 2011 2:24 pm
Location: Brazil


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests

Startseite
NewsDemoDownloadForumWikiBlog
Support
Support at first hand!
If the forum does not help anymore ... Professional support is available directly from our Tine2.0 core Developers.

more »