Just finished the <Functional Programming for Java Developers> book that written by Dean Wampler.

As Functional Programming got more buzz and more attentions lately, for Java developers (seems always busy, btw), I think this is a good and concise book for you to read on the subject, it is only 60 pages. Looks more like a long essay instead of a book, given most of IT books are having more than 200 pages. However, the 60 pages serves this book’s purpose very well, it will motivate you to enter into the Functional Programming world, at least, I am motivated!

The author begins with “Why Functional Programming”,  and the main reasons are: 1) Have to be good at writing concurrent program 2) Most programs are just Data Management problem 3) Functional Programming is more Modular 4) Have to work faster and faster and Functional Programming is a return to simplicity.

I particularly like the last point of returning to simplicity, remember that how many times we need to use the IDE’s ‘generate getter and setter methods’ function to generate those boilerplate code,  and how many times we wrote similar code to iterate a collection just because we are using another criterion. I believe, less codes means less bugs, with Java, we sometimes always bury our business logic codes into the codes that needed by language itself. Frameworks/Libraries surely offer a great help here, but wouldn’t it been even better that is supported in the language level.

The author goes on with “What Is Functional Programming”, Some of basic principles of Functional Programming, like 1) Avoid mutable state 2) Functions as first-class values 3)Lambda and closures 4)High-order Functions 5)Side-Efffect-Free Functions 6) Recursion 7) Lazy vs Eager Evaluation 8)Declarative vs. Imperative Programming. In this chapter, I particularly impressed by Recursion and Declarative vs. Imperative Programming. In Java programming, we don’t usually see many recursion usage in our daily code, I am not sure why, vaguely remembered that it may affect the performance. With Functional Programming, it doesn’t use the loop, it uses the Recursion instead. And author list two different ways to program the factorial function. The declarative one that used the recursion seems much easier to understand for me.

The author continues with “Data Structure and Algorithms”, “Functional Concurrency” and “Better Object-Oriented Programming” chapter to expand a bit explanation/examples on the items that he described in the first chapter “Why Functional Programming”.

Last chapter is called “Where to go from here”, basically lists some good resources that for you continue to explore the wonderful world of Functional Programming.

Well, writing a review for a concise book should be concise as well, otherwise, why don’t you spend the time of reading my review in reading the book itself. :) Overall, this is a very good Functional Programming introduction book for you to read, especially for those busy Java developers.

,

I was invited to review the new book about Apache CXF from packtpub, it is called《Apache CXF Web Service Development》by Naveen Balani and Rajeev Hathi.

From the table of content, it covers both web service and restful service in CXF, also had three chapters for the CXF’s frontend, transport, interceptors, invoke etc, which are the essential concepts of CXF’s architecture. So it definitely seems interesting to me. I will post more detailed review once I finished the book.

, ,