Intro to Software Design - raisercostin/software-wiki GitHub Wiki
Use private final fields injected via constructor - https://www.petrikainulainen.net/software-development/design/why-i-changed-my-mind-about-field-injection/
Elegant Objects - http://www.elegantobjects.org/
Cons of Object Oriented - https://medium.com/@cscalfani/goodbye-object-oriented-programming-a59cda4c0e53
use slf4j - private final static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DataSupplier.class);
never hide exceptions
at least log as debug: catch(...){ logger.debug("",ex); }
catch(...){ /do nothing / }
never throw CheckedExceptions, catch and throw new RuntimeException(checkedException)
logger.info("text",ex) (never do an ex.toString())
never use static except for logger
never expose internals to others
create immutable classes
no duplicate code
all fields by default private and final
no circular dependencies
attention to Runnable that can throw exceptions
springframework5
annotations
classes @Component
or derived
constructor @Autowired
primitive constructor arguments: @Value("${restfs.fs.gitfs.path}")
constructor optional: @ConstructorProperties({"beanForParameter1","beanForParameter2"})
fields: private final
Tools
Resources
🗂️ Page Index for this GitHub Wiki