Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] propel / c++

propel
Discussion topic

Back to topic list

Re: [propel-dev] propel / c++

Reply

Author Pedram Nimreezi <zenstyle at gmail dot com>
Full name Pedram Nimreezi <zenstyle at gmail dot com>
Date 2006-07-22 13:28:27 PDT
Message Yeah it's cool and possible, I considered writing my framework as a PECL, I
actually did initially and then
decided to get it right as PHP and then consider a rewrite as a c/c++
version but its effectively
equivalent to hitting the NOS button on your PHP apps... and c is strikingly
similar to PHP so
you can do a profile of a request, spot the slow ass culprits and use your
existing PHP knowledge
to write an equivalent replacement.. unfortunately PECL documentation is
spotty at best, and
explaining it and writing is that much more difficult... I might make a
tutorial on it though if I were
prompted enough ;-)


On 7/22/06, Alan Pinstein <apinstein at mac dot com> wrote:
>
> Ok well that's cool then! I wasn't aware that it was possible.
> Alan
>
> On Jul 22, 2006, at 1:49 PM, Pedram Nimreezi wrote:
>
> It can... If it couldn't I couldn't for example.. make a Memcache Session
> Handler from the Memcache class
> provided by the Memcache PECL nor would it make sense to make for example
> a propel-gen-pecl-c++.
>
>
> On 7/22/06, Alan Pinstein <apinstein at mac dot com> wrote:
> >
> > SDO looks pretty interesting. Never heard of it.
> > However, I still don't think you answered my question.
> >
> > You proposed using propel-gen to create C++ classes for objects that
> > could be compiled as a PECL, to get the execution speed of C++ with the
> > flexibility of Propel.
> >
> > However, the propel generator creates a PHP object hierarchy, which you
> > then modify the Object.php and ObjectPeer.php classes with your business
> > logic.
> >
> > I am not aware of the ability to expose classes via PECL. All the times
> > I have used it, it can return objects that implement interfaces, but never
> > actual PHP classes that could be extended.
> >
> > For instance, if you use propel-gen-c++ to generate a MyObjectBase* as a
> > PECL, I don't think you can then, in PHP, do:
> >
> > class MyObject extends MyObjectBase
> > {
> > function customCode()
> > {
> > // do something
> > }
> > }
> >
> > I don't believe this is possible, but I am not certain. And if it's not,
> > the idea of propel-gen-c++ doesn't seem useful.
> >
> > I know you said that it was done in the links you sent, but I don't have
> > time to dig through piles of links and CVS trees looking for this example.
> > Feel free to provide a direct link showing how this is done.
> >
> > Thanks!
> > Alan
> >
> > On Jul 22, 2006, at 12:39 PM, Pedram Nimreezi wrote:
> >
> > Am I sure it would be a good idea? Well I do have at least *some*
> > evidence
> > I mean IBM hasn't really done open source PHP until they did SDO which
> > is
> > a C++ and PHP API similar in purpose and design to creole and propel,
> > SDO
> > is to PDO as propel is to creole, meaning SDO relies on PDO for its data
> > base
> > accessibility. PDO unlike creole is written in C (afaik). SDO unlike
> > propel in C++,
> > PDO and SDO unlike propel and creole must be installed into PHP either
> > statically
> > through ./configure or dynamically through phpize, moved to the location
> > specified in
> > php.ini as extension_dir = and loaded like you would a standard .dll or
> > .so extension.
> > SDO does not have "optionally" a script-able interface to itself from
> > PHP, it actually
> > requires it since SDO was never completely ported to C++ from PHP, or
> > they couldn't
> > find the time to write the remaining portions so those objects are
> > written in PHP 5, there
> > is no PHP 4 version as SDO remains completely dependent on PDO for
> > database access.
> > Therefore I think it would be a *good* idea because they can be similar
> > in speeds and propel
> > can obviously spit out PHP 4, PHP 5 and now C++, why not PECL? or why
> > not write the other
> > classes as PHP 4 and PHP 5 compatible and then refactor that into a PECL
> > so the only
> > scripting is done on initialization code, makes little sense not to
> > pursue this because *some*
> > people cannot personally install an extension in their web server which
> > would actually lower
> > the load on the server and increase the throughput for this *good* type
> > of programming.
> > I would just like to say that I don't use SDO, I use propel and
> > creole because I just like to,
> > I rewrote creole and propel to be PHP 4 AND PHP 5 compatible and like
> > that much better in
> > my "rapid" framework whose design includes things for SEO and SOA.
> > I've requested before at least for mine or the PHP 4 version be
> > dual licensed under LGPL
> > and BSD License, so that I can dual license MY framework under BSD
> > license as well, also
> > SDO is provided under much less restriction than the LPGL. I think
> > helping make these patterns
> > for advanced web application programming better and faster will help
> > everyone. I know I wouldn't
> > of had any reason to dedicate a couple years using propel and creole, or
> > want to be involved had
> > it not been for such good open source contributors like Hans, the PHP
> > user groups and yourself.
> >
> >
> > Ps, Here's a list of sites on the matter that may shed some light on SDO
> > and PECL implementations
> > where you can subclass classes and more. Don't forget to look all in the
> > CVS code and tests..
> >
> >
> > http://us2.php.net/sdo
> > http://www.zend.com/​pecl/tutorials/sdo.p​hp
> > http://www-128.ibm.c​om/developerworks/li​brary/os-sdophp/
> > http://en.wikipedia.​org/wiki/Metadata
> >
> >
> >
> >
> > On 7/22/06, Alan Pinstein < apinstein at mac dot com> wrote:
> > >
> > > Are you sure? Would you be able to subclass classes provided in PECL?
> > > One still needs to write custom business logic on their propel
> > > objects... how would that work?
> > >
> > > I don't know much about PECL so LMK!
> > >
> > > Alan
> > >
> > > On Jul 22, 2006, at 11:11 AM, Pedram Nimreezi wrote:
> > >
> > > Ok.. but making them as PECL's is a good idea too... I might do
> > > that...
> > >
> > >
> > >
> >
> >
> > --
> > ~
> > Pedram Nimreezi -- President/Senior Engineer
> > Major Computing, Inc
> > --
> >
> > Not by age, but by knowledge is wisdom acquired.
> >
> >
> >
>
>
> --
> ~
> Pedram Nimreezi -- President/Senior Engineer
> Major Computing, Inc
> --
>
> Not by age, but by knowledge is wisdom acquired.
>
>
>


