Showing posts with label review. Show all posts
Showing posts with label review. Show all posts

Tuesday, July 27, 2010

Review: Real World Java EE Patterns Rethinking Best Practices, by Adam Bien

Real World Java EE Patterns Rethinking Best Practices

"Real World Java EE Patterns" is a book targeted rather for developers with some experience with JEE. If you are a beginner, you can miss some context. If you have some experience with JEE, in this book you'll probably find solutions to problems that are familiar to you.

Adam Bien is great at explaining difficult topics. Difficult? I didn't find anything difficult in this book ;) E.g. transactions isolation is explained very clearly.

The book is very good catalog of JEE Patterns. Each pattern is described separately in similar manner. Each chapter has subchapters: "Problem", "Forces", "Solution", "Testing", "Documentation", "Consequences" and "Related Patterns". In "Problem" a reader can find short description of a problem the pattern should solve. "Forces" shows features that solution should have. "Solution" contains description of pattern, what classes it consists of and what is their responsibility. Usually accompanied by very clear and simple pieces of code. In "Testing" and "Documentation" author highlights what should we test when we use certain pattern, and what should be documented (quite obvious, isn't it?). In "Consequences" we can read about what are pros and cons of the pattern. "Related Patterns" is self explanatory. Most interesting subchapter is "Solution", and it also has sub-subchapters. One of them is "Rethinking". It is good part for experienced JEE developers. Adam shows why some patterns are obsolete. It doesn't mean you should never use it, but in most cases it is no longer necessary in JEE5 or 6. Some patterns, when moved from EJB2 to EJB3, are not adding any value, but instead are adding layer of abstraction and unnecessary complicating the system.

What I like about Adam Bien is that he is not only writing and talking about programming, but he's also programming. While reading the book, one can feel that the author has real experience with the topic. Sometimes he advices not to use what is common "best practice", when it is not necessary and is not adding any value. Good programmer should be able to balance pros and cons of possible solutions, not just blindly follow common practice.

There are small mistakes in the book, but only editor ones, like misspellings and formatting mistakes, single lines of code on next/previous page etc. Nothing really annoying, but there is room for improvement on this field.

Thank you Adam for this book!

Friday, March 19, 2010

Review: Programming Scala, by Venkat Subramaniam

Programming Scala: Tackle Multi-Core Complexity on the Java Virtual Machine (Pragmatic Programmers)Courtesy of The Pragmatic Bookshelf I was able to read "Programming Scala" by Venkat Subramaniam. If you are a Java programmer, this book is a great introduction to Scala for you. It is packed with knowledge. There was not even one chapter after reading which I could say "well, this was quite obvious, I could expect this". Book is targeted for experienced Java programmers, so author does not cover things we already know. This was great for me, my time was not wasted learning what I don't need. Instead, I was led from easier topics in Scala (like classes, typing, closures) to more difficult ones (pattern matching, actors and concurrency) at a nice pace. Most topics are explained quite clearly and understandable. There are few which I had difficulties understanding and I needed to fiddle with some code to get it. But fiddling with code is fun for programmer, isn't it? One of such topics were actors, which is a great feature in Scala and something completely new for Java programmer (unless he knows Erlang too ;)). It took me some time with IDE to understand actors, but it was also fun.

The book not only teaches how to program in Scala, but also shows tools to run these programs. Knowing that Scala doesn't necessarly need to be compiled to run and that it can be run as a script can be very useful if you need to do some simple job on your system. Author shows how to use it as a scripting language. I also liked the last chapter in which author creates Scala application using various features covered in the book. It was a good way to sum up.

The only weak point of this book are examples. Especially at the end of the book they become more and more difficult and not always clearly explained. Another disadvantage of examples is their little connection with reality. Have you ever need to count letters in blog URL? In some cases they even show bad practice like throwing general Exception. I know it's only example, but educational book should not promote bad practice even there.

Said all this, I would recommend this book to every Java programmer who wants to learn Scala. If you are not afraid to fiddle a little with code (and you should not be, you are a programmer after all;) ) it is a very good book for you and you are it's perfect target.

Last but not least, not only author, but also editors deserve praise. I have PDF edition and I can login on pragprog.com page anytime and download it. I don't have to worry that if I loose it - it's lost for good. Moreover there are .mobi and .epub formats available. I could read the book on my phone on a bus or a tram which was very convenient. And there is even more - the books are DRM free, which shows publishers not only care for readers comfort, but also trust us. I appreciate that.

Monday, July 6, 2009

Review: JavaFX in Action, by Simon Morris

JavaFX in Action JavaFX (JFX) is a new technology. There are not many books about it yet. Then the more happy I am I can read one of them - "JavaFX in Action" by Simon Morris from Manning Publications.

At the beginning of the book there is explanation of what JavaFX platform is, and it's language JavaFX Script. And why it is great at creating GUIs. The next step is not language basics as one could expect, but first small application in JavaFX. You don't fully understand how it works and what all this words, numbers and braces mean, but you can run it and say "WOW!" :) It is there to make an impression, and it serves this purpose well. It's like an appetizer, making you even more hungry for knowledge and more eager to learn this new great language. I like it, because it makes further reading "taste" better. It also shows what is told in first chapter is true - in JavaFX you can create fancy graphical effects easily.

