Re: brainstorming

2009-02-01 Thread Timo Rantalaiho
On Mon, 05 Jan 2009, Daniele Dellafiore wrote:
 Using wicket for a long time now, one of the most tedious task is
 panel refactoring. I mean, often you start with some simple panel
 then it grows and you split in several panels.
 This operation is tedious becouse there is no IDE support for
 refactoring both java and html side.

I typically leave the HTML fragments more or less as they 
are, because for previewability and for the HTML guy it's
easier when they are in bigger pieces.

Splitting the contents of a Panel to WebMarkupContainers 
does not require changing the HTML code, just Java code.
Or maybe you need to add some new wicket:id to some div.

We have extensive developer tests (WicketTester almost 
unit tests :)) to see that the code and HTML are in sync,
and Wicket gives good error messages when they aren't, so 
the manual refactoring is pretty safe to do in the end.

That being said, of course more IDE support would be nice!

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: brainstorming

2009-01-07 Thread Nick Heudecker
It's a good idea, but I believe it would be difficult to implement in IDEA.
From my experience, writing a plugin for IDEA is tedious and very labor
intensive since there are few docs and little support from Jetbrains.  They
don't seem motivated to support their plugin framework.

That said, if I can ever figure out why my Wicket plugin isn't working, I'll
be sure to look into refactoring support. :)

On Mon, Jan 5, 2009 at 2:57 AM, Daniele Dellafiore ilde...@gmail.comwrote:

 Hi everyone.

 I am thinking about how could be useful to have a feature like the one
 I am going to describe. I would like to receive feedback from you.

 Using wicket for a long time now, one of the most tedious task is
 panel refactoring. I mean, often you start with some simple panel
 then it grows and you split in several panels.
 This operation is tedious becouse there is no IDE support for
 refactoring both java and html side.

 The generation/update of the java code starting from html seems to be
 useful. I figure out a couple of sceneries:

 1. I want to create a brand new app, I spend some time with the
 designer that produce the html/css for the basic three pages of my
 first release: home, list of product and details. Really basic.

 Then I want to create the webapp based on wicket: I would like to give
 the three html pages and the css to a software that generates for me
 all the wicket panels, html and java files.
 I can act like this: after getting the files from the designer, I go
 into that and put the wicket:id wherever I want. So I can tell the
 magical wicket compiler where to create panel.

 Then I can get all my java and the corresponding wicket:panel and
 pages with extends. I guess it should be possible, technically.


 2. I want to refactor: after the first release I need some more
 elements in my pages so the designer add the elements to html pages
 (with the wicket:id) and then I want to update my wicket files. Here
 come the trick: very probably I have added some java code to the
 panels that the compiler creates the first time. I want to update,
 probably I need to split some panel into 2 or 3 different panels.


 Le me think about how it should work, for a single page.
 First, we get the html/css with wicket:id· Then our wizard split it
 into all wicket pages and panels. Should be easy.
 Then we need to generate the java code. we can determine the kind of
 wicket component from the html tag: button, label, a, and so on...

 Then usually we make changes to java code, to add behavior and so on.

 Then we want to refactor, two scenario here:

 1. arrives the new html pages from the designer
 2. we refactor in place.

 In case 2, maybe we just need some ide support: some refactoring
 actions starting from wicket panels that affects java code. wicket
 bench offers something but nothing for refactoring and the project is
 almost dead right now.

 In case 1 is harder, I think is possible to handle automatically only
 some cases like we just have new panels where before we have a single
 one AND we still have that old one that is now a container of the new
 panels

 Well, It cannot seem that much but these are some automations that can
 be done and cover a lot of repetetive task in building a wicket app.
 In particular the first thing allow us to have a full web site
 parsed from a generic html page.

 What do you think? Am I getting crazy or there is something useful here?

 --
 Daniele Dellafiore
 http://blog.ildella.net/

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com