Re: Design guidelines

2002-02-13 Thread Christian Pesch

Amit Rana schrieb:

>1.Can anyone give some guidelines or points to remember while
> designing/scheduling a Swing project.

- Make use cases before designing your gui
- Get user feedback as early as possible

>2.Points to remember to get better performance and better memory
> utilization?

- Do not assume, memory gets freed automatically
- Always remove your listeners
- Finalizers are not the way to free memory
- Put long-lasting actions into separate threads
- Never forget to switch to the AWT Eventqueue before modifying the GUI.

--
Christian Pesch - Software Engineer
CoreMedia AG - http://www.coremedia.com - 0700-COREMEDIA



___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



Re: Design guidelines

2002-02-12 Thread Marie Alm

This link should work better:
http://click.idg.email-publisher.com/maaag7EaaRafPa9JE6eb/

--
Marie.
~~/\~~O-O~~~
A. Marie Alm, Sr. Software Engineer
0-In Design Automation, San Jose, Ca.
"Zero-In"   http://www.0-In.com
Tel: 408.487.3608
~~\/

Marie Alm wrote:

> There are also 3 good articles in the JavaWorld archives.
> http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-performance.html?
> --
> Marie.
> ~~/\~~O-O~~~
> A. Marie Alm, Sr. Software Engineer
> 0-In Design Automation, San Jose, Ca.
> "Zero-In"   http://www.0-In.com
> Tel: 408.487.3608
> ~~\/
>
> Amit wrote:
>
> Hi,
>
> 1.Can anyone give some guidelines or points to remember while
> designing/scheduling a Swing
> project.
> 2.Points to remember to get better performance and better memory
> utilization?
>
> Regards,
> Amit.
>
> ___
> Advanced-swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/advanced-swing

___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



Re: Design guidelines

2002-02-12 Thread Marie Alm

There are also 3 good articles in the JavaWorld archives.
http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-performance.html?
--
Marie.
~~/\~~O-O~~~
A. Marie Alm, Sr. Software Engineer
0-In Design Automation, San Jose, Ca.
"Zero-In"   http://www.0-In.com
Tel: 408.487.3608
~~\/

Amit wrote:

Hi,

1.Can anyone give some guidelines or points to remember while
designing/scheduling a Swing
project.
2.Points to remember to get better performance and better memory
utilization?

Regards,
Amit.

___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



Re: Design guidelines

2002-02-12 Thread Christian Pesch

Amit Rana schrieb:

>1.Can anyone give some guidelines or points to remember while
> designing/scheduling a Swing project.

- Make use cases before designing your gui
- Get user feedback as early as possible

>2.Points to remember to get better performance and better memory
> utilization?

- Do not assume, memory gets freed automatically
- Always remove your listeners
- Finalizers are not the way to free memory
- Put long-lasting actions into separate threads
- Never forget to switch to the AWT Eventqueue before modifying the GUI.

--
Christian Pesch - Software Engineer
CoreMedia AG - http://www.coremedia.com - 0700-COREMEDIA
___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing



RE: Design guidelines

2002-02-12 Thread Jackson, Martin

Arnit,

Some of these comments may be lame or real obvious.  I've been at this (Java
Development) 
a while (since 1996), but still have much to learn.

-- Read O'Reilly's book Java Performance Tuning by Jack Shirazi  (Pg. 18-19
has a good check list)
This will help you get the mindset and attitude to shift focus from
"construction worker" to "quality assurance".   

-- Attend some of the performance sessions at JavaOne March 22-29
The points people make during talks will wind up in next year's
books.  The new products (JVM etc) all have their improvements.  This might
affect how you optimize.

-- Use a profiler.  Every project is different. Where the location of the
bottle neck will suprise you. (Especially, 
if you learn from your mistakes).
I personally like JProbe the best (use the built in java -Xrunhprof
until a purchase is made)
80% of the bottle neck will be in 20% of the code
Algorithm improvements will give you the best performance
improvements.

-- Avoid creating Objects, even if it is better OOD
Just like placing a Database design in 3rd normal form, then
implementing 
a not so "perfect" design that queries faster.  
Do your object design and then deconstruct some of the objects in
favor of performance.  
For example, you temporarily need a collection of (X,Y) graph points
and you 
create a Vector of Points (where Points is a class with int x and
int y).
Try using int x[20];int y[20] instead.   If this was in you most
used routine, 
major improvement -- and the code is still easy to read and
maintain.
Same goes for String concatenation.  That's why StringBuffer was
added.

Perceived Performance
Use a simple splash screen during initial startup,  build the rest of the
application in a background thread.
Stop optimizing when the improvements are less than 20% -- it is no longer
noticeable to the user
The wall clock time is your best and only real measure
System.getcurrentTimeMillis()


Hope this helps,
Martin

> -Original Message-
> From: Amit Rana [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 11:34 PM
> To:   [EMAIL PROTECTED]
> Subject:  Design guidelines
> Importance:   High
> 
> Hi,
>  
> 1.Can anyone give some guidelines or points to remember while
> designing/scheduling a Swing project.
> 2.Points to remember to get better performance and better memory
> utilization?
>  
> Regards,
> Amit.
___
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing