Not doing a technology a favour
The Spring Framework is a worthy attempt to simplify Java/J2EE. These days pretty much everyone accepts that J2EE is largely a pig:
- Its large, complicated and unwieldy.
- EJB to date (i.e. pre v3) is a big fat failure.
- EJB to date is completely inappropriate for many projects.
- JCA is dying on it's feet.
- The promise of portability has failed
- The whole concept is not agile, why standardize a container, instead of it's component technologies?
- I mentioned it's a pig right?
Spring aims to:
- ease this burden this by simplifying configuration (via IOC),
- provide developers with simple ways to use and combine the useful component technologies of J2EE and non-J2EE components - in a flexible way, you only need deploy what you use;
- use AOP for declarative transaction management;
- make testing easy, no setup problems.
But then this: Add a simple rule engine to your Spring-based applications. This genius suggests implementing what he calls a rule-based engine in Spring. The advantage seems to boil down to: you can use the Spring's configuration xml to create your ruleset. Oh dear. And it doesn't stop there. His idea of a rule-base is to use spring's XML to define a lot of if-then-else statements connected into a graph. Oh dear, that's not a rulebase, that's a monstrously inefficient way to encode a lot of if-then-else's in xml. Rule bases are intended to be configurable, efficient via RETE-II algorithms, support multiple priority-levels and modal contexts. Oh and I think there are standard XML vocabularies for specifying rulebases (maybe Rule ML?). This article just makes Spring developers look silly.
This whole episode is a good example of "patternoxia" - the misguided attempt to describe obvious things and everyday workarounds as patterns. E.g. "I have discovered a useful pattern that developers should follow when faced with the need to make decisions: the if-then-else pattern. I have createed a set of interfaces and abstract classes that developers can use. This adds to my while and empty statement patterns covered in earlier articles". You have been warned.


0 Comments:
Post a Comment
<< Home