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


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

Re: How is this "pattern" called?

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: How is this "pattern" called?
Date 2012-05-18 08:29 -0700
Organization A noiseless patient Spider
Message-ID <jp5ptm$jp9$1@dont-email.me> (permalink)
References <pattern-20120518104439@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 5/18/2012 1:53 AM, Stefan Ram wrote:
>    In the MVC pattern, I think, M, V, and C should be at least
>    one non-innner class each?
>
>    I often have seen (possibly, especially in beginner code) a
>    coding pattern, where there is only one single non-inner class:
>    the model.


"Especially in beginner code" seems to say to me that they might be 
copying from beginner examples, especially of the sort that appear in 
Oracle's Java tutorial.  These example are designed to be shorter to 
read on a web page or book page, and don't show best practice or correct 
pattern.  The examples simply show how to use the API.

Also, MVC is not MVC.  That is, most languages and frameworks use a 
modified MVC that really isn't MVC.  Java itself uses a "split model" 
design pattern.  Model-Presenter-Controller is currently a popular 
design pattern which can be used in Java.

<http://www.martinfowler.com/eaaDev/uiArchs.html>


>
>    The listeners and the view then are embedded into this
>    model, possibly, as inner classes. It's not really MVC
>    as the observer pattern is not used for decoupling.


"Close coupling" is an anti-pattern in most cases.

Do you have an example we could look at?

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: How is this "pattern" called? markspace <-@.> - 2012-05-18 08:29 -0700
  Re: How is this "pattern" called? markspace <-@.> - 2012-05-18 08:37 -0700
  Re: How is this "pattern" called? markspace <-@.> - 2012-05-18 10:35 -0700
    Re: How is this "pattern" called? Wanja Gayk <brixomatic@yahoo.com> - 2012-05-30 14:32 +0200
  Re: How is this "pattern" called? "John B. Matthews" <nospam@nospam.invalid> - 2012-05-18 15:35 -0400
  Re: How is this "pattern" called? Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 22:29 -0400

csiph-web