Re: PHP binding problems (Was: [midgard-dev] Midgard and Ruby/Scriptor)
Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Thu, 2 Mar 2006 12:18:22 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
"Jukka Zitting" <[email protected]> wrote: > > 1. Object's constructor ( we talked about yesterday ) > > > > Whatever OO rules you would like to use and whatever OO terminology should > > describe your needs, we hit the wall ( IMO ) with such "little" detailed issue like > > value returned from constructor. > > This is more a question of implementation details than a problem in > the API itself. You can implement OO semantics even with just plain > old functions and arrays if you need to, so I really don't think that > this is an inherent PHP problem. I will correct my mail :) My point was that we do not have API problem but implementation details' one ;) > The main problem here seems to be that both me and Torben are inclined > to speak in terms of higher level OO concepts, while you are facing > trouble translating those concepts to PHP details. Oh man :). I try to repeat in every mail that I have huge problems with details :) > > 2. midgard_reflection_property > > > > I changed a bit this part of API which now is "optimized" for midgard-php , but > > breaks some GObject binding conventions. > > This is really problematic. Yep, I will change this when midgard_property_class will be implemented. > The Zend resource handler is quite solid in my opinion. In my and in valgrind's opinion it triggers nothing but memory leaks. But I may be wrong here. > The resource memory should always get freed when the request ends. If > not, then this is a bug that we can fix. If we need to have the > resources freed earlier we can implement a QB destructor or an > explicit $qb->close() method. I don't see a problem here. It means that we should also provide PHP related objects' references counts. > > Another issue related to " getting the "new Midgard API" finished and working" > > is the fact that there's almost 0 threads on dev list about midgard-php binding. > > Midgard-php binding is difficult if you think about 'what I want from OO language' > > and 'how binding may be done'. > > IMO the difficulty is more caused by the idiosynchronicity of the Zend > API than any problem with the OO concepts in midgard-core. I can be of > some assistance with the PHP stuff but I'm not sure how much time I > can dedicate for this. As I said I need feedback from midgard-php developers. Piotras