Results 1 to 2 of 2

Thread: Help Needed with Controllers

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    Default Help Needed with Controllers

    Hello,

    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 at 01:52 AM.

  2. #2
    Join Date
    Jun 2009
    Location
    Bucharest
    Posts
    2

    Default

    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 ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •