The way I see (right or wrong!) is,

You create/manage Models for individual components on a case-by-case basis.

For Repeaters which internal components are dynamically created, you need a 
DataProvider to create and manage those Models for the components and the 
Collections that comprise their data.

DataProvider could be described as a 'Model Factory', and is not a Model in 
itself.

Cheers,
Col.

-----Original Message-----
From: Sven Meier [mailto:s...@meiers.net]
Sent: Friday, 16 May 2014 6:17 AM
To: users@wicket.apache.org
Subject: Re: Question / Best Practise / (List)Model vs. (List)DataProvider

IDataProvider is all about efficiency, it provides efficient access to a subset 
of the data.

Perhaps we can make it even more efficient with the recent proposal on the @dev 
list.

Regards
Sven


On 05/08/2014 01:37 PM, Patrick Davids wrote:
> Hi all,
>
> what I often think about, and I cannot really say is; when to use
> Model or DataProvider as data providing object for components they
> repeat some thing?
>
> Javadoc says, DataProvider are (good) for DataViews.
> Hmm... ok, and they allow easer iterating (first index, count).
>
> I also can achieve this by using a LoadableDetachableModel<List<>>
> combined with a ModelIteratorAdapater.
>
> Both have detaching logic... both featuring extension, both have a
> sort of "load"-method (getObject() vs. getData()).
>
> Sometimes I think, they are so similar to each other... where is the
> key difference?
>
> Would be cool if some of yours just reply his "two cents" of daily
> programming experience... so I can get some new point of views.
>
> When do you use DataProvider or Model<List<>>?
> Did you experienced the same, not to exactly know which one you will
> use for your new page/panel/component?
> And often think about pro and cons using it with RepeatingViews? And
> later on, you see... "I could have used both... hmm..."
>
> thanx a lot for feedback and kind regards Patrick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to