You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Chris Chabot <ch...@google.com> on 2009/01/08 19:22:24 UTC

Re: Please add prefx to all of the php-shindig classes

Hi Kousuke,

It's a tricky situation really, on the one end there's nothing as annoying
and as keyboard and screen realastate consuming as typing Shindig_FooBar
everywhere, also right now the class names are identical between the php and
java versions of shindig, so much of the basic documentation works for both
versions, changing all the class names would certainly break this.

On the other hand, as you've noticed, this can create conflicts when your
straight up including shindig in your project.

At the moment I'm hoping php 6 will be out quickly enough that we'll be able
to skip having to solve this by poor man's name spacing (manually prefixing
all class names), because php 6 will have 'real' namespacing (well real
enough to be functional).

A work around you could do to prevent such problems is to use the metadata
interface to get gadget information instead of including the php files
directly, this way your project and shindig live in their own name space and
the only overlap would be in the data service implementations

On Thu, Jan 8, 2009 at 5:33 AM, Kousuke Ebihara <eb...@tejimaya.com>wrote:

> Hi.
>
> I'm developer of  OpenPNE Project that is Japanese open-source project
> creating the SNS engine "OpenPNE".
> OpenPNE3 is dependent on symfony, and OpenPNE includes the Shindig
> libraries.
>
> But we're getting into trouble. We want to create a "Message" model, so we
> wrote a setting file for it. And symfony tries to build a "Message" model
> ... but it is unsuccessful because the Message class has already been
> declared in Shindig.
>
> I created an issue about this:
> https://issues.apache.org/jira/browse/SHINDIG-823
>
> Do you have a plan to solve this?
> We need prefixed-version of Shindig now, so we can create a patch if a
> policy of adding prefix is decided.
> (But I think adding prefix is not easy, so a commiter should do it for
> keeping a code stability of Shindig)
>
> Thanks.
>
> --
> Kousuke Ebihara
> ebihara@tejimaya.com
>
> OpenPNE Project : http://www.openpne.jp/
>

Re: Please add prefx to all of the php-shindig classes

Posted by Chris Chabot <ch...@google.com>.
Wasn't sure it would be added in 5.3 but really happy to hear it will be :)

On Thu, Jan 8, 2009 at 7:27 PM, Ropu <ro...@gmail.com> wrote:

> no need to wait to PHP 6
>
> Namespaces are available in PHP as of PHP 5.3.0.
>
>
> http://us3.php.net/manual/en/language.namespaces.php
>
>
> ropu
>
>
> On Thu, Jan 8, 2009 at 10:22 AM, Chris Chabot <ch...@google.com> wrote:
>
> > Hi Kousuke,
> >
> > It's a tricky situation really, on the one end there's nothing as
> annoying
> > and as keyboard and screen realastate consuming as typing Shindig_FooBar
> > everywhere, also right now the class names are identical between the php
> > and
> > java versions of shindig, so much of the basic documentation works for
> both
> > versions, changing all the class names would certainly break this.
> >
> > On the other hand, as you've noticed, this can create conflicts when your
> > straight up including shindig in your project.
> >
> > At the moment I'm hoping php 6 will be out quickly enough that we'll be
> > able
> > to skip having to solve this by poor man's name spacing (manually
> prefixing
> > all class names), because php 6 will have 'real' namespacing (well real
> > enough to be functional).
> >
> > A work around you could do to prevent such problems is to use the
> metadata
> > interface to get gadget information instead of including the php files
> > directly, this way your project and shindig live in their own name space
> > and
> > the only overlap would be in the data service implementations
> >
> > On Thu, Jan 8, 2009 at 5:33 AM, Kousuke Ebihara <ebihara@tejimaya.com
> > >wrote:
> >
> > > Hi.
> > >
> > > I'm developer of  OpenPNE Project that is Japanese open-source project
> > > creating the SNS engine "OpenPNE".
> > > OpenPNE3 is dependent on symfony, and OpenPNE includes the Shindig
> > > libraries.
> > >
> > > But we're getting into trouble. We want to create a "Message" model, so
> > we
> > > wrote a setting file for it. And symfony tries to build a "Message"
> model
> > > ... but it is unsuccessful because the Message class has already been
> > > declared in Shindig.
> > >
> > > I created an issue about this:
> > > https://issues.apache.org/jira/browse/SHINDIG-823
> > >
> > > Do you have a plan to solve this?
> > > We need prefixed-version of Shindig now, so we can create a patch if a
> > > policy of adding prefix is decided.
> > > (But I think adding prefix is not easy, so a commiter should do it for
> > > keeping a code stability of Shindig)
> > >
> > > Thanks.
> > >
> > > --
> > > Kousuke Ebihara
> > > ebihara@tejimaya.com
> > >
> > > OpenPNE Project : http://www.openpne.jp/
> > >
> >
>
>
>
> --
> .-. --- .--. ..-
> R  o  p  u
>

Re: Please add prefx to all of the php-shindig classes

Posted by Ropu <ro...@gmail.com>.
no need to wait to PHP 6

Namespaces are available in PHP as of PHP 5.3.0.


http://us3.php.net/manual/en/language.namespaces.php


ropu


On Thu, Jan 8, 2009 at 10:22 AM, Chris Chabot <ch...@google.com> wrote:

> Hi Kousuke,
>
> It's a tricky situation really, on the one end there's nothing as annoying
> and as keyboard and screen realastate consuming as typing Shindig_FooBar
> everywhere, also right now the class names are identical between the php
> and
> java versions of shindig, so much of the basic documentation works for both
> versions, changing all the class names would certainly break this.
>
> On the other hand, as you've noticed, this can create conflicts when your
> straight up including shindig in your project.
>
> At the moment I'm hoping php 6 will be out quickly enough that we'll be
> able
> to skip having to solve this by poor man's name spacing (manually prefixing
> all class names), because php 6 will have 'real' namespacing (well real
> enough to be functional).
>
> A work around you could do to prevent such problems is to use the metadata
> interface to get gadget information instead of including the php files
> directly, this way your project and shindig live in their own name space
> and
> the only overlap would be in the data service implementations
>
> On Thu, Jan 8, 2009 at 5:33 AM, Kousuke Ebihara <ebihara@tejimaya.com
> >wrote:
>
> > Hi.
> >
> > I'm developer of  OpenPNE Project that is Japanese open-source project
> > creating the SNS engine "OpenPNE".
> > OpenPNE3 is dependent on symfony, and OpenPNE includes the Shindig
> > libraries.
> >
> > But we're getting into trouble. We want to create a "Message" model, so
> we
> > wrote a setting file for it. And symfony tries to build a "Message" model
> > ... but it is unsuccessful because the Message class has already been
> > declared in Shindig.
> >
> > I created an issue about this:
> > https://issues.apache.org/jira/browse/SHINDIG-823
> >
> > Do you have a plan to solve this?
> > We need prefixed-version of Shindig now, so we can create a patch if a
> > policy of adding prefix is decided.
> > (But I think adding prefix is not easy, so a commiter should do it for
> > keeping a code stability of Shindig)
> >
> > Thanks.
> >
> > --
> > Kousuke Ebihara
> > ebihara@tejimaya.com
> >
> > OpenPNE Project : http://www.openpne.jp/
> >
>



-- 
.-. --- .--. ..-
R  o  p  u