Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/todd-cook/java-best-practices-ui
Best practices for multithreaded UIs.
https://github.com/todd-cook/java-best-practices-ui
Last synced: 9 days ago
JSON representation
Best practices for multithreaded UIs.
- Host: GitHub
- URL: https://github.com/todd-cook/java-best-practices-ui
- Owner: todd-cook
- License: bsd-3-clause
- Created: 2011-04-26T07:18:48.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-05-11T17:07:31.000Z (over 12 years ago)
- Last Synced: 2023-03-11T22:11:03.359Z (almost 2 years ago)
- Language: Java
- Homepage:
- Size: 138 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
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 exitTo Run the Demo:
---------------
* mvn package
* cd target
* java -jar Java-Best-Practices-UI-1.0-dist.jarImplementations 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 tasksImplementations of Effective Java features:
------------------------------------------
* Enum used as a singleton
* Builder pattern
* Generic collections, data structuresOther Best Practices:
--------------------
* Using MigLayout to simplify Swing layouts
* Initialization via System Properties
* Use of FindBugs static analysis, Cobertura code coverageTODO
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.