• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Refactoring large form and controller

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic