Java Pitfalls. Time-Saving Solutions And Workarounds To Improve Programs

Keith Bohnenberger

,

Michael-C Daconta

,

Eric Monk

,

J-Paul Keller

Note moyenne 
Keith Bohnenberger et Michael-C Daconta - Java Pitfalls. Time-Saving Solutions And Workarounds To Improve Programs.
Although using the Java language provides a substantial boost to a programmer's productivity, it still bas its share of subtleties and weaknesses. This... Lire la suite
33,40 € Neuf
Expédié sous 6 à 12 jours
Livré chez vous entre le 4 mai et le 11 mai
En librairie

Résumé

Although using the Java language provides a substantial boost to a programmer's productivity, it still bas its share of subtleties and weaknesses. This book is designed to save you time and frustration by carefully guiding you through this potential minefield. A team of Java experts, led by programming guru Michael Daconta, offers a collection of proven solutions to 50 difficult, real-world problems chosen from their own extensive experiences. You'll find workarounds for problems caused by shortcomings in both the Java language itself and in its APIs and utilities, including Java*util, Java*io, Java*awt, and javax*swing. The authors also share techniques for improving the performance of your Java applications. For easy reference, the book is organized into categories so that similar solutions are grouped together. Examples of topics covered include language syntax, for example, using the String equal () method instead of the "==" operator (Item 2). Language support, for example, method dispatching with reflection, interfaces, and anonymous classes (Item 16). Utilities and collections, like choosing between a PropertyFile and ResourceBundle (Item 20). Input/output, including subtleties in sending serialized objects over a network (Item 25). GUI presentation, for example, tackling the common pitfall of using repaint() instead of validate() for relaying out components (Item 29). GUI control, for example, better data validation (Item 36). Performance, including tips like lazy loading your way to better performance (Item 43).

Sommaire

  • LANGUAGE SYNTAX
    • When is an " overriden " method not really overriden ? Usage of string equals method versus the " == " operator
    • Java is strongly typed
    • Is that a constructor ? Cannot access overridden Pitfall
    • Forward references
    • Design constructors for extension
    • Passing primitives by reference
    • Boolean logic and short-circuit operators
  • LANGUAGE SUPPORT
    • Reclaming reference when using softreference objects
    • Causing deadlock by calling a synchronized method from a synchronized method
    • Properly cloning an object
    • Overriding the equals method
    • Avoid using constructor for implementing clone
    • Method dispatching with reflection, interfaces, and anonymous classes
    • Handling exceptions and " outofmemoryerror "
  • UTILITIES AND COLLECTIONS
    • Ordered Property keys ? Handling occasionally huge collections with caching
    • Property file or RessourceBundle ? Properties object Pitfalls
    • Using vector as a collection instead of old API
  • INPUT/OUTPUT
    • Serialization
    • Unicode, UTF, and Streams
    • Sending serialized objects over sockets
    • Try, catch..
    • Finally ? Flushing images Resources
  • GUI PRESENTATION
    • Providing progress feedback
    • Using repaint instead of validate for Re-layout
    • Of components
    • Solving the validate, revalidate, invalidate mystery
    • Stacking items vertically
    • How to use " GridBagLayout " properly
    • Avoiding flicker
    • Components with embedded HTML
  • GUI CONTROL
    • Better data validation
    • Desensitizing GUI Components based on application state
    • Use threads in events handlers to avoid freezing your GUI
    • Model view controller and Jtree
    • How to data transfer something other than text
    • A keylistener that doesn't listen ? Printing text, HTML and images in a JeditorPane
  • PERFORMANCE
    • Lazy loading our way to better performance
    • Using object pools for excessive object creation
    • Performance watch : array versus vector
    • Avoid using temporary arrays for dynamic array grothw
    • Use stringBuffer instead of " + " for concatenation inside a loop
  • MISCELLANEOUS
    • Is there a better way to debug ? Encapsulating JNI calls through interfaces
    • Assertions.

Caractéristiques

  • Date de parution
    02/06/2000
  • Editeur
  • ISBN
    0-471-36174-7
  • EAN
    9780471361749
  • Présentation
    Broché
  • Nb. de pages
    323 pages
  • Poids
    0.585 Kg
  • Dimensions
    19,0 cm × 23,5 cm × 1,9 cm

Avis libraires et clients

Avis audio

Écoutez ce qu'en disent nos libraires !

À propos des auteurs

Michael-C Daconta is President of " Synergy Solutions, Inc. ", where he conducts training seminars and develops advanced systems with Java, JavaScript, and XML. He is a Sun-certified Java programmer and author of "Java 2 and JavaScipt for C and C ++ Programmers" and "C ++ Pointer and Dynamic Memory Management". Eric Monk is a software developer for Universal Systems Inc., where he develops medical software using a wide variety of technologies. He is also a co-author of "Java 2 and JavaScript for C and C ++ Programmers". Paul Keller is a Director of Technology at Sterling Software. He is a Sun-certified Java programmer who has been developing software for twenty years. Keith Bohnenberger is a Senior Software Engineer at Sterling Software. He is a Sun-certified Java programmer who has been developing software for seven years.

Des mêmes auteurs

Derniers produits consultés

33,40 €