Code Monkey home page Code Monkey logo

java-best-practices-ui's Introduction

Java Best Practices UI

A demonstration of best practices for Java multithreaded programming and user interfaces.

Why?

Few developers write good multithreaded server code, and the state of multithreaded user interface programming is even worse. The book, The "Java Concurrency in Practice" has an important chapter on multithreaded UI programming, however the examples and source files don't provide a complete, working example, so I distilled the ideas from the book into a complete, yet simple working application example using adaptations of source code and ideas from: "Concurrent Programming in Java" by Brian Goetz, and "Effective Java" 2nd Edition by Joshua Bloch.

Working Demo Features:

  • Simple Computation with Cancel
  • Multiple Computations
  • Memoized Computations
  • Shutdown gracefull and exit

To Run the Demo:

  • mvn package
  • cd target
  • java -jar Java-Best-Practices-UI-1.0-dist.jar

Implementations of Java Concurrency in Practice concepts of:

  • ThreadPools
  • Logging Singleton
  • Executor Framework
  • Shutdown hook with an orderly shutdown of services
  • Examples of using the Executor and Completion services frameworks for responsiveness and cancelling a long running tasks

Implementations of Effective Java features:

  • Enum used as a singleton
  • Builder pattern
  • Generic collections, data structures

Other Best Practices:

  • Using MigLayout to simplify Swing layouts
  • Initialization via System Properties
  • Use of FindBugs static analysis, Cobertura code coverage

TODO Using documents located in a package path of testing; e.g. XML validation Launching Wizard - because you can't change the memory & thread sizing at runtime About screen with profile & application versioning information.

java-best-practices-ui's People

Contributors

todd-cook avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.