Frank Silbermann wrote:
> Suppose I've built a page and later decide, in view of the DRY (Don't
> Repeat Yourself) principle that a portion of my page should be refactored
> into a custom component.  With Wicket I can move some of the page's Java
> code into my new panel class, and move HTML snippets from the page's
> associated HTML to the panel's HTML file.  This process seems not too far
> removed from Fowler's "Extract Class" refactoring.  To me, the ability to
> easily refactor is one advantage of having the components added and
> configured in code.
> To do such a refactoring in Web Objects, I am guessing that one would have
> to work with the generated tag files (a mixture of HTML and component
> configuration tags), which I doubt is practical to do by hand.  So unless
> the tool implements this kind of refactoring directly (which I doubt), you
> would create the re-usable component _from_scratch_ using the
> display-painting tool again, throwing away components that were painted
> earlier.  I fear that this wasted effort may be a disincentive against
> presentation-layer refactoring -- with the result that final designs won't
> be as tight as they could have been.  (On the other hand, if the Web
> Objects tool makes re-doing the work sufficiently easy, the waste of
> redoing work may be insignificant.)

How you do it with WO : WOLips (eclipse plugin) create a new component
(juste give it a name), open in WOBuilder (WYSIWYG editor for editing
simlessly both HTML template and binding file, in fact you don't have to
know there's 2 files), cut (or copy) past the part of your existing page you
want to be isolated in the new component. Define the component API with
That's it, drop it in your existings pages, set the bindings. That's why the
tools are here. (read the manuals about WObuilder if your interested)

Now another question for wicket and refactoring, how can you keep in sync
HTML file and Java code without tools ? I'm not only talking about wicket:id
attributes, but also all the component hierarchy ? If you doing big
refactoring, that's 2 files to maintain. By the way, yes HTML is difficult
to read, but i prefer reading HTML + bindings in WOBuilder where you could
see in 5 secondes the hierarchy than only Java where you have to look for
comp.add(...) all flatened.
That would be awesome if the eclipse (or netbeans) plugin could synchronize
this, that might be tricky to do but interesting.

That's also the reason why i like WO, you open a large page or component and
within 1 mins you have a good idea of his behaviour. Now with Wicket, you
must have some computer brain to understand in 1 mins what a page is doing.

Now don't get me wrong, i appreciate a lot of good stuff about wicket and
the efforts you guys are putting in it. And let's face it, WO's core
developpers are/were not doing it for free :)
View this message in context:
Sent from the Wicket - User forum at

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to