Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Why one of the reasons to say that a design is bad is about deployment???

Reply
Thread Tools

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

 
 
amoya
Guest
Posts: n/a
 
      03-07-2006
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??

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      03-07-2006
"amoya" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> 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

 
Reply With Quote
 
 
 
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      03-08-2006
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/...g/java/gui/faq
http://www.uni-giessen.de/faq/archiv....java.gui.faq/
 
Reply With Quote
 
Chris Uppal
Guest
Posts: n/a
 
      03-08-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Wall Street bailout plan: 10 reasons to just say no Jim Digital Photography 8 10-07-2008 02:22 PM
Re: Wall Street bailout plan: 10 reasons to just say no RLM Digital Photography 3 10-05-2008 08:17 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
You say SIM, I say SEM Anon Computer Security 1 03-18-2006 01:49 PM
25 Reasons to Aviod the SD-10 (was 15 Reasons to Aviod the SD-10) Steven M. Scharf Digital Photography 823 07-02-2004 12:55 PM



Advertisments