Chapters two and three are about language itself, variables declaration, data types (new one: duration), language structure - all the fun begins. After learning basic stuff about language, we start creating "real" applications. Nice looking, fancy and colorful small applications (JavaFX is for GUI, isn't it?). What I didn't like here is a bit waterfall, not iterative process. All applications are created class by class, and then at the end run. Many times I wanted to see how single component looks like before finishing whole application. I could do it by writing small app by myself, but I'd prefer to see it in book.

The language used in the book is very light, even funny. It is pleasure to read, still everything is explained clearly and understandably. One of difficult topics are transformations. Such constructs are not common and I didn't see them in any other language (at least not done this way). For me it was quite difficult topic, yet everything was well explained. I understood transformations after playing a little with the code. Another thing was new data type "duration" - no problems with understanding here too (but this one was much easier).

I like it when in book you can see effect of running application. So you don't need to code or even copy code from sources attached to the book and run it. In this book there always was output included after source code, or there were pictures if output was not on console. You still can copy code to your favorite IDE and see it running, but you don't have to.

The book I read was based on JFX 1.1, while there is 1.2 available now. However it was MEAP version, and I'm sure final version is going to be based on 1.2 or even newer JFX (depending when it is going to be released). Anyway author has a lot of knowledge and he predicted (or just knew about it) many things that were missing in JFX 1.1 but are available in 1.2.

Appendixes are also great. There is one for people who don't have anything installed yet, just opened the book and want to code. I had everything installed before, but if you don't, don't worry, the book will tell you what to do step by step. I often missed such appendix in other books, especially when I was less experienced developer. There is even appendix for people not familiar with java, so you can see what static typing vs dynamic typing is all about, what are packages etc.

Reading this book was a pleasure. I learned a lot, and by the best and most effective way - by having fun :)

Sunday, August 10, 2008

"JBoss Seam Simplicity and Power Beyond Java EE" - recenzja

Dzięki Leszkowi Gruchale i Szczecińskiemu JUGowi, dostałem książkę "JBoss Seam Simplicity and Power Beyond Java EE" Michaela Juntao Yuana i Thomasa Heute. Przeczytałem ją, pora się zrewanżować i napisać recenzję.

"JBoss Seam..." to bardzo dobra książka. Daje wiedzę potrzebną do pisania aplikacji w tym frameworku, dołączonych jest wiele przykładów. Na początku autorzy wyjaśniają czym jest Seam, a jest co wyjaśniać, bo ten framework dość mocno różni się od innych o podobnych zastosowaniach. Wiedza w książce przedstawiona jest w jasny, zrozumiały sposób, za to duży plus.

Podczas programowania w Seamie, jak wszędzie, możemy napotkać na problemy. Debugowanie kodu samego frameworku nie jest raczej najlepszym pomysłem. Jest on skomplikowany i pisany z myślą właśnie o tym, żeby go używać, nie debugować. Książka opisuje sposoby "debugowania" wbudowane w sam framework, tak zwane "debug pages". Bardzo użyteczna funkcjonalność, pozwala nie tylko zobaczyć stacktrace, ale także stan sesji czy drzewo komponentów.

Jest też rozdział poświęcony procesom i regułom biznesowym. Ich obsługa jest wbudowana w Seam. Aby przedstawić co to takiego, w książce jako przykład jest system ticketów. Użytkownik się loguje, ma listę zadań, wybiera któreś z nich i od tego momentu jest ono do niego przydzielone. Otóż nie musimy zapisywać nigdzie w bazie danych że dane zadanie przydzielone jest do danego użytkownika, wystarczy że nadamy komponentowi Ticket scope = BUSINESS_PROCESS, o resztę zadba Seam.

Jest rozdział poświęcony testowaniu, które także framework mocno wspiera przez dostarczanie narzędzi pozwalających robić w testach to, co normalnie robi kontener (wstrzykiwanie zależności, "mockowanie" bazy danych, transakcji itp.).

W innym rozdziale opisane są sposoby uruchamiania aplikacji Seamowych w kontenerach nie dających funkcjonalności EJB3, np. Tomcat.

Brakowało mi w tej książce dwóch rzeczy. Zaznaczam jednak, że nie uważam tego za jej wady. Jedna rzecz to więcej informacji na temat samego EJB3 i JSF. Autorzy zakładają, że takie informacje czytelnik już posiada, ja jadnak wolałbym żeby więcej ich zawarli w książce. Rzecz druga to tzw. "internals", czyli to tam jest "w środku". Jak już wspomniałem Seam został raczej napisany z założeniem że taka wiedza nie jest użytkownikowi potrzebna, i dlatego też pewnie nie znalazła się w książce, jednak ja takie rzeczy po prostu lubię wiedzieć.

Polecam tę książkę każdemu kto chciałby pisać aplikacje w Seamie, a jeszcze nie wie jak to się robi.