You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jan Kriesten <ja...@renitence.de> on 2008/05/01 09:09:03 UTC

Vote Summay IDataProvider

Hi,

I counted up the votes for the IDataProvider issue. Undecided votes in braces:

[   ( ) ] IDataProvider<I,T>
[ 6 (3) ] Iterator<IModel<T>> , drop model
[ 3 (3) ] Leave as is.

So, there are currently (only) 12 votes, the majority is in favor of dropping 
model/don't care between dropping or not.

I hope it count's something and you might consider changing the API in this respect.

Best regards, --- Jan.



Re: Vote Summay IDataProvider

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Johan,

> why is it that you dont have any problems with a single method:
> Iterator<IModel<T>

that's pretty easy to explain:

I have a Model that's defined as:

class IdLoadableDetachableModel[T]( id: Int, idLoader: Int => T )
{
   @Override protected def load: T = idLoader( id )
}

I can provide a reference to the method to load the actual object, so there's no 
overhead when using an Iterator<IModel<T>>.

When using the current 1.4 approach, I'd have to load T within Iterator just to 
make it a detachable Model again (which is quite dumb IMHO).

The abstraction I have goes still further (so I can use my DataProvider for all 
lists returning an id-lists and just get the load-method provided) - but you get 
the point.

Regards, --- Jan.



Re: Vote Summay IDataProvider

Posted by Johan Compagner <jc...@gmail.com>.
i dont think many people get stuck very fast.
i dont see how

why is it that you dont have any problems with a single method:

Iterator<IModel<T>

Then you still have to do exactly everything in the iterator... So create
your real objects (not the integers)
So why cant you do the exact same thing with the current setup??

johan


On Thu, May 1, 2008 at 3:06 PM, Jan Kriesten <ja...@renitence.de>
wrote:

>
> Hi Martijn,
>
>  Apparently ONLY 6 folks think the usecase has some merit, but that is
> > not enough to change such a widely used API in my opinion. More
> > conclusive numbers have to be needed to convince me.
> >
>
> wouldn't it at least be possible, to leave iterator returning
> Iterator<Object>? I think it really is wrong to force instantiation of
> objects with the iterator.
>
> If you don't use an ORM like Hibernate, you very fast get into the
> situation where this really get's an issue.
>
> Regards, --- Jan.
>
>
>

Re: Vote Summay IDataProvider

Posted by Jan Kriesten <ja...@renitence.de>.
Hi Martijn,

> Apparently ONLY 6 folks think the usecase has some merit, but that is
> not enough to change such a widely used API in my opinion. More
> conclusive numbers have to be needed to convince me.

wouldn't it at least be possible, to leave iterator returning Iterator<Object>? 
I think it really is wrong to force instantiation of objects with the iterator.

If you don't use an ORM like Hibernate, you very fast get into the situation 
where this really get's an issue.

Regards, --- Jan.



Re: Vote Summay IDataProvider

Posted by Martijn Dashorst <ma...@gmail.com>.
However, iirc 2 folks from the core team have voted leave as is. Which
would be enough to make this change controversial at best.

Apparently ONLY 6 folks think the usecase has some merit, but that is
not enough to change such a widely used API in my opinion. More
conclusive numbers have to be needed to convince me.

Martijn

On 5/1/08, Jan Kriesten <ja...@renitence.de> wrote:
>
>  hi sven,
>
>
> > I wouldn't call 6 votes a reason to change an API.
> > Count me on "Leave as is".
> >
>
>  a reason to change the api aren't 6 votes but use-cases. your argumentation
> is somewhat 'destructive' (vote against cause there are only 6 votes in
> favor). you could read the result as well as that all haven't voted don't
> really care.
>
>  regards, --- jan.
>
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

Re: Vote Summay IDataProvider

Posted by Jan Kriesten <ja...@renitence.de>.
hi sven,

> I wouldn't call 6 votes a reason to change an API.
> Count me on "Leave as is".

a reason to change the api aren't 6 votes but use-cases. your argumentation is 
somewhat 'destructive' (vote against cause there are only 6 votes in favor). you 
could read the result as well as that all haven't voted don't really care.

regards, --- jan.



Re: Vote Summay IDataProvider

Posted by Sven Meier <sv...@meiers.net>.
I wouldn't call 6 votes a reason to change an API.

Count me on "Leave as is".

Sven

Jan Kriesten schrieb:
>
> Hi,
>
> I counted up the votes for the IDataProvider issue. Undecided votes in 
> braces:
>
> [   ( ) ] IDataProvider<I,T>
> [ 6 (3) ] Iterator<IModel<T>> , drop model
> [ 3 (3) ] Leave as is.
>
> So, there are currently (only) 12 votes, the majority is in favor of 
> dropping model/don't care between dropping or not.
>
> I hope it count's something and you might consider changing the API in 
> this respect.
>
> Best regards, --- Jan.
>
>
>