Hey there,

Don't shoot, I just got here. And yes I did have look at the archive
to answer my question.
Actually I also read the MEAP Wicket in Action, but I wasn't satisfied
with the answers, so please hear me out and share your opinion.

The reason I'm here is that I fell in love with Wicket and started a
new project.

Now, yesterday we were discussing which approach should we take to
developing our application, and we got stuck on the part where didn't
know what to choose MVP or the simple way as shown in the wicket
books.

For simple cases (and components) the simple approach would probably
suffice, I'm not so sure it will do us good for the complex components
we know we will have to develop. This is because of the mix that we
have here of the view and the controller. E.g. when I have a component
which allows me to choose a value from a list (not a regular
dropdown), and on this list I have a button which enables me to add
another value to the list, the list by the way is pagable and sortable
(as it may get thousands elements long) so we have to query the DB
using ajax. So when I think about such a component in wicket I'm
afraid that it will create a unmaintainable mess because I will have
web components, their behaviours, calls to services, and possibly
anonymous renderers for lists snooping around the domain objects
(retrieved from the model). And it scares me.

I just want to keep the code it easy to read, comprehend and maintain

The approach I would normally take when using e.g. Swing would be to
use the MVP pattern or rather the Passive View flavour (by Martin
Fowler), in order to have the presenter wire everything. Problem is
it's a lot of additional code I will not need for the simple cases,
and I don't get the other major benefit of Passive View - testability,
because Wicket components are already unit testable (as opposed to
Swing). On the other hand I would not like to have half of the app
written using one approach and the other half the second.

How do you approach such scenarios? Maybe I'm just imagining things,
but maybe not, please share

-- 
Wojtek Biela

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

Reply via email to