• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Wicket in Action - yet another framework?

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Authors (Martin & Eelco),

One advantage i could see from the Manning's website is that it does maintain the component's state automatically and gets rid of painful explicit HttpSession tracking.

Is there any other significant advantages which facilitates the Web programming? To what extent it is beneficial too?

Why I should go for Wicket specifically?

Thank you in advance.
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The separation between the presentation layer and the java code is a really neat thing. In wicket, your pages are plain XHTML, so you will not find someone writing scriptlets with application logic in your pages. Separation of concerns is really important, especially for large teams. What wicket did with the separation between the markup and the java code is really useful, where you can make your page designers and page authors take care of the templating, while your java developers take care of the application logic. If this is done right, you can easily boost up productivity a lot.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's great Nassef. Thank you.

So do you mean to say, it does not even require a trivial amount of application/business logic in the presentation layer ? wherein its presence is so obvious with other frameworks.
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So do you mean to say, it does not even require a trivial amount of application/business logic in the presentation layer ?



In wicket all your presentation layer code should be implemented in java without scriptlets. And wicket uses swing like component model instead of MVC. Those are most important differences from other java web frameworks.

Whether you mix business logic with presentation layer is entirely up to you.
I don't think that a web framework can prevent it's users from doing that.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By automatically managing state for you what Wicket offers in exchange is a programming model that is vastly superior to traditional request based frameworks.

In Wicket I can do:

public class Counter extends WebPage {
private int count=0;

public Counter() {

add(new Link("increment") {
protected void onClick() { count++; }
});
}
}

Notice how I did not have to write any fragile url handlers. I did not have to pass count around in the url. I did not have to typeconvert it from String to int and to String again because it never shows up in the url. Count could have also been a complex object not easily encodable in a URL, with Wicket it doesnt matter.

I have a desktop-like programming model that takes advantage of java's core feature: OOP which makes Wicket code scale well to large teams because you can have encapsulation of code (notice count var is private), you can create new Wicket components easily by simply extending (notice I create a new link by extending Link component), and you can create new components by composing other components (notice I create Counter page by adding my link to it).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!