Alternatives to the MVC [closed]

One of the best write-ups of several different Interactive Application Architecture Patterns out there, is this very detailed and well-researched blog-post. It covers Model-View-Controller, three different flavors of Model-View-Presenter, several different flavors of Presentation-Abstraction-Control, Supervising Controller, Passive View and Hierarchical MVC. Another interesting pattern is the Presenter First pattern by Atomic Objects. It’s not just … Read more

RESTeasy and Returning to a JSP page with a model

Okay, I figured it out for anyone who is interested. It was actually fairly trivial once I found an example. @GET @Path(“{eventid}”) @Produces(“text/html”) public void getEvent(@Context HttpServletResponse response, @Context HttpServletRequest request, @PathParam(“eventid”) Long eventid) throws ServletException, IOException { EventDao eventdao = DaoFactory.getEventDao(); Event event = eventdao.find(eventid); request.setAttribute(“event”, event); request.getRequestDispatcher(“eventView.jsp”).forward(request, response); }

Difference between Observer, Pub/Sub, and Data Binding

There are two major differences between Observer/Observable and Publisher/Subscriber patterns: Observer/Observable pattern is mostly implemented in a synchronous way, i.e. the observable calls the appropriate method of all its observers when some event occurs. The Publisher/Subscriber pattern is mostly implemented in an asynchronous way (using message queue). In the Observer/Observable pattern, the observers are aware … Read more

Using Spring, mapping to root in web.xml, static resources aren’t found

The problem is that requests for the static content go to the dispatcherServlet, because it’s mapped as <url-pattern>/</url-pattern>. It’s a very common problem in applications with “RESTful” URLs (that is, without any prefix in the DispatcherServlet mapping). There are several possible ways to solve this problem: Since Spring 3.x the preferred way to access static … Read more