Hello ranchers,
I'll have to do some refactoring and I don't know how to go about it and would appreciate any advice.
It's about a large piece of a big
JSP based application. It's an old application, and I don't have the power to change technology.
The problem:
It's mainly about this one complex form that has a lot of it's parts shown in respect to other parts values, application state and action taken. It's like having this form 'A' that can go into state 'A-1', 'A-2', ... . But if you take some specific action, e.g. request a transfer, form enters 'A-1-c' state. Now by invoking some other action you might end up in 'A-2-c'. Some of these relations are codependant, let's say a form can never be in 'A-3-c' state, so when this happends we automaticaly go to 'A-3-a' state. Some of these relations that change forms state go both ways.
All of this is cramed in one form and a couple of thousand lines long controller. A lot of times when the client wants a small change we have to bend backwards to make it happend.
My question is, is there a design
pattern that we could refactor to, so we would have better response time and could focus our time on other things.