Dashboard > People > Uwe Schaefer > Browse Space > News Items for
  codesmell Log In   View a printable version of the current page.  
  News Items for Oktober, 2007
  2007/10/03
Last changed: Okt 03, 2007 19:24 by Uwe Schaefer
Labels: wicket, java, web, guice, dependency-injection

You know Wicket, at least, you´ve heard of it. What you might have missed, is that it integrates with Guice quite well through this project.
I´ve tried it and it´s marvellous. Consider this:

SomeForm.java
public final class SomeForm extends Form
{
        public SomeForm(final String componentName)
        {
            super(componentName);
            add(new FeedbackPanel("feedback"));
            [... populate form ...]
        }

	// this is where it gets guicy:
	
        @Inject
        private AuditService auditService;

        @Override
        public final void onSubmit()
        {
           auditService.doSomeAuditing(...);
           doSomethingImportant();
        }
        
        [...]
}

The beauty of this is the fact, is that this still works with Serialized forms (of course) and that together with Maven, you have a really good setting for prototyping with Wicket.
Just create your Wicket project, start prototyping your wicket GUI using mvn jetty:run and create/modify Service-interfaces as needed accompanied by Prototype-Implementations (aka NOP-Impls ).
You can later implement your Services for real and just plug them in by switching the Guice-Module:

AbstractWebApplication.java
public abstract class AbstractWebApplication extends WebApplication
{
    
    	@Override
    	protected void init()
    	{
	        super.init();
        	addComponentInstantiationListener(
			new GuiceComponentInjector(this,getModule());
    	} 

	private Module getModule()
	{
	        return isPrototyping() ? 
			getPrototypingModule() : getRuntimeModule();
	}
	
	protected Module getPrototypingModule()
    	{
        	return new Module()
        	{
                	public void configure(final Binder binder)
            		{
                		binder.bind(AuditService.class).
					toInstance(new AuditingServicePrototype());
                		[...]
            		}
        	};
        	// you get the idea.
    	}
}

Lightweight prototyping - Dependencies injected - no XML plus Guice-Scopes are available to give you further flexibility of Object creation.

I love it!

Posted at 03 Okt @ 6:38 PM by Uwe Schaefer | 2 comments
  2007/10/20
Last changed: Okt 20, 2007 16:09 by Uwe Schaefer

Posted at 20 Okt @ 10:59 AM by Uwe Schaefer | 0 comments
  2007/10/27
Last changed: Okt 27, 2007 11:50 by Uwe Schaefer
Labels: wicket, course, jweekend, java, web, london

...isn´t that funny in most cases. Here is one where it is: I had the opportunity to take part in a JWeekend Wicket course. The course was held by Al Maw and Cemal Bayramoglu. It was a two day (not surprising) course: Sat & Sun, 9 to 18h in London.

Wicket is quite interesting to me, as i did some prototyping with it, and we plan to use it in a very largescale project in the near future. For that reason, one of my primary concerns was scalability. With that in mind i doubted, if a course called 'getting started' was exactly what i needed.
Luckily, i decided to go anyway.

The Schedule was very tight, the pace was high and there was a good load of things to learn on the first day. I´ve had only a glimpse of how things are done using Wicket, so a well structured introduction of fundamental concepts as well as components in just the right level of detail was exactly what i needed.
The day is divided into modules. Every module is followed by a hands-on session which is unique. Unlike other courses where you basically just transfer the material into a stupid usecase, these sessions are designed to drive you into trouble in order to really get the gotchas! Seems frustrating at first, but really makes you get the concepts instead of just repeating whats on the slides. During these 'labs', i was constantly looked after by Al and Cemal and they provided me with invaluable correction and explaination where needed.

The level of detail is again to be emphasized. Of course you cannot discuss any ajax component´s method within a day. Nevertheless Al managed to give a very good overview of what is there, and the labs drill down into the use of one representational component, that demonstrates the concepts.

The second day went on, just the same. We coded some ajax and hibernate usecases and did the advanced topics i came for: Scalability, i18n etc.
You cannot overestimate the value of a really insightful speaker. Here the course again differs from the usual 'here-is-a-load-of-material-and-i-will-read-it-to-you'-type of course you get anywhere else. The inner workings of Wicket as well as the hint of where to look for a special tuning strategy is what you could well expect from Al.

Even if my trip (for schedule and flight-traffic reasons) was not that comfortable, taking this course was a great experience. Al and Cemal are very nice people, the material is great and what you get is definately worth the bucks & time.
If you start using Wicket for real, this course is a real timesaver.

Posted at 27 Okt @ 11:49 AM by Uwe Schaefer | 0 comments

Oktober 2007
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Okt 20, 2007
Okt 20, 2007

This site is powered by a free Atlassian Confluence Personal Server License. Evaluate Confluence for your organisation or read more about Confluence licensing here.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators