- Taschenbuch: 338 Seiten
- Verlag: Packt Publishing (24. Mai 2013)
- Sprache: Englisch
- ISBN-10: 1782161260
- ISBN-13: 978-1782161264
- Größe und/oder Gewicht: 19 x 2 x 23,5 cm
- Durchschnittliche Kundenbewertung: 1 Kundenrezension
- Amazon Bestseller-Rang: Nr. 181.445 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
Drools JBoss Rules 5.X Developer's Guide (Englisch) Taschenbuch – 24. Mai 2013
|Neu ab||Gebraucht ab|
Wird oft zusammen gekauft
Kunden, die diesen Artikel gekauft haben, kauften auch
Es wird kein Kindle Gerät benötigt. Laden Sie eine der kostenlosen Kindle Apps herunter und beginnen Sie, Kindle-Bücher auf Ihrem Smartphone, Tablet und Computer zu lesen.
Geben Sie Ihre Mobiltelefonnummer ein, um die kostenfreie App zu beziehen.
Über den Autor und weitere Mitwirkende
Michal Bali, freelance software developer, has more than 8 years of experience working with Drools and has an extensive knowledge of Java, JEE. He designed and implemented several systems for a major dental insurance company. He is an active member of the Drools community and can be contacted at firstname.lastname@example.org.
Was mir besonders gut am Buch gefallen hat:
- eine gute Einführung nicht nur in Drools im speziellen sondern in Rule Engines allgemein.
- Informationen zur Installation und ersten Programmierschritten
- Sehr ausführliche Beispiele und Szenarien, an denen die verschiedenen Modi und Pakete von Drools erläutert werden.
- Starker Fokus auf Test-Driven-Development: Fast alle Regeln und Code Beispiele werden mit einem Test eingeleitet.
- Immer wieder gute Tipps und Hinweise zum Thema Clean Code
- Complex Event Processing in Kapitel 7 ist eine hervorragende Erklärung der Materie
- Ein vollständiges Beispiel einer Drools basierten Webanwendung in Kapitel 9 kann sehr gut als Startpunkt für eine eigene Anwendung genutzt werden.
Was mir weniger gut gefallen hat:
- Die Beispiele sind teilweise so ausführlich, dass das Buch nur sehr bedingt als Nachschlagewerk hilfreich ist.
- Die Kapitel bauen in ihren Beispielen teils aufeinander auf. Das Buch ist eher geeignet um es von vorne bis hinten durch zu lesen.
- Teilweise ist der testbasierte Ansatz übertrieben ausgeprägt.
Im Vergleich zur vorherigen Ausgabe wurden scheinbar einige Codebeispiele korrigiert bzw. auf den neusten Stand gebracht. Drools wird ständig überarbeitet auch bezüglich der Schnittstellen, und es steht jetzt bereits die nächste Version (6.0) an, welche aber noch nicht als Finale Version zur Verfügung steht.
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
I plan to continue with the examples and am looking forward to becoming familiar with more of the code provided in the examples to enhance my JBoss Rules development skills.
I have worked with JBoss Drools before, so the early parts of Chapter 1 were somewhat redundant for me but I thought they covered the required topics for the beginner very well.
In chapter 3 I was glad I had loaded the chapter examples into eclipse. I ran the tests using JUnit and found reading the book and referring to the eclipse project to be a very effective way of covering the material
After studying the book for about a week and getting everything loaded into the latest version of Spring Tool Suite, I began to try to run the sample application described in chapter 9. This is a very ambitious sample involving CEP, Stateful Sessions, JPA, H2 data source and Spring MVC. I was very excited when I discovered how advanced this sample would be and began to try to deploy on my local tomcat 7 server. Unfortunately the example did not work and not even the welcome page would render. I have other code running on the same tomcat server that also utilizes Spring MVC with same versions and works fine. Luckily the book provides a pointer for where to log issues in the samples. I noted that another reviewer had the same issue on Mac, but I hit this on a windows machine. As noted this is a very ambitious sample so I am still hopeful to find the reason for the failure and I can still recommend this book.
Moving on to the JUnit testing in chapter 10 now.
This book is for someone who has experience in Java, but not necessarily Drools. The book uses concepts like JUnit, Mockito, Maven, JPA, Spring without much explanation...things that a newbie developer may not have encountered yet. The development environment setup is pretty brief, and only describes it for Eclipse.
The first chapter gives you a brief overview of Drools, when and when not to use Drools.
The second chapter gives you a brief primer on how to write rules, using imports, global variables. There are short examples here. I wish they were developed further with more explanations. The official manual (available on jboss.org) itself would serve the same purpose, so I don't believe this book would serve as a good reference manual, nor is it intended to be.
The third chapter goes more in depth and provides a sample use case of a bank and its customers. This chapter brings a user from conception to implementation of several rules. The author also goes as far as writing test cases for the rules, which I believe everyone should do. Drools rules can be tricky to write.
The fourth chapter goes over Domain Specific Language and gives several samples of how to implement one, and the pros and cons. I do not have much experience in this area but the chapter well written enough to give me a good overview.
From the fifth chapter onward it introduces different tools, like jBPM, guvnor, and then you build a small application. Then it goes into details on testing, and performance. My background is in building Spring MVC applications, so the details on building the small application came naturally to me, but I can see others who are not as familiar to Spring MVC stumble in this area in the details.
At the time of this review I did not thoroughly read past the fifth chapter, but did skim the entire book. I would admit it contains valuable information and definitely see myself referring to the information in the future if/when I integrate more complex rules into my systems.
Overall, I feel the book gives a detailed overview of many topics. I would still refer to the official manual and the official website for certain reference information. However, I have yet to find a resource that puts everything together in a nice package. It has introduced new topics to me that I have not yet explored. The book itself is good for a beginner Drools, or has use Drools before, but not all aspects of Drools.
But over the time business rules change and developers keep adding new features or updates existing logic.
In this process the common mistake done by many teams is putting if-else conditions here and there instead of coming up with better design to support enhancements. Once these feature turn on/off flags and behavior branching logic started creeping into code then overtime it might become un-maintainable mess. The original developers who design the basic infrastructure might left the organization and the current team left with a huge codebase with if-else/switch conditions all over the code.
So we should be very careful while designing the classes holding the business rules and should be flexible for changes. No matter how much care you take you might still need to touch the code whenever a business rule changes.
This is a problem because we are burying the business logic in the code. Drools framework tries to address this problem by externalizing the business rules which can be authored or updated by non-technical people as also (at least theoretically :-)).
Chapter 1: Programming declaratively
I would strongly suggest to read this chapter even if you are already familiar with Drools.
Author Michal Bali explained the problems with putting business rules in code and how Drools addresses this problems.
This chapter also has When not to use Drools section which I find very useful to determine whether you really need Drools for your project or is it overkill.
Chapter 2: Writing Basic Rules:
Here you can start getting your dirty by familiarizing yourself with Drools syntax and trying out simple examples.
This chapter also introduces various concepts and terminology of Drools, so don't skip this.
Chapter 3: Validating
This chapter covers building a decision service for validating domain model. Any concepts can be explained better with an example rather than lengthy explanations.
Here author did a good job of taking a real world (if not completely real world, but non-trivial) banking domain model and explained how to build the validation rules with several examples.
In this chapter you can find plenty of example code snippets that are commonly used in many of the projects.
Chapter 4: Transforming Data
This chapter covers transforming data from legacy system to new systems and applying various rules in the transformation process.
Author explained how to use IBatis for loading data which I find as outdated topic, now it is MyBatis with cool new features.
But actually I doubt if any legacy system with huge volumes of data can really use this feature at all because if needs all the data to be loaded in memory.
I prefer Kettle(Pentaho Data Integration) kind of tools for this purpose.
Chapter 5: Creating Human-readable Rules
One of the main promises of Drools is you can configure business rules in human readable format.
Ofcourse developers are also human beings(:-)) but here the meaning is non-technical people also should be able to understand the rules and with little bit of training they should be able to configure new rules or update existing ones. This chapter covers authoring the rules using Domain Specific Language (DSL). Author covered wide variety of rules configuration options using DSL including configuring and uploading rules from CSV or XLS files.
The rest of the chapter go in-depth of Drools covering advanced topics which I haven't yet gone through.
So far I feel it is good read and I would strongly suggest to read this book if you are building an application with complex business rules.
If you are a Drools user (or want to be), it's worth having a look at this book.