Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Hairy generics question Date: Sat, 10 Mar 2012 09:47:34 -0800 Organization: albasani.net Lines: 60 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> <4f5abd76$0$290$14726298@news.sunsite.dk> <4f5b8978$0$283$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net oBdJnc28TDThVnd7MpOgpJQdnW6gK5FCMXZRJMak8LH6GOAhyz7LPfUU4QtsIrnTp9cs9Fb/TddmXEZwwG8e+4BjSKJbt8bqpa3ou3ljB8dfRlcbK5OCSypZvya9UImK NNTP-Posting-Date: Sat, 10 Mar 2012 17:47:31 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="T5SVVCizKDfT4ghbB+L5VaFiL7OcC+Oxk2NLpXnbdxvymZsqM0GfWHqVreNYgFTW/Z8BWe5N+T7YKqnBnD2Qep9veajJXT/UpX6/x6WMMnuZKW0UBMURJcdPHLaDigKU"; 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: <4f5b8978$0$283$14726298@news.sunsite.dk> Cancel-Lock: sha1:/etxDKm8EQYUjyB4f+cZjaKj24w= Xref: csiph.com comp.lang.java.programmer:12845 Arne Vajhøj wrote: > Lew wrote: >> Arne Vajhøj wrote: >>> Lew wrote: >>>> 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 usually have functionality besides controller, so it is not just >>> a controller. >>> >>> And clean MVC should have something that is just a controller. >> >> QWhat non-controller functionality goes in a backing bean? >> >> I've done a fair amount of JSF work, and the backing beans I've done >> work just like a controller - they coordinate screen events and delegate >> fulfillment to model objects. > > Typical a backing bean will also contain data. > > In Struts you have the form bean / dyna bean with the data > and the action class being the controller. > > In JSF the form data and the controller got mixed up a bit. You can mix up data and action in Struts, too. Doesn't reflect on the framework so much as the practitioner. Arved's points resonated with me also. Even the Model 2 MVC style has screen field awareness in the C; has to, in order to properly dispatch logic. Arved's comment pertains, "Everything is up for debate, here, that's the point of this subthread." Whether "JSF is MVC" now sounds like a style issue as I integrate your information. I'm in the habit of writing JSF backing beans more like a controller and less like a model-aware component, and your experience reveals a style with less rigorous a separation. I suggest that while JSF admits of a non-MVC approach, as you say, one should yet design along MVC lines. Just having the MVC pattern in mind, with keen understanding of separation of concerns and other principles, one will tend to a good architecture however fuzzy the particular label for it. As always, there are no absolute rules, only firm, supportive principles. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg