librelist archives

« back to archive

Re: [photon.users] MongoDB and Photon

Re: [photon.users] MongoDB and Photon

From:
alex knol
Date:
2011-05-09 @ 22:14
Thanks, for the explanation, it makes sense and I probably could have
deducted it from the 'micro' philosophy. I''l have a go with it.
I'd also like to compare it to http://mandango.org/.

.....and yes I'm used to Doctrine (Mysql)

Best Regards,
Alex Knol
Movil: +34 693 206 868
Company: Pumiwex S.L.U.
PostBox: Apartado Correos 842, Camarles
Delivery / Fiscal: Plaza Don Diego de Leon 3, Camarles (Tarragona)
Postal Code: 43894
Country: Espana Pumiwex S.L.
CIF B43969187



On Mon, May 9, 2011 at 11:03 AM, Loic d'Anterroches <loic@ceondo.com> wrote:

> Hello,
>
> > Maybe a stupid question, but I just discovered Photon-project. I ike the
> > concept and like to start hacking around with it.
> > Can someone give me some hints on where / how to tie in the mongodb
> driver.
> >
> > Is there a short tutorial somewhere out there?
>
> Not really. This comes from my experience with Django, many frameworks,
> writting an ORM and complex web applications. I basically found that the
> current MongoDB driver is good enough to be used "directly". That is,
> you just put your connection data in your config file:
>
> return array( ...
>              'mongo_dsn' => 'connection-string',);
>
> and in yyour code, you get the value directly:
>
> $conn = new \Mongo(Conf::f('mongo_dsn', 'mongodb://localhost:27017'));
>
> Some people are fans of the doctrine ORM, other like MySQL raw, etc. To
> avoid issues, you can see that for everything in the core framework
> which requires a storage, I am providing a clear interface and 2 ways to
> store the data (usually file + memory). The goal is to be really
> database independant.
>
> Of course usage patterns will emerge, after 5 projects using MongoDB, I
> will start to have a collections of tools to do the usual things, I will
> then bundle them in an app to easily reuse them.
>
> My goal is really to keep Photon itslef database independant (but it is
> of course fine to create a mongodb or mysql only solution using Photon).
>
> I hope it helps, do not hesitate to ask more questions if you have some.
>
> loïc
>
> --
> Indefero - Project management and code hosting - http://www.indefero.net
> Photon - High Performance PHP Framework - http://photon-project.com
> Céondo Ltd - Web + Science = Fun - http://www.ceondo.com
>
> > Best Regards,
> > Alex Knol
> > Movil: +34 693 206 868
> > Company: Pumiwex S.L.U.
> > PostBox: Apartado Correos 842, Camarles
> > Delivery / Fiscal: Plaza Don Diego de Leon 3, Camarles (Tarragona)
> > Postal Code: 43894
> > Country: Espana Pumiwex S.L.
> > CIF B43969187
> >
> >
> >
> > On Mon, May 2, 2011 at 10:37 AM, William MARTIN <wysman@gmail.com
> > <mailto:wysman@gmail.com>> wrote:
> >
> >     Hi again,
> >
> >     This patch add "hnu pot" command to generate POT file for all
> >     installed application.
> >     I think the code must be review and improve, but it's a good working
> >     start point.
> >
> >     http://projects.ceondo.com/p/photon/issues/662/
> >
> >     William MARTIN
> >
> >
>