Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12550

Re: Hairy generics question

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Hairy generics question
Date 2012-02-29 22:32 -0800
Organization albasani.net
Message-ID <jin564$4ud$1@news.albasani.net> (permalink)
References (3 earlier) <7822487.176.1330121248108.JavaMail.geo-discussion-forums@vbkl3> <aaV1r.13982$Pc2.8047@newsfe13.iad> <PKt2r.16538$kv1.5954@newsfe03.iad> <Dp83r.17649$yb.11758@newsfe20.iad> <fFy3r.17567$np3.7550@newsfe05.iad>

Show all headers | View raw


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.
<http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf.html?page=3>
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

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Hairy generics question sclaflin <steve@steveclaflin.com> - 2012-02-21 06:30 -0800
  Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 09:24 -0800
  Re: Hairy generics question Roedy Green <see_website@mindprod.com.invalid> - 2012-02-21 11:05 -0800
    Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 12:09 -0800
  Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-21 18:04 -0800
    Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-21 18:31 -0800
    Re: Hairy generics question Steven Simpson <ss@domain.invalid> - 2012-02-22 08:31 +0000
  Re: Hairy generics question sclaflin@webucator.com - 2012-02-24 11:12 -0800
    Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-24 12:03 -0800
      Re: Hairy generics question sclaflin@webucator.com - 2012-02-24 14:07 -0800
        Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-24 15:36 -0800
          Re: Hairy generics question sclaflin@webucator.com - 2012-02-25 10:27 -0800
          Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-26 13:13 -0400
            What is Model View Presenter. (Was: Hairy generics question) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-26 10:22 -0800
              Re: What is Model View Presenter. (Was: Hairy generics question) Lew <noone@lewscanon.com> - 2012-02-26 13:08 -0800
                Re: What is Model View Presenter. (Was: Hairy generics question) Arne Vajhøj <arne@vajhoej.dk> - 2012-02-26 18:17 -0500
                Re: What is Model View Presenter. (Was: Hairy generics question) sclaflin@webucator.com - 2012-02-28 06:22 -0800
            Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-28 09:46 -0800
              Re: Hairy generics question Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-28 09:49 -0800
              Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-28 12:45 -0800
              Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-29 19:37 -0400
                Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-02-29 22:32 -0800
                Re: Hairy generics question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 21:33 -0500
                Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-03-10 07:38 -0800
                Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-10 12:45 -0400
                Re: Hairy generics question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-10 12:03 -0500
                Re: Hairy generics question Lew <noone@lewscanon.com> - 2012-03-10 09:47 -0800
                Re: Hairy generics question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-10 13:26 -0500
                Re: Hairy generics question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-11 14:06 -0300
                Re: Hairy generics question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-11 18:20 -0400
              Re: Hairy generics question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 21:43 -0500

csiph-web