Announcement Announcement Module
No announcement yet.
Help Needed with Controllers Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Needed with Controllers


    I have developed a website using Spring MVC 3.1.2 and Jackson 1.9 to enable JSON communication.

    All of this already works!

    Now my website is designed to handle Models.

    What i have now:
    • User makes a request
    • Controller loads the complete Model
    • Controller uses Model to process the request
    • Controller saves and returns the data

    Now i have a problem with the loading part op the Model.

    Is it possible to make a Global Controller, which has data for a Model.

    So that instead of loading the Model everytime there is a request, i can pass the data to the ModelController.

    Plus I don't really want a ModelController which has all the Models in 1 Controller, but 1 Controller per Model.

    Now, is this possible? And if yes, how can I declare such a Controller?

    Thanks in advance!

    A little more explanation: I'm developing an Uml Modeling tool. So when i say Model, I don't mean the Model class inside the Spring Framework. I had to be more clear on that one!
    Last edited by areont; Jan 9th, 2013, 01:52 AM.

  • #2
    Hello there,

    I don't really see your problem. Maybe an UML is clearer than a wording explanation.

    I don't think you can declare Controllers in an ambiguous way i.e. one request must be mapped by different discriminators to just one method.

    However, ofc you can use OOP techniques for making some abstract reasoning ( TemplateMethod, for example ).

    Can you be more specific ?