excitement!

4 views
Skip to first unread message

mindplay.dk

unread,
Aug 2, 2010, 10:23:04 PM8/2/10
to Outlet ORM
I have been following this project from the sidelines for a couple of
years now, and I'm pretty excited about the upcoming release!

Tonight, I started working on an adapter for my favorite framework,
Yii.

It turns out there's a conflict between the static Outlet::init()
method and the IApplicationComponent interface in Yii, which declares
the init() method as non-static. This makes it impossible to integrate
Outlet into Yii as an application component without hacking the Outlet
source code.

As a work-around, I could use a proxy pattern - but for performance
reasons, I'd rather not be responsible for an extra function call for
every find() or save() call.

Please, would you consider using a different name for the static
method?

Also, would please consider renaming the Collection class - that name
is much too generic. It won't collide with anything in Yii, but will
almost inevitably collide with some other class in some application or
framework...

mindplay.dk

unread,
Aug 2, 2010, 11:04:38 PM8/2/10
to Outlet ORM
I now have a basic working integration layer for Yii :-)

I needed one more hack to achieve this - I had to declare $config as
protected rather than private, so my extension could get to the
configuration. To be more developer-friendly, please consider
declaring Outlet's internal members as protected rather than private,
so we can access them...

Looking good so far!

Alvaro Carrasco

unread,
Aug 3, 2010, 12:36:18 AM8/3/10
to outle...@googlegroups.com
Hmm, I'm tempted to remove the static method, since you are now able
to just create an instance of Outlet without using it. At the same
time, i'm not sure how many users are relying on the current approach.

We can probably make some members protected. I try to be careful when
doing that, because that implies that the inner workings are stable
enough for client code to rely on their structure when extending.

Alvaro

> --
> You received this message because you are subscribed to the Google Groups "Outlet ORM" group.
> To post to this group, send email to outle...@googlegroups.com.
> To unsubscribe from this group, send email to outlet-orm+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/outlet-orm?hl=en.
>
>

mindplay.dk

unread,
Aug 3, 2010, 11:46:13 AM8/3/10
to Outlet ORM
Ah, there's a public getConfig(), don't know why I missed that -
you're right, don't change the visibility of the member itself, my
layer should use the public getConfig() method instead!

By the way, there's some mixup of tabs vs spaces in the source code
indentation, you might want to run a search/replace on the codebase to
clear that up...
Reply all
Reply to author
Forward
0 new messages