Showing posts with label Drools. Show all posts
Showing posts with label Drools. Show all posts

Friday, January 24, 2014

Book Review for "Drools JBoss Rules 5.x Developer's Guide"


Drools JBoss Rules 5.X Developer’s Guide
Book Review for "Drools JBoss Rules 5.x Developer's Guide"

Do you have an interest in Rule Engines?  Rule Engines have long promised to relieve the programmer of maintenance tasks, to bridge the gap between business user and developer.  This book covers JBoss's rule engine (Drools) from the Developer's view. 

Drools has expanded beyond it's roots as a rule engine and now offers additional functionality like business process management and complex event processing.  (For those not familiar, BPM used to be called 'workflow'-- it means state management for long-running business processes.)  CEP deals with detecting conditions in windows of time.  For instance, detecting when a specific stock begins trading at discounted prices over a sliding 10 minute timeframe.  These features (and more) are available with Drools, many are explained in this book.

By the way, if this book sounds somewhat familiar, it's probably because it's a refresh of the same title targeted towards Drools 5.0.  Besides the technical update, there seem to be many small adjustments made to increase readability.  If you've seen the first book, you'll want to see this one.

The author goes over the basics of business rules in the first chapters.  What a rule engine is, how to use Drools, how to write rules and how to make Domain Specific Languages (DSLs) are all explained.

Central chapters explain some viable use cases for a rule engine-- data validation and transformation.  The author provides example scenarios and the rule artifacts needed for the tasks. Through these chapters, additional material about use of Drools is covered.

Later chapters cover testing and application construction.  There are a surprising number of nuances to integrating business logic engines into enterprise applications, so this chapter will be of special interest to users who are working to integrate with enterprise frameworks.

Finally, there are some appendices which provide details about setting things up and the sample applications.

All things considered, this book has over 300 pages of valuable content for those interested in using the powerful features of the Drools.  If you are a Drools user, you probably owe it to yourself to have a look.

The book can be found here.




Happy (Rule-style) coding!


Monday, January 20, 2014

The latest Drools / JBoss Rules book - Review here soon

Do you have an interest in Drools / JBoss Rules?  There's a new title on this compelling technology from Packt Publishing. 


Drools JBoss Rules 5.X Developer’s Guide




The book can be found here.  Watch this space for a review soon.

A happy 2014 to you and your family.

Saturday, October 29, 2011

Book Review for "Drools Developers Cookbook RAW"



A Developer's Survey of the fast-moving Drools project

This review is for "Drools Developers Cookbook" from Packt. This book is currently available in 'RAW' format, which means it's not quite finished. The text is a little rough around the edges, and there are two chapters yet to be provided.

Do you work with Drools, the popular open source rule engine? If not, this is not the right book to get you started. There is no introductory material to get you started. But if you know Drools, this is your ticket straight to the current cutting edge! This book gives pointers and best practices for working with the latest and greatest features.

The first chapter gives you tips on working with rules. You'll see how to write rules in ways outside the usual, how to enable some diagnostic logging, and how to work with rules on timers and Calendars.

Chapter 2 deals with more 'bread and butter' Drools material, but this time not dealing with rules.

Chapters 3 and 4 cover Guvnor, the open source Business Rules Management System. Guvnor, a web app, allows you to author, categorize, and test your rules. This is how you can have business-analyst types write business logic instead of using programmers.

The fifth chapter is probably the most newbie-friendly chapter in the book, it deals with Complex Event Processing. CEP is a way of applying rules over windows of time, so you can express something like "Tell me if there are 100 online purchases in any half-hour period".

Chapters 6 and 7 deal with executing Drools remotely (mostly through 'Drools Server') and integrating Drools with other applications through Spring and Apache Camel. This is very handy-- after mastering Drools, developers sometimes wonder how to apply their newfound knowledge in a practical way. Here are some good ideas for solving that problem!

The two chapters that are not yet provided deal with Drools Planner (a tool for finding optimal solutions to problems like capacity balancing challenges) and jBPM5 (a re-hang of the popular jBPM Business Processing framework). These two will be very important, especially jBPM. I hope the author is putting a special emphasis on these.

All things considered, I find this book to be a good resource for Drools developers. As I've hinted, if you're new to Drools you probably need to start with something a little more basic. But if you're already into Drools, this is a quick way to get get a handle on state-of-the-art features.

