The Artima Developer Community
Sponsored Link

Java Buzz Forum
502 Bad MVC Framework

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bill de hÓra

Posts: 1137
Nickname: dehora
Registered: May, 2003

Bill de hÓra is a technical architect with Propylon
502 Bad MVC Framework Posted: Nov 4, 2004 2:12 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Bill de hÓra.
Original Post: 502 Bad MVC Framework
Feed Title: Bill de hÓra
Feed URL: http://www.dehora.net/journal/atom.xml
Feed Description: FD85 1117 1888 1681 7689 B5DF E696 885C 20D8 21F8
Latest Java Buzz Posts
Latest Java Buzz Posts by Bill de hÓra
Latest Posts From Bill de hÓra

Advertisement
The second article of the Redirect After Post series on TheServerSide contains two terrifically bad design choices. On creating an item: Note: createItem was originally invoked using pushbutton and POST method. But Struts throws an exception if an action corresponding to HTML FORM does not define a form bean. Because createItem action does not use form beans, the HTML FORM had to be changed to a link. Thus, createItem is now called using GET method. On deleting an item: deleteItem action removes an item from persistent storage. It receives item ID from the link on viewList.jsp page. Updating model in response to GET request is against semantics of GET method, but I decided to keep it that way. While the purpose of the article is to demonstrate a technique to avoid double submits from a browser and not neccessarily appropriate application design, using GET to obtain a side effect is fundamentally bad practice. It's difficult to imagine an article about Java that would pass technical muster if the author decided to publish deliberately bad code, for example, swallowing exceptions. The technique itself works, but is of limited use - among other things, it appears to depend on a bug in the Internet Explorer web browser. There are more direct ways to solve the problem. In fairness to the author, the problem he's tackling is a real one. And taking the articles together, it's not unreasonable to conclude that the forest is being hidden by the trees insofar as the details and nature of the web framework is affecting an ability to produce a decent application. Making a web framework architecture fundamentally reliant on state when the underpinning application protocol is stateless seems to put developers in the awkward position of making bad design choices in order avoid dissonance with the framework. Hiding statelessness in a web system appears to be a design guff on a par with that of long running transactions, network transparency or synchronous RPC. Most Java frameworks are based on the Model View Control pattern, but articles such as this one suggest the pattern is out of context on the Web. More recent frameworks, such as WebWork and Jave Server Faces attempt to elide the details of HTTP from developers even further, which may be storing up trouble for the future....

Read: 502 Bad MVC Framework

Topic: Can blogs drive better business? Previous Topic   Next Topic Topic: [Oct 26, 2004 18:41 PDT] 4 Links

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use