Why one of the reasons to say that a design is bad is about deployment???

Discussion in 'Java' started by amoya, Mar 7, 2006.

  1. amoya

    amoya Guest

    Sorry, my english is very bad.

    I'm studying a example about rectangles. I don´t have the source code.

    The Rectangle class has two methods shown. One draws the rectangle on
    the screen, the other computes the area of the rectangle. Two different
    applications use the Rectangle class. One application does
    computational geometry. It uses Rectangle to help it with the
    mathematics of geometric shapes. It never draws the rectangle on the
    screen. The other application is graphical in nature. It may also do
    some computational geometry, but it definitely draws the rectangle on
    the screen.

    The author of the paper say that one of the problem is "we must include
    the GUI
    in the computational geometry application. If this were a C++
    application, the GUI would
    have to be linked in, consuming link time, compile time, and memory
    footprint. In a Java
    application, the .class files for the GUI have to be deployed to the
    target platform."

    I don't understand this problem?? what means deployment??
     
    amoya, Mar 7, 2006
    #1
    1. Advertising

  2. amoya

    Oliver Wong Guest

    "amoya" <> wrote in message
    news:...
    >
    > what means deployment??


    Deployment refers to all the things that need to be done to put the
    program (after it's finished being programmed) on a computer and making it
    runnable for the users. In some cases, this is as simple as just copying the
    ..class files onto the harddrive. In other cases, you might need to be
    concerned about installing a JRE, setting registry values, installing an
    HTTP or SQL server, registering them as services in the OS, etc.

    The concept of "Installing a program" is a subset of the concept of
    "Deployment".

    - Oliver
     
    Oliver Wong, Mar 7, 2006
    #2
    1. Advertising

  3. Re: Why one of the reasons to say that a design is bad is aboutdeployment???

    amoya wrote:
    > The author of the paper say that one of the problem is "we must include
    > the GUI
    > in the computational geometry application. If this were a C++
    > application, the GUI would
    > have to be linked in, consuming link time, compile time, and memory
    > footprint. In a Java
    > application, the .class files for the GUI have to be deployed to the
    > target platform."
    >


    > I don't understand this problem??


    So don't I. Not because of your description, but I think the author of
    the paper is wrong. But first:

    > what means deployment??


    Simplified, it means installation.

    Back to the paper. The paper's author seems to assume that GUI code
    (assuming he means code from java.awt.geom.Area or similar) is linked
    into the code, and that he has to copy/load the whole of java.awt ("the
    GUI") to the target platform during installation of the application,
    because he uses things like java.awt.geom.Area.

    Which is wrong. These classes are part of the Java Standard edition
    (J2SE). Already when he installed/deployed the JRE, these classes are
    put onto the target platform. They are there, regardless of if they are
    used by an application or not. It doesn't matter if his application uses
    them or not, they still hang around as part of the JRE. If they do the
    job, it is actually more clever to use them, than building your own.

    /Thomas
    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
     
    Thomas Weidenfeller, Mar 8, 2006
    #3
  4. amoya

    Chris Uppal Guest

    Thomas Weidenfeller wrote:

    > Back to the paper. The paper's author seems to assume that GUI code
    > (assuming he means code from java.awt.geom.Area or similar) is linked
    > into the code, and that he has to copy/load the whole of java.awt ("the
    > GUI") to the target platform during installation of the application,
    > because he uses things like java.awt.geom.Area.


    I agree that the GUI code will probably be already installed on the target
    machine. But that doesn't mean that the original class wasn't badly designed.

    As a purely practical point, if the class mentions, but never actually uses,
    the AWT/Swing stuff, then some of those classes will have to be loaded,
    prepared, maybe even initialised, which would not be the case otherwise. In
    the worst case, you might even cause AWT to start up its event threads. None
    of that is good.

    But what's really wrong is the design itself. The linking "problem" is just an
    /example/ of why ill-considered coupling is bad. Or call it a symptom if you
    like. Having GUI code in a class that is intended for general-purpose use
    (including non-GUI applications) is poor separation[*]. It confuses the API.
    It adds unnecessary coupling. It almost certainly reflects a lack of thought
    by the designer.

    ([*] It reminds me of the way that URLClassLoader drags a load of networking
    concepts and linkages into code that has nothing whatever to do with networks.)

    -- chris
     
    Chris Uppal, Mar 8, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,090
    Smokey Grindel
    Dec 2, 2006
  2. rantingrick
    Replies:
    44
    Views:
    1,256
    Peter Pearson
    Jul 13, 2010
  3. Beauregard T. Shagnasty

    Re: Reasons for using CSS in the Web Design

    Beauregard T. Shagnasty, May 16, 2012, in forum: HTML
    Replies:
    3
    Views:
    602
    Allodoxaphobia
    May 16, 2012
  4. Neil Gould
    Replies:
    0
    Views:
    450
    Neil Gould
    May 26, 2012
  5. (PeteCresswell)
    Replies:
    1
    Views:
    436
    dorayme
    May 26, 2012
Loading...

Share This Page