The book can be found here.

Happy Drooling!

Monday, September 13, 2010

Book Review: "Drools JBoss Rules 5.0: Developer's Guide"

Business Rules Engines are a curious thing. For years they've been promising to ease the burden of writing and maintaining business logic, yet they never quite seem to live up to the promise. Want to give one a try? Let's have a look at a prominent Open Source BRE (Drools) as guided by this book from Packt.

The book starts out simply enough, with the first chapter introducing the idea of a BRE and the second covering rule authoring basics. From there, the author launches into building a banking application.

Chapter 3 is the 'Validation' chapter. This is a natural strong suit for a BRE, as they favor 'if/then' (or, as this author writes, 'when/then' logic). The author does a good job of introducing necessary parts of the Drools infrastructure, i.e. the 'rule context' which is useful in taking action when some condition exists.

Chapter 4 is about data transformation, it's not a far leap from Chapter 3. I think this was somewhat imaginitive on the author's part, as XSLT or a tool like Smooks tends is probably a better choice for transformation than a BRE would be. This book is all about Drools, though, so it makes more sense to do it this way.

Chapter 5 is the 'DSL' chapter. Rules tend to look a little awkward to coders unaccustomed to seeing them. A good example might look like this:

when
$customer : Customer (balance <>
then
$customer.setMinBalanceWarning();
warning (kcontext)
end

Instead of dealing with that kind of stuff, it's possible for some rules (if they fit a pattern) to be written something like this:

when
There is a Customer with a balance less than $200.00
then
Set the Minimum Balance Warning
Report this
end

Isn't that cool? It's really not all that mysterious, chapter 5 shows you how to do it. Warning: When managers see BRE marketing presentations, they sometimes watch something like this demonstrated and get all kinds of ideas about firing all the programmers and replacing them with business analysts. Rest assured, there is a programmer behind it all. (And a very skilled programmer at that. But this is for the rule practitioner to see....)

Chapter 6 covers stateful sessions, something that can be handy when your application doesn't experience big swings in the data it's crunching on. The author does his usual good job of providing an implementation, then some tests to prove the code. Once again, technical tidbits are introduced to the reader as they are needed.

Chapter 7 is about Complex Event Processing, somewhat a hot topic in today's Developer landscape. It's an interesting use case for Drools, so I was glad to see it.

Chapter 8 covers 'Drools Flow', which is one of the ways you can influence the order in which your rules are executed. To a garden-variety Java coder, this might seem like a strange statement-- how can you NOT influence the order in which your rules are executed? But that's the BRE way, and the author shows you one way to productively manage this 'feature' of the BRE.

Chapter 9 builds the Sample Application, which is the app that houses all the work done previously. It suffers a little scope creep, as the reader is expected to enclose their Drools work in Spring, Tomcat, etc. but I expect this won't be too much to ask of the type of reader who picks up this book.

The next chapter is about testing, always something nice to understand in whatever language or framework you're dealing with. Chapter 11 follows, that one covers integration issues. (Roughly, how do you take all your useful Drools code and apply it somewhere?) It's another nice thing to have spelled out.

The final chapter is on performance. It's a little funny because this final chapter enlightens the reader on the inner workings of the rule engine, something you might expect to see in the front of the book rather than the back. But it's good stuff, so I'm glad it was included.

There are 3 appendices, focused on helping with preparations for running the code the book provides.

So, what's the verdict? Here are the things I like:

- Gives some expert insights into how to write an application with a BRE
- Covers lots of the different facets offered by Drools
- Provides good explanations for technical tid-bits

Now for some dis-likes:

- Not enough guidance on best practices. Some are here, buried in the text, but you have to realize what you're looking at. The market really cries out for a book that explicitly provides these.
- Probably not enough to get a BRE newbie off the ground. Combined with the Drools user doc ('Cheese Shop'!) it may be enough.
- The author does a good job of using Drools for several purposes, but does not give the reader much guidance on when it really is smart to use a BRE and when it isn't. (There are plenty of places where it isn't-- I guess it's up to you to decide!)

All things considered, I liked the book. Next time I'm into Drools, I'm certain it'll be by my side!

The book can be found here.

..........

if
you liked this article
then
come back again another time!
end

Rick