Thursday, November 29, 2007

Spring Framework continues...

it is something that i just learn a few weeks ago.service class & implementation.purpose of it: so that if there r any changes (sure ade punyer), changes are only to be made at these classes, service and controllers, leaving all the models alone.tend to forget,so i write it down here.just so u know, it is my way of understanding, so if ada salah,sila betulkan.pis.

steps to do service function

1. create interface eg SampleService
2. create class SampleServiceTest implements SampleService
3. controller - add service as property , create its setter eg
private SampleService sampleService;
{
public void setSampleService(SampleService service)
{
this.sampleService = service;
}
}
3. dispatch-servlet.xml - add service property to controller bean

ps-> whats wrong w the time ar? its thursday 2:44 AM la...

No comments: