Brown, Berlin [GCG-PFS] schrieb:
What is the best practice for where to put business logic in Wicket.

I don't know if it is the best practice, but here is how we use it:

We have several projects / modules like

myApp-dao
myApp-service
myApp-wicket-ui

Our wicket app then depends on those projects, starts one big application context (Spring) with all the beans and just calls the needed methods on them. The Login page in wicket for example has a service bean that is responsible for authenticating the user. All we do in the form's onSubmit method is to call the authentication logic through its own bean and never care about the actual business logic behind it.

In a small project you don't have to split everything into multiple modules / projects, but you should at least move the logic out of the onSubmit etc. methods and just call methods on a seperate service class.

Patrick


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

Reply via email to