On Sun, Jun 29, 2008 at 12:48 PM, Sven Meier <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've just converted two projects to the new generics setup and everything
> worked out nicely.
> I think this is how generics should be applied to Wicket.
>
> Igor, thanks for your hard work on this.

wasnt just me :)

-igor

>
> Sven
>
> Igor Vaynberg schrieb:
>>
>> development of the 1.4 branch has been quiet lately, this is because
>> the core team has been busy working on an alternative way of
>> generifiing the framework. an early result of that effort can be found
>> here [1]. The key difference in [1] is that we have decoupled the
>> component from the type of the model.
>>
>> here is the list of major differences:
>>
>> (1) only components that use their model have a generic type
>> (components you are likely to call getmodel/getmodelobject on as a
>> user). so far these are link,form,formcomponent
>> subclasses,listview,listitem,(other repeaters will follow soon). this
>> allows for typesafety where it makes sense, and eliminates a ton of
>> noise from code. we will generify others upon request if a good
>> usecase is provided and we think it is widely applicable.
>>
>> (2) non-generified components do not have IModel<T> get/setModel and T
>> get/setModelObject, instead they have IModel<?>get/setDefaultModel and
>> Object get/setDefaultModelObject. this clearly expresses that the
>> default component model is not tied to the type of component. this is
>> a bit of a pain from the code migration point of view, but we think is
>> worth the effort. generifyed components are free to implement the old
>> IModel<T> get/setModel, etc, but have to keep the unsafe cast inside.
>> see ListItem for an example.
>>
>> basically we feel this is a much cleaner way then what is 1.4m2. this
>> is a call for confirmation/discussion from our user base. do try to
>> port a small project or a part of a larger project you are working on
>> to the [1] branch to see how the new api feels. if we do like this
>> more the new branch will be merged into what will be 1.4m3.
>>
>> [1] https://svn.apache.org/repos/asf/wicket/sandbox/ivaynberg/generics
>>
>> -igor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to