Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are loads of different design patterns used, but there are a few obvious ones:</p> <ul> <li><p>Proxy - used heavily in <a href="http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-understanding-aop-proxies" rel="noreferrer">AOP</a>, and <a href="http://static.springframework.org/spring/docs/2.5.x/reference/remoting.html" rel="noreferrer">remoting</a>.</p></li> <li><p>Singleton - beans defined in spring config files are singletons by default.</p></li> <li><p>Template method - used extensively to deal with boilerplate repeated code (such as closing connections cleanly, etc..). For example <a href="http://static.springframework.org/spring/docs/2.5.x/reference/jdbc.html#jdbc-JdbcTemplate" rel="noreferrer">JdbcTemplate</a>, <a href="http://static.springframework.org/spring/docs/2.5.x/reference/jms.html#jms-jmstemplate" rel="noreferrer">JmsTemplate</a>, <a href="http://static.springframework.org/spring/docs/2.5.x/reference/orm.html#orm-jpa-template" rel="noreferrer">JpaTemplate</a>.</p></li> </ul> <hr> <p>Update following comments: For MVC, you might want to read the <a href="http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html" rel="noreferrer">MVC Reference</a></p> <p>Some obvious patterns in use in MVC:</p> <ul> <li><p><a href="http://java.sun.com/blueprints/patterns/MVC-detailed.html" rel="noreferrer">Model View Controller</a> :-) . The advantage with Spring MVC is that your controllers are POJOs as opposed to being servlets. This makes for easier testing of controllers. One thing to note is that the controller is only required to return a logical view name, and the view selection is left to a separate <a href="http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-viewresolver" rel="noreferrer">ViewResolver</a>. This makes it easier to reuse controllers for different view technologies.</p></li> <li><p><a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/FrontController.html" rel="noreferrer">Front Controller</a>. Spring provides <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/servlet/DispatcherServlet.html" rel="noreferrer">DispatcherServlet</a> to ensure an incoming request gets dispatched to your controllers.</p></li> <li><p><a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/ViewHelper.html" rel="noreferrer">View Helper</a> - Spring has a number of custom JSP tags, and velocity macros, to assist in separating code from presentation in views.</p></li> </ul>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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