You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Peter Lin <wo...@gmail.com> on 2010/10/04 21:03:59 UTC

Question about PlanetProvider

I'm looking at PlanetManager and PlanetProvider and trying to figure
out how I should bootstrap the JPA dao I wrote for my tag library
enhancement.

In EntryBasicTests, I see it gets an instance of PlanetManager, which
provides methods for various CRUD operations. I'm thinking of adding
the methods I need to it, but not sure if that's the best approach.

I also thought about making a new manager, but that would involve a
lot more work.

any tips?

peter lin

Re: Question about PlanetProvider

Posted by Peter Lin <wo...@gmail.com>.
a few hours after I sent the email, I figured out where to put and how
to use Juice to instantiate the JPA dao I wrote.

thanks

peter

On Tue, Oct 5, 2010 at 9:29 AM, Dave <sn...@gmail.com> wrote:
> The general rule I've followed is this. If you are introducing new
> tables and POJOs which seem to fit into an existing manager, then use
> that manager, i.e. add your methods to that manager. If you are
> introducing something entirely new, then create a new manager.
>
> For your stuff, it's easier to add methods to an existing manager, so
> that is probably where I would start. We can always move out them
> later.
>
> Thanks,
> Dave
>
>
> On Mon, Oct 4, 2010 at 3:03 PM, Peter Lin <wo...@gmail.com> wrote:
>> I'm looking at PlanetManager and PlanetProvider and trying to figure
>> out how I should bootstrap the JPA dao I wrote for my tag library
>> enhancement.
>>
>> In EntryBasicTests, I see it gets an instance of PlanetManager, which
>> provides methods for various CRUD operations. I'm thinking of adding
>> the methods I need to it, but not sure if that's the best approach.
>>
>> I also thought about making a new manager, but that would involve a
>> lot more work.
>>
>> any tips?
>>
>> peter lin
>>
>

Re: Question about PlanetProvider

Posted by Dave <sn...@gmail.com>.
The general rule I've followed is this. If you are introducing new
tables and POJOs which seem to fit into an existing manager, then use
that manager, i.e. add your methods to that manager. If you are
introducing something entirely new, then create a new manager.

For your stuff, it's easier to add methods to an existing manager, so
that is probably where I would start. We can always move out them
later.

Thanks,
Dave


On Mon, Oct 4, 2010 at 3:03 PM, Peter Lin <wo...@gmail.com> wrote:
> I'm looking at PlanetManager and PlanetProvider and trying to figure
> out how I should bootstrap the JPA dao I wrote for my tag library
> enhancement.
>
> In EntryBasicTests, I see it gets an instance of PlanetManager, which
> provides methods for various CRUD operations. I'm thinking of adding
> the methods I need to it, but not sure if that's the best approach.
>
> I also thought about making a new manager, but that would involve a
> lot more work.
>
> any tips?
>
> peter lin
>