I taught again this week. I don't know why o do it. Probably because I feel productive.
I worked on bean mapping. Having a layer protecting your exposure to third party helps... but at what cost?
I'm building that layer now for our intf with WebLogic. I don't quite understand why it was used in certain places but such is life.
Building it after is in that case of: it works, why spend time on it????? And the answer is technical debt. Startup costs, security costs.
People try to tack on lower cost of future maintenance but I don't buy it. If your car works, and someone offers you a service saying: "I'll replace your air intake manifold for $1,000, it will save you wear and tear on you engine" I'd say, "Hey. There were smart people testing and designing this originally, where is your proof yours is better?"
So we get layers. The most important thing in our program is our capability of changing out our ORM if you looked at lines of code.
The things I want to change are to go stackless; use akka, or vertx. Where is that bean mapping capability?
Web layers tell you to pollute your beans with json, request args, and post method mapping. DB layers tell you to pollute your beans with column, table, and join information. Service layers tell you to pollute your bean with validation information and XML information. So we end up with bean mappers.
I like raw java mappers (static converter utils) for the task. Orika, Dozer, w\e just add bad, half implemented DSLs to learn the edge cases for. The java converter is easily updated and doesn't require anything from either layer other than setters.