Is there any book studying open source java code?

I like to read open source code to see how specific problems have been resolved, or just to learn how to create nice and clean code.

I was wondering if there is any good book out there that goes through excerpts from various (preferably Java) open source projects to show how the templates were used and implemented, some nifty tricks, etc.?

Update: I used design patterns as an example, but this is actually not what I need. I read a lot of open source code, and I often find interesting ways to do things that I did not think about before - my question is whether there is a book that shows some kind of “cool” open source code, a href = "http://rads.stackoverflow.com/amzn/click/0132350882" rel = "nofollow"> Clean Code uses FitNesse code to illustrate refactoring and other points.

+6
java open-source
source share
5 answers

Well, you can just read a book about an open source project, and authors can show what and how. For example. I read Pro Spring 2.5 , and there’s even a chapter called “Spring Templates” explaining the reason and how they name the files, directories, design patterns that they use, and invite you to use them. Perhaps take a look at the books about open source projects you are researching.

UPDATE (just insert this paragraph to expand the answer :): as I said earlier, you can read books about open source projects and find information on how this project is developed, architectural problems, etc. When I was looking for a really good example of using the Open / Closed principle, the theory is good, but I would not say that it is so clear how to use it. The only book that helped me was the Spring MVC Expert and Web Stream (I already showed you Google books with the chapter I read). I have not read the entire book, but I am sure that it contains a lot of such things (what and how was done to execute Spring). From the book Clean Code: A Guide to Flexible Software Skills I remember that there is a chapter when they take the code from one open source project and do it better (unfortunately, open source does not mean that it is good enough); this book also contains a link to some other projects where it is written (e.g. jUnit). I do not know a single book that is completely devoted to any project, there are only books where there is a "theory", and books about the project, which may have some explanation of what is inside. I would recommend books from APress (Pro and Expert series, afaik the "beginning" of the books does not contain such an explanation), and Packt Publishing is their main topic - open source.

UPDATE 2 (I just can't stop :) I just remembered OReilly's new series of books, " Beautiful .... " I never read, but I looked. In fact, it consists of different stories behind development, real life stories. I see that there is also a Beautiful code: Leading programmers explain how they think - I have to contain what you need. Other “beautiful” books may be worth your time.

There are a lot of good books on templates in general, and it depends on what you are looking for. For example. Head First Design Patterns is a good idea to explain common patterns in a fun way. If you need more, you can take a look at “Enterprise Integration Patterns: Designing, Creating, and Deploying Messaging Solutions” to find out how different applications, systems, etc. can be integrated (and how open source projects do it). Etc. Just indicate which templates or tricks you want to read, the community will make its proposal;)

Some web links from my bookmarks:

And a few more books to take a look at:

people who develop open source definitely know what these books are;)

Hope that helps

UPDATE (05/25/2011) Just found one book that I am definitely going to buy, and I think that it is fully consistent with your question:

Open Source Application Architecture
enter image description here

Architects look at thousands of buildings during their training and study criticisms of those buildings that were written by craftsmen. On the contrary, most software developers only ever get to know a few large programs - usually the programs that they themselves wrote - and never learn the great history programs. As a result, they repeat each other's mistakes, and do not build success on each other. The purpose of this book is to change that. In it, authors of twenty-five open source applications explain how their software is structured and why. What are the main components of the program? How do they interact? And what do their builders learn during their development? Answering these questions, the authors of this book provide unique information on how they think. Electronic versions of the open source application architecture for e-books will be available for download shortly.
+5
source share
Good question. But I doubt that there is a book based on a real project. But to answer your “nice and clean” part, Josh Bloch Effective Java is the right book.
+1
source share

I'm not sure if there are any Java examples (I have books, but they didn’t bring them to school), but if you are looking for general recommendations on how to read code and evaluate its quality, you are interested in Reading Code and Code Quality from Spinellis. Based on your question, I would suspect that Code Reading is more appropriate for what you want - it looks at how you can read unfamiliar code well before editing it, understanding complex code, etc.

+1
source share
0
source share

The best Java book there is absolutely Head First Java , I have never seen / read a book as funny as this + it explains complex things in the simplest and funniest way. But this book is a bit outdated, but I think it's fine if you are learning the basics of Java

0
source share

All Articles