1.1.12

Dispatcher View

Core J2EE Patterns - Dispatcher View
Core J2EE Patterns
Dispatcher - Wikipedia, the free encyclopedia
Pro JavaTM EE Spring Patterns: Best ... - Dhrubojyoti Kayal - Google Books
DispatcherServlet (Spring Framework)

Problem domain:


Core J2EE Patterns


  • Problem:
    • You want a view to handle a request and generate a response, while managing limited amounts of business processing.
  • Forces:
    • You have static views
    • You have views generated from an existing presentation model.
    • You have views which are independent of any business service response.
    • You have limited business processing.
Pro Java EE Spring Patterns
  • Basically the same.
Solution:





Pro Spring Patterns


What are the differences?

  • Logically they are the same.
  • Simple business processes will be configured into the controller using IoC/AOP container, so that business process will be out of the scope of the main process flow. This is the power of declarable service injection and decoupling.
  • By decoupling business processes, the whole process flow is a simple mapping url dispatching flow
    • Find the corresponding URL
    • Create the view
    • Render it.
Pre-assumption
  • The business processes should be simple enough to inject into the the controller
    • Simple input/output parameter
    • Simple work flow

No comments: