Learning Java the "right way": any book that goes over DI, loosely coupling, writing testable code? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this questionI'm comfing from the .net world, and want a book that goes over the 'right' way of coding.
Things like dependancy injection, loosely coupling of objects, how to layout your web application properly, unit-testing etc.
Google code reviewer's guide, a 38 page pdf which covers writing testable code, loose coupling and dependency injection. The presentations are also highly recommended.
Dependency Injection covers the theory of why you would use dependency injection, in addition to the technical details.
Three books that are language-agnostic, but are considered 'classics':
Desing Patterns (by GoF)
Code complete (by Steve McConnell)
Patterns of Enterprise Application Architecture (by Martin Fowler)
Important: don't read them like belles-lettres - read parts of them while practicing.
While it does not cover some of the things you mention, for me the book to learn Java the right way is definitely Effective Java, Second Edition.
(source: sun.com)
Bruce Eckel's Thinking in Java is a very good introduction into Java for people who already know another language, the PDF version is free for download.
Read a few books if you want, anything "agile", "spring", "TDD" will do, but to be real quick, get a job where they let you work together with a seasoned developer who does pair programming with you... and you will learn more quickly than you can even think about it...
精彩评论