Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 1.4
-
Component/s: Validation
-
Labels:None
Description
OGNL is becoming the largest time-sink in Stripes. Trying to figure out how to work around the fact that OGNL is completely unaware of Generics information among other things, and trying to work with it's poorly documented APIs is taking an inordinate amount of time and still there are things that we can't do.
Switching to a built-in BeanUtils/PropertyExpression system should allow a lot of improvement as it will be (obviously) a lot simpler than OGNL and targette d directly at the needs of Stripes. I expect to see the following benefits:
1) Stripes can ship with one fewer libraries (we're down to comons logging and cos)
2) The replacement code will be far better documented and far clearer than OGNL - it should be much easier to maintain than the code that interfaced with OGNL which is substantial in it's own right
3) We should be able to do things that we couldn't do with OGNL. For example, assuming you have your generic declarations right, it should handle back to back indexing e.g. foo['bar']['splat'][7] which was problematic before. It could also deal with arrays of generic types!
4) It should be much faster. Just calling bare get/set operations should be faster due to it's limited scope. But what's better is that because it's written to work closely with Stripes when used in the binder it could cache partially evaluated expressions and re-use them which means that we're making significantly fewer calls to the API as well as the API being faster ![]()
5) We should be able to do other neat things such as using class level type arguments to figure out the real type of a property when we're presented with a type variable (thus allowing further generification of ActionBean classes and their properties)
6) The new code should in most circumstances give much friendlier error messages than OGNL did ![]()
Activity
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
An initial version of this has been checked in for 1.4.