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]
