I think Stefan and Doug both summarize this well. One additional description of "type B" applications that seems to be appearing on this thread is apps that are able to get by with mostly string-property-name-based models. Like PropertyModel, CompoundPropertyModel, etc.
On the other hand, you have an app like Doug mentions. This sounds similar to what I have done on the largest Wicket site that I wrote and maintain. I have a common domain model across almost all sections of the site (article-type entities, that share a common parent class, and other entities, which are composed of a couple of common classes that contain things like ratings, comments, and uploaded pictures / videos).... So I have been able to make many very reusable components that utilize models... like a common bookmarkable paging navigator, completely bookmarkable table that supports paging and sorting, etc. The use of generics has greatly cleaned up and improved the code for all these components. Basically, my feeling remains the same - generics are part of Java, so Java programmers are going to have to get use to them. They are very valuable when you need them. We just have to be careful that we implement them the right way. Let's document very well the pain points on the wiki (and verbosity isn't Wicket's pain point - it's java's). Jeremy On Mon, Jun 2, 2008 at 6:04 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote: > > Stefan makes a good point. I have raised this as an example before. > > My site (online.ddpoker.com, just went live) is a mix of A and B. To make > my code cleaner, I created several simple subclasses for cases where I > don't > use models. VoidPanel, VoidContainer (only a handful, really). > > Also, since all my pages subclass my BasePage, all I had to do was change > *that* page to subclass Page<Void> and voila, all my pages were proper. > > I also created the following models to simply my life: DateModel, > IntegerModel, DoubleModel, etc. I did some fancier stuff with Generics, > including a decent drop-down list thing. > > In the end, it was totally worth it. Not only do I understand how wicket > works much better with Generics (because the code helps document it), but > my > code is cleaner and easier to understand. > > I also agree with Bill that developers should take the time to learn the > feature. It can be quite powerful. > > -Doug > > > Stefan Lindner wrote: > > > > Brill Pappin wrote > >>I don't know, I think the discussion is going *toward* generics. > >>Frankly I can't even see why its an issue at all, the language has > > evolved and uses them... Why would Wicket not also use them its inline > > with >the current state of the language? > >> > >>There is no reason that people who can't get their heads around > > Generics can't use the older releases that don't include it, but IMO any > > java >developer who doesn't get generics yet better make some time to > > learn, because like it or not, they *will* be dealing with them. > > > > I agree totally with you. My expericence with Generics over the last two > > years was that any project that was adopted to generics had much less > > errors afterwards. > > > > But the main problem in this discussion seems to be that there are two > > very different sorts of Web Applications that are developed with wicket > > and both may have predecessors that are non generic. > > > > Type A: A Web applicatons that make heavy use of Models, like classic > > desktop allications that are ported to the web. I think the programmers > > of such applications like Generics becaus they help them to avoid erros > > and the current wicket generic implementation leads to a strong typed > > application that needs a good object model (and a good database design). > > If you port an exisitng wicket application with no generic to wicket 1.4 > > you might discover some unclear object model problems in your exisitng > > code. And it's always easier to point to wicket's generics than to blame > > your own code :-) > > > > Type B: A Web Application with more static content, only some date (like > > user logins, user profile data). In this case it's clear that some > > people say "why should I always tyle 'Link<Void>', none of my links has > > a Model, just about 10% of my Components have a Model". But why dont't > > they write their own wrapper e.g. MyVoidLink extends Link<Void>? I > > remember a dicsusson about such Components some weeks ago. > > > > > > What do you think about it? Would it help users of Type B to have > > VoidComponents? > > > > Stefan > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/users%2C-please-give-us-your-opinion%3A-what-is-your-take-on-generics-with-Wicket-tp17589984p17612786.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jeremy Thomerson http://www.wickettraining.com