I use Proxies. The reason is that I can use them in a DI way.

Lets say I have a Page which uses a CustomerPanel. The CustomerPanel needs acess to a CustomerDAO. So I just proxy the customerDAO and inject it in the CustomerPanel ie in the constructor. This way I decouple it from the Application, which is good for testing and all the other DI stuff. The only alternative I'd see for that is to use an extra locator, which acutally a Proxy is -just more convinient.

Proxies can also be injected directly on your fields in the Page, but I currently create them manually in the Application.

Christian

On Wed, 07 Dec 2005 18:43:24 +0000, John Moore <[EMAIL PROTECTED]> wrote:

Jim McLaughlin wrote:

I just started up a project using wicket, spring, and hibernate following the instructions in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. While it is not full step-by-step boiler plate, a half hour to an hour of noodling around this page and the wicket-phonebook example should have you up and running.


Which approach did you go with? Application Object or Proxy Based? I'm all for an easy life and thus the Application Object approach is rather more appealing. I'd like to know a bit more about the downsides, though. The wiki says:

"Application class might get cluttered if the application has a lot of dependencies"

I can't see that being a particular problem for this project unless I've misunderstood something, so I'm interested in anyone else's thoughts on this.

John





--
Christian Essl
        

        
                
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to