I have a one question on design. I have an application which actually just have one service layer, but now its becomes so large that it has got more than 2000 lines, so I decided to refactor the service layer into multiple services with one abstract service.
so basically now I have
each service extends the abstractservice. each service uses other service method via autowiring. and all the autowiring are declared in abstractservice
Just want to know if that is the good design approach or should I have one service locator , that should gives me one service that I want as I find it hard to test each service layer independently as each is dependent on other?
I don't really know much details about your implementation, but if to complete one action you need methods from two different classes then that's sort of breaking cohesion and introducing coupling. In that case you've merely split one class into multiple classes which are tightly coupled which doesn't give you much advantage...
Appreciate your reply. You understood my problem correctly. That has introduced tight coupling between services but I have read somewhere its better to refactor service class, if its too long. Thats the reason I did it. Initially I tried refactoring taken out the common code and putting it in helper classes, even then it was too long
Any ideas how to make this service more readable and maintainable.