Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring MVC annotation driven classes vs pure commands
    primarykey
    data
    text
    <p>I have to say that I find the annotation-driven model of Spring MVC convenient, but coming from the Flex world, I am very much used to using the Command design pattern. It makes it very easy to reduce the levels of abstraction, and achieve flexibility by extending generic command functionality. However, I find it difficult to fit this into the Spring environment. </p> <p>In the ideal case, there should be no controllers but one generic HandleWebRequestCommand class, which, based on the request params (or URL path vars) executes another command (or a chain of commands). Other commands will be responsible for calling remote services, handling the DB retrieval/persistence, file manipulation, etc. This will reduce the whole Controller/Service/Persistence cake to a set of interchangeable and uncoupled commands.</p> <p>The hardest part by far seems to be making the mappings between what is happening and which commands should be executed. I see an XML context-like file very appropriate for this purpose where all the commands are declared. Also, their dependencies will be supplied (Every command might have a set of other commands that it depends on (interfaced, of course)) So far, I don't envision the use of an event-driven architecture, since most of the commands will still be executed as a result of HTTP request, so the most important mappings will be those within the HandleWebRequestCommand</p> <p>I am confused. Please help. Should I keep fitting this Spring, or start developing my own architecture directly on top of Java EE? Is such an architecture OK at all?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload