Showing posts with label recenzja. Show all posts
Showing posts with label recenzja. Show all posts

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.