Path: csiph.com!aioe.org!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Hairy generics question Date: Wed, 29 Feb 2012 22:32:39 -0800 Organization: albasani.net Lines: 56 Message-ID: References: <3c65271e-a388-49c9-bcc6-ca3bf274e74f@e27g2000vbu.googlegroups.com> <29108397.63.1330110725245.JavaMail.geo-discussion-forums@vbpw21> <7822487.176.1330121248108.JavaMail.geo-discussion-forums@vbkl3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net oCNhG9XrjqAkQSFDPp8YnWXzsSAn4b443GYd7XqsjJt61g+CyVLR3FLpOzcfrvWPN1loH3Pf6ifH3FAbPf5x6O6BGfYooMf659H2xrT8M2lvWoomgkFl1nWYdWke05/Z NNTP-Posting-Date: Thu, 1 Mar 2012 06:32:37 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="xoJ8gxO1wgbSwRJFu8RtD9TA6EN4rpwzFMi+B+oIX2nZJpjKZUZ0iN2FPl4ytwDYWJ0zCBeRLD3l3qF6bJQXOVeqwax1jtNEqnGaZbuWuJWTrwXw/YRsIP7AA7XOBQL3"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:/cIwygHboogC3R1WkjIVk+5DhAA= Xref: csiph.com comp.lang.java.programmer:12550 Arved Sandstrom wrote: > If you choose to think of JSF as MVC - let's say because you aren't > interested in breaking out MVP as a derivative of MVC - then that's fine > too. I have no problem with that, it's what I actually do myself, > because most folks haven't heard of MVP anyway so why confuse them? I > would like it though if people who "knowledgeably" classify JSF as being > MVC could identify what the Controller is in JSF: I've run across more > people than not who either think it's the FacesServlet or just don't know. JSF is MVC if you think of a backing bean as a (generally) per-screen controller. It coordinates the purely view-oriented actions of the XHTML (JSP being out of fashion now) with the POJO logic types that implement the model. But a JSF application does not have a simple, single-controller MVC structure, as people usually think of the architecture. It is similar to Swing, as described in http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller (in a section lacking citations): "An MVC application may be a collection of model/view/controller triads, each responsible for a different UI element." Your distinctions between MVP and MVC are useful, as is your reticence to enforce the distinction. The difficulty isn't that things are or aren't different, it's that the term "MVC" is rather broad. It applies to just about any architecture that comprises triads of view, model and some coordinating third element. (What the hell is the difference between a "controller" and a "presenter", really? I've always called it a "dispatcher".) We need a common terminology to distinguish the various flavors. As for people thinking the FacesServlet is the controller, they can be excused if they believe the pundits. There are articles about JSF out there that say so. for example. So even where the terminology is consistent, the taxonomy is in dispute. I suppose that at that height, the FacesServlet is the dispatcher and backing beans the model, but they're the interaction model, not the business model. As a programmer I don't face the FacesServlet. (You see what I did there?) It's black box and so I dismiss it. The part I design, the part that I model, is the application-level MVC pattern. That's why I think of each POJO-screen-bean triad as an MVC unit. (MSD in my universe - dispatcher-screen-model.) (I did that on purpose. Which leg of the tripod is the most important, after all?) I think we're too late to peg MVC to any one flavor, but it makes sense to reserve MVP for the specific variant that it describes. I would go along with that. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg