Announcement Announcement Module
No announcement yet.
Professional Spring Web Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Professional Spring Web

    Hi All

    What is the preferred way to use spring web in a professional site. Spring provides a myriad of ways we can manage web requests with form requests being managed by

    1. SimpleFormController

    However, professionally, is this controller extended directly or is it advisable to extend this controller to allow for a lesser dependency on Spring? If yes, then what is the best way to extend the controller?

  • #2
    For me the loosely coupling is achieved by using annotation.

    I setup a simple class and annotate it with the @Controller annotation.
    The underlying class behaves like a MultiActionController class and can thus be treated in a convenient way.

    For us, this is the best way to use mvc controllers.


    • #3
      maintenance nightmare

      As wonderful as annotations are, my biggest issue with it is that it is not easy to find out which controllers manage which requests, without performing a code level search.

      The XML config, allows for easy maintenance as it is easy to map the request to it's associate controller


      • #4
        I typically extend SimpleFormController (or in my preference CancellableFormController) to implement functionality which is common to all my controllers or extend functionality where needed (ie. better duplicate form submission detection, etc).


        • #5
          Any chance you can share what common operations you add to the extended controller?