--
~
Pedram Nimreezi -- President/Senior Engineer
Major Computing, Inc
--

Not by age, but by knowledge is wisdom acquired.
Attachments

« Previous message in topic | 10 of 18 | Next message in topic »

Messages

Show all messages in topic

propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-21 09:11:01 PDT
     Re: [propel-dev] propel / c++ Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2006-07-21 09:30:52 PDT
         Re: [propel-dev] propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-21 09:41:38 PDT
             Re: [propel-dev] propel / c++ Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2006-07-22 08:11:08 PDT
                 Re: [propel-dev] propel / c++ Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-07-22 08:34:07 PDT
                     Re: [propel-dev] propel / c++ Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2006-07-22 09:39:42 PDT
                         Re: [propel-dev] propel / c++ Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-07-22 09:57:10 PDT
                             Re: [propel-dev] propel / c++ Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2006-07-22 10:49:06 PDT
                                 Re: [propel-dev] propel / c++ Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-07-22 12:13:38 PDT
                                     Re: [propel-dev] propel / c++ Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2006-07-22 13:28:27 PDT
                         RE: [propel-dev] propel / c++ Soenke Ruempler <ruempler at topconcepts dot com> Soenke Ruempler <ruempler at topconcepts dot com> 2006-07-24 03:11:41 PDT
                             Re: [propel-dev] propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-24 03:49:34 PDT
                                 RE: [propel-dev] propel / c++ Soenke Ruempler <ruempler at topconcepts dot com> Soenke Ruempler <ruempler at topconcepts dot com> 2006-07-24 04:07:02 PDT
                                     Re: [propel-dev] propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-24 04:17:38 PDT
                                         Re: [propel-dev] propel / c++ hlellelid Hans Lellelid 2006-07-24 05:29:07 PDT
                                             Re: [propel-dev] propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-24 06:19:26 PDT
                                                 Re: [propel-dev] propel / c++ hlellelid Hans Lellelid 2006-07-24 06:20:06 PDT
                                                 Re: [propel-dev] propel / c++ Roel Vanhout <roel dot vanhout at gmail dot com> Roel Vanhout <roel dot vanhout at gmail dot com> 2006-07-24 08:32:59 PDT
Messages per page: